lula / ngx-soap

Simple SOAP client for Angular
MIT License
66 stars 61 forks source link

Cannot send the xsi:type for XML element in soap request body #38

Open saumyagaharwar opened 5 years ago

saumyagaharwar commented 5 years ago

Body for Soap Request

const body = { ControlServiceRequest : { "NodeName" : "ucbu-aricent-vm200", "ControlType" : "Stop", "ServiceList xsi:type=\"con:ArrayOfServices\" ": this.arrItem } };

I need to provide this in body else it throws "org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.
at org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeserializer.java:145) at org.apache.axis.encoding.DeserializationContext.startElement"

However as per implementation, it adds the xsi:type to both opening and closing XML tags. This is verified by intercepting the request:

Here's the request, if I modify it and remove xsi:type from closing tag and forward it, it is successfully returning 200 OK response. request