我收到这样的肥皂反应......
anyType{ViewList=anyType{View=anyType{ViewList=null; ViewID=1; ViewName=pdfDB5L2; response=anyType{}; visibility=Assigned To; }; View=anyType{ViewList=null; ViewID=1; ViewName=pdfDB5L1; response=anyType{}; visibility=Assigned To; }; View=anyType{ViewList=null; ViewID=1; ViewName=pdfDB4; response=anyType{}; visibility=Assigned To; }; View=anyType{ViewList=null; ViewID=1; ViewName=pdfDB2L2; response=anyType{}; visibility=Assigned To; }; View=anyType{ViewList=null; ViewID=1; ViewName=pdfDB2; response=anyType{}; visibility=Assigned To; }; View=anyType{ViewList=null; ViewID=1; ViewName=pdfDB6; response=anyType{}; visibility=Assigned To; }; View=anyType{ViewList=null; ViewID=1; ViewName=pdfDB6L2; response=anyType{}; visibility=Assigned To; }; View=anyType{ViewList=null; ViewID=1; ViewName=pdfDB7L2; response=anyType{}; visibility=Assigned To; }; View=anyType{ViewList=null; ViewID=1; ViewName=pdfDB7L3; response=anyType{}; visibility=Assigned To; }; View=anyType{ViewList=null; ViewID=1; ViewName=pdfDB7L4; response=anyType{}; visibility=Assigned To; }; View=anyType{ViewList=null; ViewID=1; ViewName=pdfDB8L1; response=anyType{}; visibility=Assigned To; }; View=anyType{ViewList=null; ViewID=1; ViewName=pdfDB8L2; response=anyType{}; visibility=Assigned To; }; View=anyType{ViewList=null; ViewID=1; ViewName=pdfDB8L3; response=anyType{}; visibility=Assigned To; }; View=anyType{ViewList=null; ViewID=1; ViewName=pdfDB8L4; response=anyType{}; visibility=Assigned To; }; View=anyType{ViewList=null; ViewID=1; ViewName=pdfDB8L5; response=anyType{}; visibility=Assigned To; }; View=anyType{ViewList=null; ViewID=1; ViewName=pdfDB9L1; response=anyType{}; visibility=Assigned To; }; View=anyType{ViewList=null; ViewID=1; ViewName=pdfDB9L2; response=anyType{}; visibility=Assigned To; }; View=anyType{ViewList=null; ViewID=1; ViewName=pdfDB9L3; response=anyType{}; visibility=Assigned To; }; View=anyType{ViewList=null; ViewID=1; ViewName=pdfDB10L1; response=anyType{}; visibility=Assigned To; }; View=anyType{ViewList=null; ViewID=1; ViewName=pdfDB10L2; response=anyType{}; visibility=Assigned To; }; View=anyType{ViewList=null; ViewID=1; ViewName=dbpdftest2; response=anyType{}; visibility=Assigned To; }; View=anyType{ViewList=null; ViewID=1; ViewName=pdfDBT1; response=anyType{}; visibility=Assigned To; }; View=anyType{ViewList=null; ViewID=anyType{}; ViewName=pdfDB7L1; response=anyType{}; visibility=Assigned To; }; View=anyType{ViewList=null; ViewID=1; ViewName=myView; response=anyType{}; visibility=Assigned To; }; View=anyType{ViewList=null; ViewID=1; ViewName=pdfDB5L3; response=anyType{}; visibility=Assigned To; }; View=anyType{ViewList=null; ViewID=anyType{}; ViewName=pdfDM13L1; response=anyType{}; visibility=Assigned To; }; View=anyType{ViewList=null; ViewID=anyType{}; ViewName=pdfDM15L1; response=anyType{}; visibility=Assigned To; }; View=anyType{ViewList=null; ViewID=anyType{}; ViewName=pdfM15; response=anyType{}; visibility=Assigned To; }; View=anyType{ViewList=null; ViewID=1; ViewName=MandS; response=anyType{}; visibility=Assigned To; }; }; ViewID=null; ViewName=null; response=anyType{ResponseStatus=SUCCESS; }; visibility=null; }
我正在尝试从这个请求中得到这个......
try {
HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
androidHttpTransport.call(SOAP_ACTION, envelope);
SoapObject result = (SoapObject) envelope.getResponse();
if (result != null) {
System.out.println(result);
//userIsValid = parseResponse(result);
return result;
} else {
Toast.makeText(getApplicationContext(), "No Response",
Toast.LENGTH_LONG).show();
return null;
}
} catch (Exception e) {
e.printStackTrace();
return null;
}
并像这样解析肥皂对象....
private boolean parseResponse(SoapObject root) {
// TODO Auto-generated method stub
for (int i = 0; i < root.getPropertyCount(); i++) {
Object property = root.getProperty(i);
if (property instanceof SoapObject) {
SoapObject category_list = (SoapObject) property;
if (category_list.hasProperty("ResponseStatus")) {
System.out.println(category_list.getProperty("dashboardName").toString());
//}
}
}
return true;
}
但是在这里我只得到成功的响应...我想访问那里的所有值,例如 ViewName、view id 等..我该怎么做..