Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

512
Visualizações
Node js soap: unable to create client :Error: unable to verify the first certificate

I am trying to connect the SOAP web service using soap package

Here is my code

var options = {
    wsdl_options: {
      forever: true,
      rejectUnauthorized: false,
      strictSSL: false,
      pfx: fs.readFileSync(__dirname + '/certs/test_cert.pfx'),
      passphrase: '123123'
    }
  };

  soap.createClient(process.env.SOAP_ENDPOINT, options, function (err, client) {
    console.log(err);
    console.log(client);
  });

While executing this I m getting the following error

Error: unable to verify the first certificate
    at TLSSocket.onConnectSecure (node:_tls_wrap:1531:34)
    at TLSSocket.emit (node:events:378:20)
    at TLSSocket._finishInit (node:_tls_wrap:945:8)
    at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:719:12) {
  code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE',
  config: {
    url: '<URL>?WSDL',
    method: 'get',

Not sure why I am getting this however I am successfully able to connect through the soap UI in that I am using a p12 file.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda