XmlpullparserException: Expected a quoted String(position:DOCDECL @1:62 in java.io.Inputstreamreader)

后端 未结 4 1776
面向向阳花
面向向阳花 2021-01-29 07:32

Code:

            SoapObject request = new SoapObject(NAMESPACE, SOAP_METHOD_GETDATATBL);

            request.addProperty(\"TName\", ttnm);
            request.         


        
4条回答
  •  醉话见心
    2021-01-29 08:19

    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

    your_main_url
    http://tempuri.org/GetDataTbl/
    GetDataTbl
    

提交回复
热议问题