Skip to content

Instantly share code, notes, and snippets.

@treo
Created April 9, 2014 11:04
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save treo/10255313 to your computer and use it in GitHub Desktop.
Save treo/10255313 to your computer and use it in GitHub Desktop.
Accessing a SOAP web service which requires a client certificate using node-soap 0.4.3
var soap = require('soap'),
fs = require('fs');
client = soap.createClient('https://some-webserv.ic/something.wsdl', {
wsdl_options: {
cert: fs.readFileSync('cert.pem'),
key: fs.readFileSync('keyfile.key')
}
}, function(err, client){
console.log(client.describe());
})
// Note: the keyfile should not be secured with a passphrase
@jleira
Copy link

jleira commented Jul 9, 2019

I use that and work, but I dont know how to use to consume a method? that method use ws-security, can yo help me with that?

@treo
Copy link
Author

treo commented Jul 9, 2019

@jleira
I haven't even used node soap in the last 4 years. Take a look at the documentation; https://github.com/vpulim/node-soap

I really can't help you any more than that.

@ceelsoin
Copy link

@jleira

this option works in 2020 on 0.33.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment