help in de-serializing
"Naresh Malhotra" <[email protected]> Wed, 28 May 2003 15:53:34 -0400
| Newsgroups | gmane.comp.java.enhydra.ksoap |
|---|---|
| Message-ID | <[email protected]> |
I have not been able to de-serialize a web service xml output into a java
object.
Any help in the right direction would be appreciated.
Executing a transport.call(SoapObject) is returning a SoapObject
successfully.
What all do I need to do make the same call return my Java Object.
Here is what is working...
transport = new
HttpTransportSE ("http://localhost:8080/axis/services/DictCWWS",
"tns:CWService#getCWWord" );
transport.debug = true;
SoapObject rpc = new SoapObject("tns:CWService", "getWord");
SoapObject obj = (SoapObject)transport.call(rpc);
System.out.println("toString : " + obj.toString());
System.out.println("property count : " + obj.getPropertyCount());
and the following code DOES NOT work
transport = new HttpTransportSE
( "http://localhost:8080/axis/services/DictCWWS",
"tns:CWService#getCWWord" );
transport.debug = true;
classMap = new ClassMap(true);
classMap.addMapping("ns1:getCWWordResponse", "CWWord", new
CWWord().getClass());
transport.setClassMap( classMap );
CWWord cwWord = (CWWord) transport.call(rpc);
I am getting a class cast exception on the above line...
1. Is there anything dumb I am doing in the addMapping call ?
2. CWWord.class which is in my classpath... does it have to implment
KVMSeri.... interface.. I think I have even tried that without success.
Please help!
- Naresh
_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963