BlackBerry Forums Support Community

Closed Thread
LinkBack Thread Tools
Old 12-01-2009, 09:38 PM   #1 (permalink)
Thumbs Must Hurt
Join Date: Feb 2008
Model: 8800
Carrier: ATT
Posts: 65
Post Thanks: 0
Thanked 0 Times in 0 Posts
Question Getting TCP receive time out error on BlackBerry

Please Login to Remove!

Hello All,

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 " 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 " 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
Host: server-ip
User-Agent: webservice-name/1.0 CFNetwork/459 Darwin/10.0.0d3
Soapaction: namespace/web-method-name
Content-Type: text/xml
Content-Length: 433
Accept: */*
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: close

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?


Copyright 2004-2016
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.