Gyanendra Kumar
Gyanendra Kumar

Reputation: 39

Java.net.SocketTimeoutException in Ksoap2

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.

Upvotes: 2

Views: 6354

Answers (2)

Janis Peisenieks
Janis Peisenieks

Reputation: 4998

The way to fix this is:

HttpTransportSE androidHttpTransport = new HttpTransportSE(URL,60000);

Notice the second parameter, which is the timeout value.

Upvotes: 13

MKJParekh
MKJParekh

Reputation: 34301

The problem is with the soap request.

At all the optional parameters needs to be replaced with the ZeroLengthSpace.

Upvotes: 0

Related Questions