Hi,

I have created a web-service using axis 1.2 and deployed it on a server.
When I make test calls to this web-service using java code, I get proper
results.

Following is the java code that I use to call the web-service:

           String endpoint = "http://wstest.com/axis/services/testservices";; 
           Service  service = new Service();
           Call call = (Call)service.createCall();

           call.setTargetEndpointAddress( new java.net.URL(endpoint) );
           call.setOperationName(new QName("urn:TestUrn" ,
"TestSearchMethod" ));
           String sResultantXML = (String)call.invoke( new Object[] {
sRequestXML } ); 


But, when the same web-service is being called using "wfetch" it returns the
following error 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><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><ns1:hostname
xmlns:ns1="http://xml.apache.org/axis/";>esrv2</ns1:hostname></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>


The soap request used in wfetch is as follows:

<?xml version="1.0" encoding="utf-8"?>\r\n
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>\r\n
<soap:Body>\r\n
<Root>
     <Child1>\r\n
         <Child2/>\r\n
      </Child1>\r\n 
</Root>
</soap:Body>\r\n
</soap:Envelope>\r\n

I think that the problem is because of the "\r\n" occurances in the Soap
Request xml.

I have searched on the net regarding this issue but have not come across a
valid solution for this.

I will be thankful if anyone can help.

Thanks.




-- 
View this message in context: 
http://www.nabble.com/SimpleDeserializer-encountered-a-child-element%2C-which-is-NOT-expected%2C-in-something-it-was-trying-to-deserialize.-tp15735525p15735525.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to