SAXException: SimpleDeserializer encountered a child element

Hello,

I am trying to call an externally hosted (outside IS6.5) web service. I created WS using the web service connector and the wsdl. When I run this service the soap fault is retured with below message…
org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.
AND
org.xml.sax.SAXParseException: The processing instruction target matching “[xX][mM][lL]” is not allowed.

The external web service takes string input and I pass below xml to it…

<?xml version="1.0" encoding="UTF-8"?> RequestStart some unique id true The above xml string is inside the soap-body while sending... Also the the external web service is using SOAP-MSG protocol... Any ideas why is the soapfault...? thanks for any reply...

Bipin

Try removing processing instruction from the beginning of your string:

 
<?xml version="1.0" encoding="UTF-8"?>

Hello Mcarlson,
I tried removing the xml tag but I get this soap fault…
org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize…and it is thrown as 500-Internal Server error from the target websphere server…

Whatever XML string you are sending contains elements that the service is not expecting. This behavior is one reason why sending XML documents inside a string variable is a Bad Idea. Without a schema definition to tell you what to send, you have no way of using the WSDL to determine what the service expects. In other words, the provided WSDL is a completely inadequate description of the Service.

You will have to contact the provider of the Service to provide examples or other supporting documentation to make up for the lack of an adequate WSDL.

Mark

Hello Mark,
I agree what you said…and the WM makes a successful call when I pass a plain string…and fails whenever xml is passed…But on the other hand the same web service when invoked through another tool…passing same xml…makes a successful call…also the SOAP envelope generated by WM and another tool…looks different…
So now the question is why does WM validates the SOAP body…Also is there any mechanism to turn off this validate in WM?
Thanks for all you suggestions…
Bipin