Casting A Soap Object To A Own Object
Can I cast a SoapObject to a predefined java object?. I use ksoap2 I am trying to do it inside an AsncTask class and this is my code segment. I have created a class called Citizen.
Solution 1:
No experience with this but when I read the javadoc of SoapObject it looks like your Citizen class must implement the KvmSerializable
interface so you can:
KvmSerializable result= (KvmSerializable)envelope.getResponse();
citizen = (Citizen)result;
or why not directly:
citizen = (Citizen) envelope.getResponse();
Post a Comment for "Casting A Soap Object To A Own Object"