XmlPullParserException:期望带引号的字符串(位置:java.io.InputStreamReader@21bd4488中的DOCDECL @ 1:50)

时间:2016-11-11 07:41:43

标签: android android-ksoap2

面对以下问题:

使用以下代码:

public void APIHit() {
        String SOAP_ACTION = "http://www.myutiitsl.com/PAN_WebService/services/PANWebService";
        String METHOD_NAME = "getPanDetails";
        String NAMESPACE = "http://www.myutiitsl.com/PAN_WebService/services/";
        String URL = "http://www.myutiitsl.com/PAN_WebService/services/PANWebService";

        try {
            SoapObject Request = new SoapObject(NAMESPACE, METHOD_NAME);
            Request.addProperty("uname", "******");
            Request.addProperty("password", "******");
            Request.addProperty("pan", pancard);

            SoapSerializationEnvelope soapEnvelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
            soapEnvelope.dotNet = true;
            soapEnvelope.setOutputSoapObject(Request);

            ArrayList<HeaderProperty> headerPropertyArrayList = new ArrayList<HeaderProperty>();
            headerPropertyArrayList.add(new HeaderProperty("Connection", "close"));
            HttpTransportSE transport = new HttpTransportSE(URL);
            transport.call(SOAP_ACTION, soapEnvelope,headerPropertyArrayList); // error is coming on this line

            resultString = (SoapPrimitive) soapEnvelope.getResponse();

            Log.i(TAG, "Result Celsius: " + resultString);
        } catch (Exception ex) {
            ex.printStackTrace();

            HashMap<String ,String> map = new HashMap<String, String>();

            DefaultException.printStackTrace(ex,map,true,true);

        }
    }

此代码自4个月以来一直工作至今,我收到此错误:

XmlPullParserException: Expected a quoted string (position:DOCDECL @1:50 in java.io.InputStreamReader@21bd4488) 
11-11 12:46:18.726 1461-1651/com.app.aspirehomeloans W/System.err:     at org.kxml2.io.KXmlParser.readQuotedId(KXmlParser.java:670)
11-11 12:46:18.726 1461-1651/com.app.aspirehomeloans W/System.err:     at org.kxml2.io.KXmlParser.readExternalId(KXmlParser.java:649)
11-11 12:46:18.726 1461-1651/com.app.aspirehomeloans W/System.err:     at org.kxml2.io.KXmlParser.readDoctype(KXmlParser.java:591)
11-11 12:46:18.726 1461-1651/com.app.aspirehomeloans W/System.err:     at org.kxml2.io.KXmlParser.next(KXmlParser.java:421)
11-11 12:46:18.726 1461-1651/com.app.aspirehomeloans W/System.err:     at org.kxml2.io.KXmlParser.next(KXmlParser.java:313)
11-11 12:46:18.726 1461-1651/com.app.aspirehomeloans W/System.err:     at org.kxml2.io.KXmlParser.nextTag(KXmlParser.java:2048)
11-11 12:46:18.726 1461-1651/com.app.aspirehomeloans W/System.err:     at org.ksoap2.SoapEnvelope.parse(SoapEnvelope.java:126)
11-11 12:46:18.726 1461-1651/com.app.aspirehomeloans W/System.err:     at org.ksoap2.transport.Transport.parseResponse(Transport.java:96)
11-11 12:46:18.726 1461-1651/com.app.aspirehomeloans W/System.err:     at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:189)
11-11 12:46:18.726 1461-1651/com.app.aspirehomeloans W/System.err:     at com.app.aspirehomeloans.Fragments.SalesFragments.AadharVerification.APIHit(AadharVerification.java:590)
11-11 12:46:18.726 1461-1651/com.app.aspirehomeloans W/System.err:     at com.app.aspirehomeloans.Fragments.SalesFragments.AadharVerification$AsyncCallWS.doInBackground(AadharVerification.java:444)
11-11 12:46:18.726 1461-1651/com.app.aspirehomeloans W/System.err:     at com.app.aspirehomeloans.Fragments.SalesFragments.AadharVerification$AsyncCallWS.doInBackground(AadharVerification.java:430)
11-11 12:46:18.726 1461-1651/com.app.aspirehomeloans W/System.err:     at android.os.AsyncTask$2.call(AsyncTask.java:292)
11-11 12:46:18.726 1461-1651/com.app.aspirehomeloans W/System.err:     at java.util.concurrent.FutureTask.run(FutureTask.java:237)
11-11 12:46:18.726 1461-1651/com.app.aspirehomeloans W/System.err:     at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
11-11 12:46:18.726 1461-1651/com.app.aspirehomeloans W/System.err:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
11-11 12:46:18.726 1461-1651/com.app.aspirehomeloans W/System.err:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
11-11 12:46:18.726 1461-1651/com.app.aspirehomeloans W/System.err:     at java.lang.Thread.run(Thread.java:818)

我无法理解这个问题,因为它一直有效。

0 个答案:

没有答案