We're using node-soap to create a SOAP client to interact with an external web service.
Although we include the wsdls which contain a full schema, no validation is being done on the requests. Unfortunately the external server's error message when the validation fails is not helpful at all.
Is there a way to validate the request against the schema defined in the wsdl using node-soap? Or do I have to use something like libxml-xsd and do the validation myself?
According to this question, the client has a "Validate" method, but it doesn't appear to in the latest version.
There appears to be an option called 'returnFault' used during client creation to validate requests against a wsdl. I've tracked it to wsdl.js, and it does seem to be used to validate against the wsdl. However, I can't get it to throw an error for invalid options, and like you, my server error is less than helpful.
Unfortunately, I think this is a bug in node-soap.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With