• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

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

 
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
 
author and deputy
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.
 
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.
 
Ranch Hand
Posts: 8943
Firefox Browser Spring Java
  • 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
 
Getting married means "We're in love, so let's tell the police!" - and invite this tiny ad to the wedding:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic