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 SOAPException (SOAP-ENV:Client): No Deserializer found Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "SOAPException (SOAP-ENV:Client): No Deserializer found " Watch "SOAPException (SOAP-ENV:Client): No Deserializer found " New topic
Author

SOAPException (SOAP-ENV:Client): No Deserializer found

SAM KUMAR
Greenhorn

Joined: Jan 02, 2002
Posts: 25
Hi,
I am new to webservice and trying to execute temperature webservice provided by xmethods.net but I am getting following error:
Caught SOAPException (SOAP-ENV:Client): No Deserializer found to deserialize a ':return' using encoding style 'http://schemas.xmlsoap.org/soap/encoding/'.
Here is the code snippet:
URL url = null;
String name = null;
url = new URL("http://services.xmethods.net:80/soap/servlet/rpcrouter");
name = args[0];
// Build the call.
Call call = new Call();
call.setTargetObjectURI("urn:xmethods-Temperature");
call.setMethodName("getTemp");
call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
Vector params = new Vector();
params.addElement(new Parameter("zipcode", String.class, name, null));
call.setParams(params);
// Invoke the call.
Response resp = null;
try
{
resp = call.invoke(url, "");
}
catch( SOAPException e )
{
System.err.println("Caught SOAPException (" + e.getFaultCode() + "): " + e.getMessage());
System.exit(-1);
}

// Check the response.
if( !resp.generatedFault() )
{
Parameter ret = resp.getReturnValue();
Object value = ret.getValue();
System.out.println(value);
}
else
{
Fault fault = resp.getFault();
System.err.println("Generated fault: ");
System.out.println (" Fault Code = " + fault.getFaultCode());
System.out.println (" Fault String = " + fault.getFaultString());
}

Any help is highly appreciated.
Thanks in advance.
Sam
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
Can you post the link for WSDL.
Are you using Apache's WSDL2Java, if so the i guess there is some problem while geneating the codes, re-run it and try again.


Spritle Software Blogs
Siripa Siangklom
Ranch Hand

Joined: Jan 26, 2004
Posts: 79
Hi
In Apache SOAP 2.1, sending vectors with null members caused a SOAPException, as no deserializer existed then to deserialize a null reference.
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

as no deserializer existed then to deserialize a null reference.



Groovy
SAM KUMAR
Greenhorn

Joined: Jan 02, 2002
Posts: 25
Hi:
Thanks for your reply.
Here is the link for WSDL:
http://www.xmethods.net/sd/2001/TemperatureService.wsdl
I did not used WSDL2JAVA to generate the Client, instead I downloaded from following location:
http://www.xmethods.net/download/servicefiles/TempClient.java
Thanks in advance.
Sam
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SOAPException (SOAP-ENV:Client): No Deserializer found