I\'m trying to write a client for russian post to get track. It uses SOAP WSDL. I\'m to get at least client object.
\'use strict\'
let soap=require(\'soap\
While the above top solution does work, it's a poor solution since it defeats the whole purpose of WSDLs. SoapUI works fine with the service I'm using and this tool should be able to as well.
I ended up solving this by updating the node-soap code in node_modules\soap\lib\wsdl\elements.js
by adding the following lines after line 826: var targetNamespace = child.$targetNamespace;
:
if (!targetNamespace && child.includes && child.includes.length === 1) {
targetNamespace = child.includes[0].namespace;
}
This works if you have a schema element where the only child is an import element (see example below). May try to get a PR approved if the maintainer is up for it.
Example:
See git repo for original TS code: https://github.com/.../node-soap/.../elements.ts#L826