I have an array of object coming from a PHP web service which has contents like :
anyType[
objectname1{element1=1234567890; element2=test; element3=1110; element3=72.824043; },
objectname1{element1=11090999; element2=test; element3=2292; element3=72.824043; }]
I am using ksoap2 to get the webservice data in my android application.
I have tried by using the chadi cortbaoui's solution from this question but it is giving error
java.lang.ClassCastException: java.util.Vector cannot be cast to org.ksoap2.serialization.SoapObject
for line SoapObject response1 = (SoapObject) response.getProperty(0);
with following code
envelope.encodingStyle = "UTF-8";
httpTransport.debug = true;
httpTransport.call(SOAP_ACTION, envelope);
response = (SoapObject) envelope.bodyIn;
SoapObject response1 = (SoapObject) response.getProperty(0);
I have tried by using the SoapPrimitive
instead of SoapObject
also i have tried by using the envelope.getResponse()
in place of envelope.bodyIn
but it does not work it throws the same error.