First of all, I'd like to make it clear this is my very first time dealing with certificates/keys/pfx/etc.. so please correct me if I'm wrong :)
I'm using node-soap
to create a client to a web-server and consume its' WSDL. Doing so only on HTTP
protocol and not HTTPS
i had success and everything worked just fine, but now with the pfx
I get the mac verify failure
error.
the relevant code:
import * as soap from 'soap';
import * as fs from 'fs';
let client_options: {
forceSoap12Headers: true,
wsdl_options:{
pfx: fs.readFileSync('PATH\TO\MY\PFX')
}
};
soap.createClient('HTTPS\WEB-SERVER\URL?wsdl', client_options, (error, client)=>{
console.log(error.message) // <-- mac verify failure
console.log(client) // <-- undefined
});
Worth noting:
I could not find any documentation of the
node-soap
library for the --wsdl_options
property, thepfx
one i accidently found while googling so i dont know any other options available.Trying to deal with this error, i found that an option of
passphrase: 'password'
should be added to options BUT for options ofcreateServer
with thehttps
library, not for creating a client withnode-soap
.. relevant links: stackoverflow question , git issue
I've been dealing with this for the past 3 days, got to debugging all node-soap
, https
, and request
libraries.. got lost in there.
Any help or suggestions would be much appreciated, thanks in advance!