node-soap
node-soap copied to clipboard
apachesoap datatypes compatibility
I need to consume an API developed with Apache Axis WSDL. In the current state connecting to an Axis WSDL gives the error TypeError: Cannot set property 'namespace' of undefined, the problem seems to be caused by non-standard datatypes like apachesoap:DataHandler used by Axis.
Is there any possibility for this compatibility to be added?
I'm trying to implement this by myself, if I succeed I'll make a pull request.
test program
var soap = require('soap');
var url = 'https://<ip>:<port><path>?wsdl';
soap.createClient(url, {}, function(err, client) {
// here the describe() function works, so the WSDL is parsed correctly
try {
if(err) { throw err; }
// The function "getXYZ" is working fine when consumed by a php script using SoapClient library (it returns a string).
client.getXYZ({}, function(err, result) {
try {
if(err) { throw err; }
console.log(result);
} catch(e) {
console.log('SOAP test (::login) - ERROR: '+e.stack);
}
});
} catch(e) {
console.log('SOAP test (wsdl) - ERROR: '+e.stack);
}
});
output
/root/src/node_modules/soap/lib/wsdl.js:362
this.parts[part.$name].namespace = nsName.namespace;
^
TypeError: Cannot set property 'namespace' of undefined
at MessageElement.postProcess (/root/src/node_modules/soap/lib/wsdl.js:362:46)
at OperationElement.postProcess (/root/src/node_modules/soap/lib/wsdl.js:380:17)
at PortTypeElement.postProcess (/root/src/node_modules/soap/lib/wsdl.js:397:15)
at BindingElement.postProcess (/root/src/node_modules/soap/lib/wsdl.js:410:14)
at ServiceElement.postProcess (/root/src/node_modules/soap/lib/wsdl.js:442:21)
at /root/src/node_modules/soap/lib/wsdl.js:593:36
at WSDL._processNextInclude (/root/src/node_modules/soap/lib/wsdl.js:634:26)
at WSDL.processIncludes (/root/src/node_modules/soap/lib/wsdl.js:664:10)
at /root/src/node_modules/soap/lib/wsdl.js:588:14
at process._tickCallback (node.js:415:13)
I closed this issue as there was no activity for over a year - and also a bunch of new versions of the library were released which may now fix this issue.
If this issue still exists and you want to get it solved, feel free to reopen.