Leonidas-from-XIV / node-xml2js

XML to JavaScript object converter.
MIT License
4.91k stars 606 forks source link

XML Invalid Schema during parsing/validating soap xml request #656

Closed ashwinikochale closed 1 year ago

ashwinikochale commented 2 years ago

Hello Team,

I have one docker container (3rd party) running on node.js which uses this xml2js code from this git repository to parse my wsdl file , convert wsdl to XML and also use to validate my SOAP XML request against wsdl & XSD schema within container and then forward this request to another application.

My example WSDL is attched here (MpKlsIavServicewsdl.txt) . When I send soap xml ( attached soap_requestwithnestedelements.txt)request then my node.js container used to validate my soap request xml against wsdl/xsd schema & parse it.

I am sending SOAP request but I get Invalid XML Schema error. Unfortunately I do not have any knowledge about node.js and and also not having source code to change it with debug statements.

  1. Could you please guide me if there is any bug in my soap request or wsdl file ?
  2. Also can this xml2js plugin work with nested elements here? My simple request without nested elements (simple_soaprequestwithoutnestedelements.txt) is working properly and validated by this node validator plugin but when I send nested elements (by modifying wsdl accordingly) it fails with invalid xsd schema error.

I am really looking for the help on urgent base as I am not really having any deep knowledge of it.

Thank you in advance! Ashwini

simple_soaprequestwithoutnestedelements.txt soap_requestwithnestedelements.txt MpKlsIavServicewsdl.txt