ksoap2 casting getResponse()

风流意气都作罢 提交于 2019-12-03 15:45:54

First try and see if you are getting any response.

Object obj = envelope.bodyIn; 

if this obj is not null then try the following.

SoapObject resultsRequestSOAP = (SoapObject) envelope.bodyIn;

My guess is this should work if you are getting some response.

You need to tell kSOAP what StatusSetting object is and how to convert a SOAP response to to a StatusSetting object.

Anamika

I hope this will be helpful for you:

SoapObject result = (SoapObject) envelope.bodyIn;
String response = result.getProperty(0).toString();

something like that:

SoapObject response = (SoapObject) envelope.getResponse();
   yourArray=new String[response.getPropertyCount()];

   for(int i=0;i<response.getPropertyCount();i++){    
       Object property = response.getProperty(i);
       if(property instanceof SoapObject){
           SoapObject final_object = (SoapObject) property;
           yourArray[i] = final_object.getProperty("YOUR_PROPERTY_NAME");
    }
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!