wood burning stoves*
The moose likes Web Services and the fly likes error in testing a ws Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "error in testing a ws" Watch "error in testing a ws" New topic
Author

error in testing a ws

angel sar
Greenhorn

Joined: Aug 29, 2009
Posts: 17
Hi. I generated a ws using ibm libraries. Also i generated a java client using ibm libraries too. It works fine. But, when i generated an axis client, i got this error:

23-oct-2009 10:12:58 org.apache.axis.client.Call invoke
SEVERE: Exception:
org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.
at org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeserializer.java:188)
at org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:893)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:200)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:684)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:241)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:265)
at org.apache.axis.client.Call.invoke(Call.java:1871)
at org.apache.axis.client.Call.invoke(Call.java:1777)
at org.apache.axis.client.Call.invoke(Call.java:1315)
at com.tdp.impl.ServicioProvisorPlantaInterna_REQRESPSOAP_HTTP_BindingStub.procesarOrdenTrabajo(ServicioProvisorPlantaInterna_REQRESPSOAP_HTTP_BindingStub.java:233)
at com.tdp.impl.ServicioProvisorPlantaInternaProxy.procesarOrdenTrabajo(ServicioProvisorPlantaInternaProxy.java:45)
at com.tdp.impl.ClientePruebaWS.main(ClientePruebaWS.java:48)
AxisFault
faultCode: {http://xml.apache.org/axis/}Server.userException
faultString: org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.
faultActor: null
faultDetail:
stackTrace: org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.
at org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeserializer.java:188)
at org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:893)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:200)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:684)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:241)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:265)
at org.apache.axis.client.Call.invoke(Call.java:1871)
at org.apache.axis.client.Call.invoke(Call.java:1777)
at org.apache.axis.client.Call.invoke(Call.java:1315)
at com.tdp.impl.ServicioProvisorPlantaInterna_REQRESPSOAP_HTTP_BindingStub.procesarOrdenTrabajo(ServicioProvisorPlantaInterna_REQRESPSOAP_HTTP_BindingStub.java:233)
at com.tdp.impl.ServicioProvisorPlantaInternaProxy.procesarOrdenTrabajo(ServicioProvisorPlantaInternaProxy.java:45)
at com.tdp.impl.ClientePruebaWS.main(ClientePruebaWS.java:48)


org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.
at org.apache.axis.AxisFault.makeFault(AxisFault.java:120)
at org.apache.axis.client.Call.invoke(Call.java:1874)
at org.apache.axis.client.Call.invoke(Call.java:1777)
at org.apache.axis.client.Call.invoke(Call.java:1315)
at com.tdp.impl.ServicioProvisorPlantaInterna_REQRESPSOAP_HTTP_BindingStub.procesarOrdenTrabajo(ServicioProvisorPlantaInterna_REQRESPSOAP_HTTP_BindingStub.java:233)
at com.tdp.impl.ServicioProvisorPlantaInternaProxy.procesarOrdenTrabajo(ServicioProvisorPlantaInternaProxy.java:45)
at com.tdp.impl.ClientePruebaWS.main(ClientePruebaWS.java:48)
Caused by: org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.
at org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeserializer.java:188)
at org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:893)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:200)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:684)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:241)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:265)
at org.apache.axis.client.Call.invoke(Call.java:1871)
... 5 more

This is my wsdl :
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://impl.tdp.com/ws/messages" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://impl.tdp.com/ws/messages" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:documentation>
<wsdl:appinfo source="WMQI_APPINFO">
<MRWSDLAppInfo imported="true">
<binding hasEncoding="false" imported="true" name="ServicioProvisorPlantaInterna_REQRESPSOAP_HTTP_Binding" originalBindingStyle="document"/>
</MRWSDLAppInfo>
</wsdl:appinfo>
</wsdl:documentation>
<wsdl:types>
<xsd:schema xmlns:mrm="http://impl.tdp.com/ws/messages" targetNamespace="http://impl.tdp.com/ws/messages" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:include schemaLocation="ws/messages/MSG_ORDTRABXML_REQRESP.xsd"/>
</xsd:schema>
</wsdl:types>

<wsdl:message name="procesarOrdenTrabajo_in">
<wsdl:part element="tns:TdPRq" name="TdPRq"/>
</wsdl:message>
<wsdl:message name="procesarOrdenTrabajo_out">
<wsdl:part element="tns:TdPRs" name="TdPRs"/>
</wsdl:message>

<wsdl:portType name="ServicioProvisorPlantaInterna">
<wsdlperation name="procesarOrdenTrabajo">
<wsdl:input message="tns:procesarOrdenTrabajo_in" name="procesarOrdenTrabajo_Input"/>
<wsdlutput message="tns:procesarOrdenTrabajo_out" name="procesarOrdenTrabajo_Output"/>
</wsdlperation>
</wsdl:portType>

<wsdl:binding name="ServicioProvisorPlantaInterna_REQRESPSOAP_HTTP_Binding" type="tns:ServicioProvisorPlantaInterna">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdlperation name="procesarOrdenTrabajo">
<soapperation/>
<wsdl:input name="procesarOrdenTrabajo_Input">
<soap:body parts="TdPRq" use="literal"/>
</wsdl:input>
<wsdlutput name="procesarOrdenTrabajo_Output">
<soap:body parts="TdPRs" use="literal"/>
</wsdlutput>
</wsdlperation>
</wsdl:binding>

<wsdl:service name="ServicioProvisorPlantaInterna_REQRESPSOAP_HTTP_Service">
<wsdl:port binding="tns:ServicioProvisorPlantaInterna_REQRESPSOAP_HTTP_Binding" name="ServicioProvisorPlantaInterna">
<soap:address location="http://localhost:9080/PruebasWS/services/ServicioProvisorPlantaInterna"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

Its running on a was 6.0.
I was looking for a solution but all said that i check my wsdl again. I did it many times but i have not got a solution. Hope you can help me. thanks
angel sar
Greenhorn

Joined: Aug 29, 2009
Posts: 17
Any ideas? any help? Is it an error to generate a client using a diferent library?
Please I need your help.
Thanks.
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
angel sar wrote:Any ideas? any help? Is it an error to generate a client using a diferent library?

Well, you can try that yourself by using, for instance, wsimport in the Java 6 JDK.
Best wishes!


My free books and tutorials: http://www.slideshare.net/krizsan
Jive Tugade
Greenhorn

Joined: Jul 25, 2009
Posts: 2

what
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: error in testing a ws