Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there schema validation in node-soap?

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.

like image 735
Hannesh Avatar asked Oct 29 '22 23:10

Hannesh


1 Answers

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.

like image 126
opensourcejunkie Avatar answered Nov 09 '22 11:11

opensourcejunkie