我正在使用 KSoap 在 android 中获取 .net Web 服务。我得到了输出,但我不知道如何将该结果存储在数组中。我的代码看起来像
SoapObject request=new SoapObject(SOAP_NAMESPACE, METHOD_NAME);
request.addProperty("UId","212");
request.addProperty("verificationID","123456");
SoapSerializationEnvelope envelope=new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet=true;
envelope.setOutputSoapObject(request);
//Toast.makeText(this, "Request : "+request.getProperty(0), Toast.LENGTH_LONG).show();
HttpTransportSE httpTransport=new HttpTransportSE(SOAP_URL);
Log.v("Done", request.toString());
try {
httpTransport.call(SOAP_ACTION, envelope);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (XmlPullParserException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
try {
SoapObject response = (SoapObject) envelope.getResponse();
Toast.makeText(this, "Detail : "+response.toString(), Toast.LENGTH_LONG).show();
Log.v("RESPONSE : ", response.toString());
} catch (SoapFault e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
我得到了对象响应的全部结果,但不知道如何存储在数组中......如果有人知道,请帮助我。