12-01-2009, 10:38 PM
Thumbs Must Hurt
Join Date: Feb 2008
Post Thanks: 0
Thanked 0 Times in 0 Posts
| | Getting java.io.IOException TCP receive time out error on BlackBerry
Please Login to Remove!
I am developing a BB application in which I am connecting to web service and getting response and displaying on screen.
I have WiFi enabaled on BB, so while using application on BB, I have added "interface=wifi" infront of web service url. Similarly, while testing application on BB simulator I have added "deviceside=true" infront of url.
With both of the above options, when I am trying to connect to web service, sometimes I am able to connect web service almost instantly and even getting response properly, but sometimes(after few seconds) I am not able to call the same web service and getting " java.io.IOException TCP receive time out" on device after around 2 minutes. Interestingly, when i am connecting to web service, in almost all the cases the request is reaching to web server, and server is also responding with proper response. But, BB device/Simulator not getting the response and giving "java.io.IOException TCP receive time out" after around 2 minutes. This thing is happening almost 50% of time while calling the same web service.
Also, I made sure that wifi is running ok on device and internet connection is also available on machine running simulator.
I also observerd the request response on server and this is what I am getting in case of request from BB device/simulator.
POST webserivce-path HTTP/1.1
User-Agent: webservice-name/1.0 CFNetwork/459 Darwin/10.0.0d3
Accept-Encoding: gzip, deflate
Please, note connection: close parameter here.
FYI, I am also having similar application built on iPhone, and it is working perfectly ok with wifi enabled.
I also observred the request and response for iPhone, and I am getting Connection: keep-alive in the request envelope.
Even I tried with explicitly setting Connection: keep-alive in soap request from BB, but not having any success with it.
Any idea, what may be the possible cause of this issue? The things are working at one moment and not at other.
Any help will be greately appreciated?