aspose file tools*
The moose likes Web Services and the fly likes No Deserializer found to deserialize Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "No Deserializer found to deserialize" Watch "No Deserializer found to deserialize" New topic
Author

No Deserializer found to deserialize

rajiv sarkar
Greenhorn

Joined: Dec 07, 2008
Posts: 2
Hi,
I am newbie to Apache Soap and am just trying to pass a java bean to my web service and I am getting the below error.
No Deserializer found to deserialize a 'urn:HelloWorldService:helloParam' using encoding style 'http://schemas.xmlsoap.org/soap/encoding/'.

I am using Soap 2.2 and apache tomcat 6.0.14.
I have the below deployment descriptor:
<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment" id="urn:HelloWorldService">
<isd rovider type="java" scope="Application" methods="sayHello">
<isd:java class="com.suman.soap.services.hello.HelloWorldService" static="false"/>
</isd rovider>
<isd:mappings>
<isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding"
xmlns:x="urn:HelloWorldService" qname="x:helloParam"
javaType="com.suman.soap.services.hello.Hello"
java2XMLClassName="org.apache.soap.encoding.soapenc.BeanSerializer"
xml2JavaClassName="org.apache.soap.encoding.soapenc.BeanSerializer"/>
</isd:mappings>
</isd:service>

And my client code is as follows:
String soapEndPointURL = "http://localhost:8080/SoapPractice/servlet/rpcrouter";
String serviceName = "urn:HelloWorldService";
Response resp = null;
try
{
URL url = new URL(soapEndPointURL);
SOAPMappingRegistry smr = new SOAPMappingRegistry();
BeanSerializer bs = new BeanSerializer();
QName qname = new QName(serviceName, "helloParam");
smr.mapTypes(Constants.NS_URI_SOAP_ENC, qname, Hello.class, bs, bs);
Call call = new Call();
call.setSOAPMappingRegistry(smr);
call.setTargetObjectURI(serviceName);
call.setMethodName("sayHello");
call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
Vector<Parameter> params = new Vector<Parameter>();
//Create the Hello object
Hello hello = new Hello();
hello.setFirstName("Suman");
hello.setLastName("Maity");
params.addElement(new Parameter("param",Hello.class,hello,null));
call.setParams(params);
resp = call.invoke(url, "");
}
catch(....

I have omitted rest of the error handling code.
I don't know if I am making any mistake. This is driving me crazy. Please help.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39547
    
  27
Welcome to JavaRanch.

Don't use Apache SOAP. Seriously. It's so outdated and obsolete that you can't even download it from ws.apache.org any more, and it's very unlikely that you will get answers to your questions.

If you're just starting out with web services, use Axis 2 instead (http://ws.apache.org/axis2/). The "pojo" example that comes with it demonstrates how to send a simple bean class through SOAP.


Ping & DNS - updated with new look and Ping home screen widget
rajiv sarkar
Greenhorn

Joined: Dec 07, 2008
Posts: 2
Ulif,
Thanks for the reply. I know that it is obsolete and I had to spend quite some time to download Soap. But in my project there are some web services still running on Apache Soap (Don't know why...looks like no one ever bothered to switch to axis). That's why I need to learn this (if not in detail) just to have some working knowledge so that I can take up enhancements and bug fixes in those web services.
Hence, it will be great if some one can point out at any mistake I am making in the code. This is the bare minimum code that is needed to serialize/deserialize a java bean in apache soap but still I am not able to get through it. Kindly help.
Eshwar Prasad
Ranch Hand

Joined: Mar 21, 2008
Posts: 202
Hi

I too have the same problem??

Any help??
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: No Deserializer found to deserialize
 
Similar Threads
problem with SOAP
got error when call to >net webservice from java client
No Deserializer found to deserialize
Axis SOAP return value deserialization
msg=No Deserializer found to deserialize a ':return'