Yes you can do it as:
if your response is as similar as:
anyType{
StatusSetting=anyType{Id=1; Name=Til afskrivning; LocationId=1; Editable=true; Default=true; Transcribed=false; };
StatusSetting=anyType{Id=2; Name=Afskrevet; LocationId=1; Editable=false; Default=false; Transcribed=true; };
...
}
Then you have to do like:
SoapObject countryDetails = (SoapObject)envelope.getResponse();
System.out.println(countryDetails.toString());
ArrayList list = new ArrayList(countryDetails.getPropertyCount());
lv_arr = new String[countryDetails.getPropertyCount()];
for (int i = 0; i < countryDetails.getPropertyCount(); i++) {
object property = countryDetails.getProperty(i);
if (property instanceof SoapObject) {
SoapObject countryObj = (SoapObject) property;
String countryName = countryObj.getProperty("countryName").toString();
list.add(countryName );
}
}
If you can understand by this example, let me know; otherwise, I will send you the parsing code of data of your response.
OR other as:
You can get XML response from soap object by just adding the:
androidHttpTransport.debug = true;
before the call as:
androidHttpTransport.call(SOAP_ACTION, envelope);
and add:
String xml = androidHttpTransport.responseDump;
after the call.
And you will get the XML out put in string XML. So you can parse it using any (DOM, xmlpull or SAX) parser.
You can follow the following code to achieve the task:
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
// Add the input required by web service
request.addProperty("city","chennai");
request.addProperty("key","10000");
SoapSerializationEnvelope envelope =new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.setOutputSoapObject(request);
// Make the soap call.
androidHttpTransport.call(SOAP_ACTION, envelope);
// Get the SoapResult from the envelope body.
resultRequestSOAP = (SoapObject) envelope.bodyIn;
System.out.println("********Response : "+resultRequestSOAP.toString());
SoapObject root = (SoapObject) resultRequestSOAP.getProperty(0);
SoapObject s_deals = (SoapObject) root.getProperty("FOO_DEALS");
StringBuilder stringBuilder = new StringBuilder();
System.out.println("********Count : "+ s_deals.getPropertyCount());
for (int i = 0; i < s_deals.getPropertyCount(); i++)
{
Object property = s_deals.getProperty(i);
if (property instanceof SoapObject)
{
SoapObject category_list = (SoapObject) property;
String CATEGORY = category_list.getProperty("CATEGORY").toString();
String CATEGORY_URL = category_list.getProperty("CATEGORY_URL").toString();
String CATEGORY_ICON = category_list.getProperty("CATEGORY_ICON").toString();
String CATEGORY_COUNT = category_list.getProperty("CATEGORY_COUNT").toString();
String SUPERTAG = category_list.getProperty("SUPERTAG").toString();
String TYPE = category_list.getProperty("TYPE").toString();
stringBuilder.append
(
"Row value of: " +(i+1)+"\n"+
"Category: "+CATEGORY+"\n"+
"Category URL: "+CATEGORY_URL+"\n"+
"Category_Icon: "+CATEGORY_ICON+"\n"+
"Category_Count: "+CATEGORY_COUNT+"\n"+
"SuperTag: "+SUPERTAG+"\n"+
"Type: "+TYPE+"\n"+
"******************************"
);
stringBuilder.append("\n");
}
}