benoffi7 / ksoap2-android

Automatically exported from code.google.com/p/ksoap2-android
0 stars 0 forks source link

EOF Exception Ksoap2-3.4.0 #207

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Run app
2.
3.

What is the expected output? What do you see instead?
Get the result from web Service

What version of the product are you using? On what operating system?
3.4.0

Please provide any additional information below.
java.io.EOFException
libcore.io.Streams.readAsciiLine(Streams.java:203)
libcore.net.http.HttpEngine.readResponseHeaders(HttpEngine.java:560)
libcore.net.http.HttpEngine.readResponse(HttpEngine.java:813)
libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:27
4)
libcore.net.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.jav
a:486)
org.ksoap2.transport.ServiceConnectionSE.getResponseCode(ServiceConnectionSE.jav
a:103)

Original issue reported on code.google.com by mihai.re...@3sstudio.com on 4 Feb 2015 at 9:27

GoogleCodeExporter commented 9 years ago
Are there any solutions to this error?
Could someone help me out please?

Original comment by mihai.re...@3sstudio.com on 4 Feb 2015 at 9:31

GoogleCodeExporter commented 9 years ago
Report the same error! 

Original comment by benoffi7 on 30 Apr 2015 at 7:33

GoogleCodeExporter commented 9 years ago
Hi benoffi7,

I solved this problem by adding this line in HttpTransferSE, Line 172:
System.setProperty("http.keepAlive", "false"); //possible eof exception problem
        connection.setRequestProperty("Accept-Encoding", "gzip");

Honestly I don't know which are the drawbacks but for me it works now without 
problem. I read some threads in which it was written that if you don't keep the 
connection alive then it will take longer to make requests. For me the 
connection with the server is acceptable fast so I let it like this.

Original comment by mihai.re...@3sstudio.com on 4 May 2015 at 9:13

GoogleCodeExporter commented 9 years ago
Hi! Can you send me a JAR with that line? 

Thanks a lot!!!

Original comment by benoffi7 on 4 May 2015 at 6:56