Re: Ksoap: help in de-serializing
"Naresh Malhotra" <[email protected]> Mon, 02 Jun 2003 15:41:24 -0400
| Newsgroups | gmane.comp.java.enhydra.ksoap |
|---|---|
| Message-ID | <[email protected]> |
Thanks for getting back to me but I managed to solve it and yes.. there was something wrong with the namespace.... Now that I am on it.. let me ask you another question... I have a 2 dim array which I can not really de-serialize... and when I was trying to solve it... I read somewhere that ksoap does not handle 2 dim arrays.. is that right? What does the future hold on 2 dim array for a wireless soap based client.. I just tried browsing jsr 172 and I dont see that being the case as per the specs...unless I missed. In other words according to jsr-172 specs a wireless soap client should be able to handle it... your thoughts ? >From: [email protected] >Reply-To: [email protected] >To: [email protected] >Subject: Re: Ksoap: help in de-serializing >Date: Mon, 2 Jun 2003 09:33:57 +0200 > >Hi, > >I may be mistaking but : >- this construction may imply that CWWord KVMSerializable. If it still >does not work, you can try to write a marshaller. > >- your namespace declaration looks weird : >classMap.addMapping("ns1:getCWWordResponse", "CWWord", new >CWWord().getClass()); > >I guess it should be instead : >classMap.addMapping("tns:CWService", "CWWord", new CWWord().getClass()); > >Hope it helps, >Sebastien. > > > > > > > > > > > >"Naresh Malhotra" <[email protected]> >Sent by: >[email protected] >2003-05-28 21:53 >Please respond to ksoap > > > To: [email protected] > cc: (bcc: Sebastien Petrucci/LEU/COMP/PHILIPS) > Subject: Ksoap: help in de-serializing > Classification: > > > >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 > >_______________________________________________ >Ksoap mailing list >[email protected] >http://www.enhydra.org/mailman/listinfo.cgi/ksoap > > > >_______________________________________________ >Ksoap mailing list >[email protected] >http://www.enhydra.org/mailman/listinfo.cgi/ksoap _________________________________________________________________ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail