Android application working on WIFI and 3G(Without proxy), but not working on 3G(If proxy and port are assigned)

Maybe too late four you, but I hope this would help to future people reaching here like me, getting crazy with the same problem.

It's an Android bug. Everything works right with WiFi, but it crashes on 3G. It happened to me on 4.1, but no problem on 4.2.2.

To solve it, you have to modify the file org.ksoap2.transport.HttpTransportSE (I've extended a new one and called it MyHttpTransportSE because I'm using ksoap2 assembly jar). Just override method public void call(String soapAction, SoapEnvelope envelope) commenting out the line

    //connection.setRequestProperty("Connection", "close"); 

Of course, if you're working with SSL, you'll need to extend your own HttpsTransportSE from your new MyHttpTransportSE.

HttpTransportSE source code: https://github.com/karlmdavis/ksoap2-android/blob/master/ksoap2-j2se/src/main/java/org/ksoap2/transport/HttpTransportSE.java?source=c

HttpsTransportSE source code: https://github.com/mosabua/ksoap2-android/blob/master/ksoap2-j2se/src/main/java/org/ksoap2/transport/HttpsTransportSE.java

More details here: https://groups.google.com/forum/#!searchin/ksoap2-android/closed/ksoap2-