最近,我遇到了一个要求,即必须使用没有根节点的基于SOAP的Web服务。 以下是使用 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>
在将上述有效负载传递给Apache Camel的ProducerTemplate主体(内部在spring-ws上使用)时,引发 org.springframework.ws.client.WebServiceTransformerException
异常。
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.
想在下面弄清楚