Skip to content Skip to sidebar Skip to footer

Xmlpullparserexception: Expected A Quoted String(position:docdecl @1:62 In Java.io.inputstreamreader)

Code: SoapObject request = new SoapObject(NAMESPACE, SOAP_METHOD_GETDATATBL); request.addProperty('TName', ttnm); request.addProperty('ColumnNa

Solution 1:

The Problem was in internet Security.. due to set Firewall in internet or Proxy, i couldn't connect that webservice which was in server side.

Solution 2:

In my case that error arose because of a change in URL from http to https. Hence, you may want to ensure you are getting a response code 200 before processing the response.

Solution 3:

Try below code..

    HttpTransportSE transporter;
    SoapSerializationEnvelope envelope;
    SoapObject mSoapObject = null;
    String METHOD_NAME = getString(R.string.soap_method_authentication);
    try {

        mSoapObject = new SoapObject(getString(R.string.soap_namespace),METHOD_NAME);
        mSoapObject.addProperty("TName", "test");
        mSoapObject.addProperty("ColumnNameStr", "*");


        transporter = new HttpTransportSE(getString(R.string.soap_main_url));
        envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
        envelope.dotNet = true;
        envelope.setOutputSoapObject(mSoapObject);
        transporter.call(getString(R.string.soap_namespace) + METHOD_NAME, envelope);


        SoapObject response = (SoapObject) envelope.bodyIn;
        System.out.println("Response : " + response);

    } catch (Exception e) {
        mTextView.setText("Error...");
        e.printStackTrace();
    }

String.xml

<string name="soap_main_url">your_main_url</string>
<string name="soap_namespace">http://tempuri.org/GetDataTbl/</string>
<string name="soap_method_authentication">GetDataTbl</string>

Solution 4:

Something similar happened to me, use

envelope = new SoapSerializationEnvelope (SoapEnvelope.VER12); 

and it worked,

Post a Comment for "Xmlpullparserexception: Expected A Quoted String(position:docdecl @1:62 In Java.io.inputstreamreader)"