代码:
SoapObject request = new SoapObject(NAMESPACE, SOAP_METHOD_GETDATATBL);
request.addProperty("TName", ttnm);
request.addProperty("ColumnNameStr", "*");
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.setOutputSoapObject(request);
HttpTransportSE aht = new HttpTransportSE(URL1, 60000);
aht.call(SOAP_ACTION_GETDATATBL, envelope);
SoapObject response = (SoapObject) envelope.bodyIn;
System.out.println("Response : " + response);
日志猫:
08-16 12:33:11.000: W/System.err(30741): org.xmlpull.v1.XmlPullParserException: Expected a quoted string (position:DOCDECL @1:62 in java.io.InputStreamReader@40912548)
08-16 12:33:11.000: W/System.err(30741): at org.kxml2.io.KXmlParser.readQuotedId(KXmlParser.java:664)
08-16 12:33:11.000: W/System.err(30741): at org.kxml2.io.KXmlParser.readExternalId(KXmlParser.java:643)
08-16 12:33:11.000: W/System.err(30741): at org.kxml2.io.KXmlParser.readDoctype(KXmlParser.java:585)
08-16 12:33:11.010: W/System.err(30741): at org.kxml2.io.KXmlParser.next(KXmlParser.java:418)
08-16 12:33:11.010: W/System.err(30741): at org.kxml2.io.KXmlParser.next(KXmlParser.java:310)
08-16 12:33:11.010: W/System.err(30741): at org.kxml2.io.KXmlParser.nextTag(KXmlParser.java:2029)
08-16 12:33:11.010: W/System.err(30741): at org.ksoap2.SoapEnvelope.parse(SoapEnvelope.java:126)
08-16 12:33:11.010: W/System.err(30741): at org.ksoap2.transport.Transport.parseResponse(Transport.java:100)
08-16 12:33:11.010: W/System.err(30741): at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:195)
08-16 12:33:11.010: W/System.err(30741): at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:95)
08-16 12:33:11.010: W/System.err(30741): at com.example.CommanDatabase.Parsing.getlogindata(Parsing.java:117)
08-16 12:33:11.010: W/System.err(30741): at com.example.orecs.OrecsSlapeMain$LoginAsyncTask.doInBackground(OrecsSlapeMain.java:1333)
08-16 12:33:11.010: W/System.err(30741): at com.example.orecs.OrecsSlapeMain$LoginAsyncTask.doInBackground(OrecsSlapeMain.java:1)
08-16 12:33:11.010: W/System.err(30741): at android.os.AsyncTask$2.call(AsyncTask.java:252)
08-16 12:33:11.010: W/System.err(30741): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
08-16 12:34:34.870: I/System.out(30927): Login Dailog Call
从服务器端获取数据时出现此错误。我不知道那有什么问题。因为当我使用另一个网络服务时,我的代码运行良好,当我更改我的网络服务时,它给了我这个错误。主要是该网络服务的链接在浏览器中有效,但不适用于 Android 设备。它总是抛出这个错误。请帮助我摆脱这个问题。