I am using node soap client for calling a SOAP webservice from Node js script
I have couple of issues
I am getting the below error from server( after request submit ) where the root element is not as per the WSDL document. Looks like it is picking up the message element from WSDL
err : Error: soapenv:Server: error: The document is not a getAuthorizationRequest@http://www.xyzabcdefgh.com/auth/operations/2009/3: document element mismatch got getAuthorizationRequestMsg
I would like know to how to add custom namespaces as the element fields are generated without any namespace
My client code looks as follows
soap.createClient(url, options, function(err, client) {
if (err) {
console.log(err);
} else {
client.addSoapHeader("<User.SessionId>sessionid</User.SessionId>")
client.getAuthorizationInfo( { 'atns:authenticationCtx': { attributes: { accessTypeCode:
"XYZ"} } },
function(err, result, rawResponse, soapHeader, rawRequest) {
// result is a javascript object
console.log("err : "+err);
});
}
});