是#39;来自SOAP服务的响应被破坏了

时间:2014-05-22 10:05:20

标签: android soap android-ksoap2

在我的应用程序中,我使用过SOAP服务,我的问题是我没有收到服务的完整字符串响应。如何从SOAP服务获取完整的字符串(大量数据)或响应。

任何人帮助我。提前谢谢。

SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
        request.addProperty("customerId", "21738");
        request.addProperty("key", Global.KEY);

        SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
                SoapEnvelope.VER11);
        envelope.dotNet = true;
        envelope.setOutputSoapObject(request);

        // Make the soap call.
        HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
        /*StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder()
                .permitAll().build();

        StrictMode.setThreadPolicy(policy);*/
        try {

            // this is the actual part that will call the webservice
            androidHttpTransport.call(SOAP_ACTION, envelope);
        } catch (Exception e) {
            e.printStackTrace();
        }

        // Get the SoapResult from the envelope body.
        SoapObject result = (SoapObject) envelope.bodyIn;

0 个答案:

没有答案