2

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.

2 Answers 2

13

The way to fix this is:

HttpTransportSE androidHttpTransport = new HttpTransportSE(URL,60000);

Notice the second parameter, which is the timeout value.

Sign up to request clarification or add additional context in comments.

Comments

0

The problem is with the soap request.

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

5 Comments

This code is not working in my program.Please can you send me code in detail. Thank you in advance.
is it giving error like java.net.SocketTimeOutException : Read Timeout
yes, same only error I am getting.Like java.net. SocketTimeoutException.
I am sure...the problem is with your SOAP object you are creating..check twice..you are not making any mistake in passing value of each property properly..
Hey..., I have checked problem is not with soap object. Some times I am getting response but sometimes it is giving java.net.SocketTimeOutException. So I want to increase the time out,Please tell me how to do this ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.