Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java.net.SocketTimeoutException in Ksoap2

Tags:

android

I am new in android.I am working on android app. For that i am calling web-services using Ksoap2(2.6) and calling 3 different json services. my problem is that when 1 or 2 services coming out of 3 then it is showing java.net.SocketTimeOutException.

Please tell me how to handle the HttptransportSE and TimeOut for avoid SocketTimeoutException. Thank you in advance.

like image 491
Gyanendra Kumar Avatar asked Mar 19 '26 21:03

Gyanendra Kumar


1 Answers

The way to fix this is:

HttpTransportSE androidHttpTransport = new HttpTransportSE(URL,60000);

Notice the second parameter, which is the timeout value.

like image 105
Janis Peisenieks Avatar answered Mar 21 '26 09:03

Janis Peisenieks



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!