• Post Reply Bookmark Topic Watch Topic
  • New Topic

No Deserializer found to deserialize  RSS feed

rajiv sarkar
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding"
xmlns:x="urn:HelloWorldService" qname="x:helloParam"

And my client code is as follows:
String soapEndPointURL = "http://localhost:8080/SoapPractice/servlet/rpcrouter";
String serviceName = "urn:HelloWorldService";
Response resp = null;
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();
Vector<Parameter> params = new Vector<Parameter>();
//Create the Hello object
Hello hello = new Hello();
params.addElement(new Parameter("param",Hello.class,hello,null));
resp = call.invoke(url, "");

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
Posts: 42970
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
rajiv sarkar
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Skanda Raman
Ranch Hand
Posts: 205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I too have the same problem??

Any help??
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!