WebService data reads normally with KSOAP2 calls, but always reports exceptions:
java.io.EOFException at Libcore.io.Streams.readAsciiLine (Streams.java:203) at Libcore.net.http.HttpEngine.readResponseHeaders (Httpengine.java:560) at Libcore.net.http.HttpEngine.readResponse (Httpengine.java:813) at Libcore.net.http.HttpURLConnectionImpl.getResponse (Httpurlconnectionimpl.java:274) at Libcore.net.http.HttpURLConnectionImpl.getResponseCode (Httpurlconnectionimpl.java:486) at Org.ksoap2.transport.ServiceConnectionSE.getResponseCode (Serviceconnectionse.java:103) at Org.ksoap2.transport.HttpTransportSE.call (Httptransportse.java:197) at Org.ksoap2.transport.HttpTransportSE.call (Httptransportse.java:118) at. Utils. Webservices.callinternet (Webservices.java:125) at. Utils. Webservices.getresponse (Webservices.java:73) at. Utils. Webservices.getresponse (Webservices.java:79) at. Utils. Webservices.getresponse (Webservices.java:79) at. Utils. Asyntask.doinbackground (Asyntask.java:61) at. Utils. Asyntask.doinbackground (Asyntask.java:1) at android.os.asynctask$2.call (asynctask.java:287) at Java.util.concurrent.futuretask$sync.innerrun (Futuretask.java:305) at Java.util.concurrent.FutureTask.run (Futuretask.java:137) at android.os.asynctask$serialexecutor$1.run (asynctask.java:230) at Java.util.concurrent.ThreadPoolExecutor.runWorker (Threadpoolexecutor.java:1076) at Java.util.concurrent.threadpoolexecutor$worker.run (Threadpoolexecutor.java:569) at Java.lang.Thread.run (Thread.java:856)
解决方法1
arraylist); headerpropertyarraylist);
Plus the red part of the code is solved.
解决方法2
使用 ksoap2-android-assembly-2.6.4-jar-with-dependencies.jar这个版本的ksoap2的包不会出现这样的问题。
Solution to Java.io.EOFException exception problem using KSOAP2 report