At 03:55 PM 8/27/2003 -0400, you wrote:
Hi, I've just started using AXIS and I'm trying to write an AXIS interface to a Java method with the following signature:
public Document process(Document doc)
where Document is of course the W3C DOM Document...
I realize this is the "message" style, but I'm not allowed to use it since I have to create a WSDL file for the SOAP call. Thus, I figured I'd use "document" style. I make the call successfully according to tcpmon, but then I get the SAX SimpleDeserializer error (I've seen several discussions about it...).
Is there an example or any help someone can give me?
WSDL: <?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions targetNamespace="urn:StageTwo" xmlns:impl="urn:StageTwo" xmlns:intf="urn:StageTwo" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns2="http://merge.metadata.jivanet.net" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://schemas.xmlsoap.org/wsdl/"> <wsdl:types> <xsd:schema targetNamespace="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <xsd:element name="RDF"> <xsd:complexType> <xsd:sequence> <xsd:any/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema> </wsdl:types>
<wsdl:message name="processResponse"> <wsdl:part name="processReturn" element="rdf:RDF"/> </wsdl:message>
<wsdl:message name="processRequest"> <wsdl:part name="in0" element="rdf:RDF"/> </wsdl:message>
<wsdl:portType name="StageTwo"> <wsdl:operation name="process" parameterOrder="in0"> <wsdl:input name="processRequest" message="impl:processRequest"/> <wsdl:output name="processResponse" message="impl:processResponse"/> </wsdl:operation> </wsdl:portType>
<wsdl:binding name="StageTwoSoapBinding" type="impl:StageTwo"> <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="process"> <wsdlsoap:operation soapAction=""/> <wsdl:input name="processRequest"> <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:StageTwo"/> </wsdl:input> <wsdl:output name="processResponse"> <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:StageTwo"/> </wsdl:output> </wsdl:operation> </wsdl:binding>
<wsdl:service name="StageTwoService"> <wsdl:port name="StageTwo" binding="impl:StageTwoSoapBinding"> <wsdlsoap:address location="http://usajopa:8090/axis/services/StageTwo"/> </wsdl:port> </wsdl:service>
</wsdl:definitions>
Deployment Descriptor: <deployment name="JIVA_Stage2" xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java" xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"> <service name="StageTwo" style="document"> <parameter name="className" value="net.jivanet.metadata.merge.stage2.StageTwo"/> <parameter name="allowedMethods" value="process"/> </service> </deployment>
Error: HTTP/1.1 500 Internal Server Error Content-Type: text/xml; charset=utf-8 Date: Wed, 27 Aug 2003 18:45:41 GMT Server: Apache Coyote/1.0 Connection: close <?xml version="1.0" encoding="UTF-8"?> <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> <soapenv:Fault> <faultcode>soapenv:Server.userException</faultcode> <faultstring>org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.</faultstring> <detail/> </soapenv:Fault> </soapenv:Body> </soapenv:Envelope>
Mnay thanks! Joel Patterson