Using node-soap, when making a SOAP call, the XML elements are ordered by the order I write them in the request object (which is not reliable in JavaScript - nor is it maintainable at scale over time).
I've read that in some cases the order of the elements matter and it may require to organize the XML elements in the same order that appear in the WSDL - This appear to be the my case.
Consider this example:
<Request>
<Element2>
<SubElement1>
<SubElement2>
</Element2>
<Element1>
<SubElement3>
<SubElement4>
</Element1>
</Request>
For this WSDL:
<Request>
<Element1>
<SubElement3>
<SubElement4>
</Element1>
<Element2>
<SubElement1>
<SubElement2>
</Element2>
</Request>
For this request I would get an error that <Element1>
is missing.
I could not find an option in node-soap
to force the elements order by the WSDL.
Am I missing it or is there another way around.