Skip to content Skip to sidebar Skip to footer

Android Java.lang.runtimeexception: Illegal Property: While Getting The String From Soap Object(ksoap2)

I want to get the values from the SOAPObject, as below anyType{ Message=anyType{}; ErrorCode=NoError; ImageStatus=anyType{ ImageTicket=3432

Solution 1:

Thanks for your reply @Selvin

My final code is

SoapObjectresultBody= (SoapObject) soapEnvelope.bodyIn;

SoapObjectbody= (SoapObject) resultBody.getProperty(0);

SoapObjectstatusObject= (SoapObject) body.getProperty("ImageStatus");// added this
customerImageId = body.getProperty("CustomerImageId").toString(); exception
Constants.StatusId = body.getProperty("StatusId").toString();
thumbnailImageURL = body.getProperty("ThumbnailImageURL").toString();
isPaid = body.getProperty("IsPaid").toString();

Solution 2:

CustomerImageId,StatusId, etc are children of ImageStatus, not direct property of anyType. So access these via object of ImageStatus.

Post a Comment for "Android Java.lang.runtimeexception: Illegal Property: While Getting The String From Soap Object(ksoap2)"