Hi, I'm presently working on a web services implementation in which it is required that the Client must send a xml document as the request payload. I'm using the SOAP UI to send the request and get the response. How to include the xml file in the SOAP request? What should be the parameter type in the service method? The response payload is also an xml.
posted 7 years ago
In WSDL the presence of a generic XML document is flagged with the "xsd:anyType" (Mapping XML document to xsd:anyType) or "xsd:any". Under JAX-RPC 1.1 "xsd:any" automatically maps to javax.xml.soap.SOAPElement from which you can extract your org.w3c.dom.Document (which is a org.w3c.dom.Node) for incoming XML. For outgoing XML you simply populate the javax.xml.soap.SOAPElement parameter/return value with your org.w3c.dom.Document.