Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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 ?
- const auth = "Basic " + new Buffer.from(username + ":" + password).toString("base64");
- soap.createClient(BNSWebServiceurl, { wsdl_headers: {Authorization: auth} }, function (err, client) {
- if (err) {
- console.log('Error unable to create client');
- }
- client.setSecurity(new soap.BasicAuthSecurity(username, password));
- client.myservicefromwsdl(args, function (err, result) {
- if (err) {
- console.log('Error unable to call my service');
- }
- else {
- console.log('Result: ', result);
- }
- })
- I am getting error:
- 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
- at Object.checkServerIdentity (tls.js:228:17)
- at TLSSocket.onConnectSecure (_tls_wrap.js:1059:27)
- at TLSSocket.emit (events.js:182:13)
- at TLSSocket._finishInit (_tls_wrap.js:631:8)
- ----------
- ----------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement