我有一个应用程序,我在.net语言中使用Soap Web-Service。我有这样的结构:
问题:响应是一个表数组。 soap对象的大小太大。当我在Web浏览器上访问Web服务时,它会显示所有数据。但是当我试图在Android应用程序中访问它时,它无法得到完整的响应。它打破了一半的反应...
<GetPickersResponse xmlns="http://tempuri.org/">
<GetPickersResult>
<Picker>
<Id>int</Id>
<StartTime>dateTime</StartTime>
<EndTime>dateTime</EndTime>
<PickerCount>int</PickerCount>
</Picker>
<Picker>
<Id>int</Id>
<StartTime>dateTime</StartTime>
<EndTime>dateTime</EndTime>
<PickerCount>int</PickerCount>
</Picker>
</GetPickersResult>
</GetPickersResponse>
</soap:Body>
</soap:Envelope>
这是我能够获取数据的代码:
HttpTransportSE androidHttpTransport = new HttpTransportSE(URL); androidHttpTransport.call(SOAP_ACTION,envelope);
![&GT; if(envelope.bodyIn instanceof SoapObject){SoapObject soapObject =
(SoapObject)envelope.bodyIn; Log.i(“SoapObject soapObject”, “” + soapObject); }]
以下是回复图片:
答案 0 :(得分:-1)
尝试这样使用;
SoapObject response = (SoapObject) envelope.getResponse();