Recently i came across a requirement where a SOAP based web service without having a root node has to be consumed. Below is the request payload which works using SOAPUI
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<ID>123</ID>
<Currency>USD</Currency>
</soapenv:Body>
</soapenv:Envelope>
org.springframework.ws.client.WebServiceTransformerException
exception is thrown while passing the above payload to the Apache Camel's ProducerTemplate Body(Which internally leverages on spring-ws).
org.springframework.ws.client.WebServiceTransformerException: Transformation error: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 32; The markup in the document following the root element must be well-formed.; nested exception is javax.xml.transform.TransformerException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 32; The markup in the document following the root element must be well-formed.
Would like to get some clarity on below
- Is it a standard practice to have XML payload without root node?
- SOAPUI manages to process the request and response and Spring Webservices fails, is it a limitation in Spring WS framework?
- What is the recommended solution for the same?