• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
SAM KUMAR
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Siripa Siangklom
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
as no deserializer existed then to deserialize a null reference.

 
SAM KUMAR
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic