Dear all, I want to put a XML directly in the SOAP Body and to take it.
Appearing below is WSDL and SOAP message of my implemented a simple service that a client send a document (DOM Object) and a server return it. WSDL ------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions name="EchoService" targetNamespace="http://sample.service.com" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://sample.service.com" xmlns:intf="http://sample.service.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://sample.service.com" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing" xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd" xmlns:wsrpw="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.wsdl" xmlns:wsdlpp="http://www.globus.org/namespaces/2004/10/WSDLPreprocessor"> <!--========== IMPORT ==========--> <wsdl:import namespace="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.wsdl" location="../wsrf/properties/WS-ResourceProperties.wsdl" /> <wsdl:import namespace="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.wsdl" location="../wsrf/lifetime/WS-ResourceLifetime.wsdl" /> <wsdl:import namespace="http://docs.oasis-open.org/wsrf/2004/06/wsn-WS-BaseNotification-1.2-draft01.wsdl" location="../wsrf/notification/WS-BaseN.wsdl" /> <!-- ==================== TYPE ==================== --> <types> <xsd:schema targetNamespace="http://sample.service.com" xmlns:tns="http://sample.service.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <import namespace="http://xml.apache.org/xml-soap"/> <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/> <xsd:element name="requestDocument" type="apachesoap:Document"/> <xsd:element name="responseDocument" type="apachesoap:Document"/> </xsd:schema> </types> <!--========== MESSAGE ==========--> <wsdl:message name="ReturnDocumentRequestInputMessage"> <wsdl:part name="reqDocument" element="tns:requestDocument"/> </wsdl:message> <wsdl:message name="ReturnDocumentResponseOutputMessage"> <wsdl:part name="resDocument" element="tns:responseDocument"/> </wsdl:message> <!--========== PROT TYPE ==========--> <wsdl:portType name="EchoService"> <wsdl:operation name="returnDocument"> <wsdl:input message="tns:ReturnDocumentRequestInputMessage"/> <wsdl:output message="tns:ReturnDocumentResponseOutputMessage"/> </wsdl:operation> </wsdl:portType> </wsdl:definitions> ------------------------------------------------------------------------------------------- SOAP Message ------------------------------------------------------------------------------------------- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <ns2:requestDocument xmlns="http://sample.service.com" xmlns:ns1="http://xml.apache.org/xml-soap" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:Document" xmlns:ns2="http://sample.service.com"> <ns3:SalesList xmlns="com:service:sample" xmlns:ns3="com:service:sample"> <ns3:car> <ns3:color>RED</ns3:color> <ns3:price>20000</ns3:price> </ns3:car> </ns3:SalesList> </ns2:requestDocument> </soapenv:Body> </soapenv:Envelope> ------------------------------------------------------------------------------------------- But I want to do as follows. ------------------------------------------------------------------------------------------- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <ns3:SalesList xmlns="com:service:sample" xmlns:ns3="com:service:sample"> <ns3:car> <ns3:color>RED</ns3:color> <ns3:price>20000</ns3:price> </ns3:car> </ns3:SalesList> </soapenv:Body> </soapenv:Envelope> ------------------------------------------------------------------------------------------- How do I should do? thanks.
