SHARE
TWEET

Untitled

a guest Jun 25th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. My soap service requires basic authentication which I have provided. But still showing error about some certification. Is the client.setSecurity not working or is there any other issue with the code ?
  2.  
  3.  
  4. const auth = "Basic " + new Buffer.from(username + ":" + password).toString("base64");
  5.  
  6. soap.createClient(BNSWebServiceurl, { wsdl_headers: {Authorization: auth} }, function (err, client) {
  7.    if (err) {
  8.                 console.log('Error unable to create client');
  9.             }
  10. client.setSecurity(new soap.BasicAuthSecurity(username, password));
  11.  
  12. client.myservicefromwsdl(args, function (err, result) {
  13.     if (err) {
  14.                     console.log('Error unable to call my service');
  15.                 }
  16.                 else {
  17.                     console.log('Result: ', result);
  18.                 }
  19. })
  20.  
  21. I am getting error:
  22. Error [ERR_TLS_CERT_ALTNAME_INVALID]: Hostname/IP does not match certificate's altnames: Host: somedoain.com. is not in the cert's altnames: DNS:somedomain.com
  23.     at Object.checkServerIdentity (tls.js:228:17)
  24.     at TLSSocket.onConnectSecure (_tls_wrap.js:1059:27)
  25.     at TLSSocket.emit (events.js:182:13)
  26.     at TLSSocket._finishInit (_tls_wrap.js:631:8)
  27.  
  28. ----------
  29. ----------
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top