File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes org.xml.sax.SAXException: SimpleDeserializer encountered a child element Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "org.xml.sax.SAXException: SimpleDeserializer encountered a child element" Watch "org.xml.sax.SAXException: SimpleDeserializer encountered a child element" New topic
Author

org.xml.sax.SAXException: SimpleDeserializer encountered a child element

Madhu
Greenhorn

Joined: Dec 11, 2000
Posts: 16
Hi,
I'm trying to run a HelloWorld web service using Apache Axis 1.2 on WSAD 5.1.2.

I've exposed a method which takes a String argument and prints it to the console..The method does not return anything..

The following is the wsdl and wsdd..

<wsdl:types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://myaxis.server.com" elementFormDefault="qualified">
<element name="in0" type="xsd:string"/>
</schema>
</wsdl:types>
<wsdl:message name="sayHelloResponse">
</wsdl:message>
<wsdl:message name="sayHelloRequest">
<wsdl art name="in0" element="impl:in0"/>
</wsdl:message>
<wsdl ortType name="HelloAxisSEI">
<wsdl peration name="sayHello" parameterOrder="in0">
<wsdl:input name="sayHelloRequest" message="impl:sayHelloRequest"/>
<wsdl utput name="sayHelloResponse" message="impl:sayHelloResponse"/>
</wsdl peration>
</wsdl ortType>
<wsdl:binding name="HelloServiceSoapBinding" type="impl:HelloAxisSEI">
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl peration name="sayHello">
<wsdlsoap peration soapAction=""/>
<wsdl:input name="sayHelloRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl utput name="sayHelloResponse">
<wsdlsoap:body use="literal"/>
</wsdl utput>
</wsdl peration>
</wsdl:binding>
<wsdl:service name="HelloAxisSEIService">
<wsdl ort name="HelloService" binding="impl:HelloServiceSoapBinding">
<wsdlsoap:address location="http://localhost:9080/axis-war/services/HelloService"/>
</wsdl ort>
</wsdl:service>
</wsdl efinitions>


WSDD

<deployment xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">

<service name="HelloService" provider="java:RPC" style="document" use="literal">
<parameter name="wsdlServiceElement" value="HelloAxisSEIService"/>
<parameter name="wsdlServicePort" value="HelloService"/>
<parameter name="wsdlPortType" value="HelloAxisSEI"/>
<operation name="sayHello" qname="q0:sayHello"
soapAction="" xmlns:q0="http://myaxis.server.com"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<parameter qname="q0:in0" type="xsd:string"/>
</operation>
<parameter name="className" value="com.myaxis.HelloAxisImpl"/>
<parameter name="allowedMethods" value="sayHello"/>
<parameter name="wsdlTargetNamespace" value="http://myaxis.server.com"/>
</service>
</deployment>

And the JSP client code...

<%
org.apache.axis.client.Service s = new org.apache.axis.client.Service();
org.apache.axis.client.Call c = (org.apache.axis.client.Call) s.createCall();
c.setTargetEndpointAddress("http://localhost:9080/axis-war/services/HelloService");
c.setOperationName("sayHello");

try {
c.invoke(new Object[] {"Hello"});
} catch (Exception e) {
e.printStackTrace();
}
%>

The following exception is thrown if I try accessing the service..

org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.

Could anyone pls let me know the problem?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: org.xml.sax.SAXException: SimpleDeserializer encountered a child element
 
Similar Threads
adding new operation in web service interface
Please Help to write client for Webservice
Deserializing parameter 'empRequest'
WSDL generation issue for the same webservice deployment
Axis and document-literal style