Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Posts: 38
Registered: ‎06-07-2010
My Device: BlackBerry Bold 9790
My Carrier: none

HttpConnection.openInputStream() throws IOException (Timed out) when connecting through WAP2


For some time now, I am having the issue that I am not able to get a connection to my server through WAP2 from some devices (particularly 9900 (7.1) and 9800 (6.0)). Whenever I am calling openInputStream() on the connection (with all transport selectors and headers set), an IOException is thrown with the message "Timed out".


Here is an example of a POST request output:

--------------CONNECT URL:--------------

--------------CALL TO openInputStream():--------------

openInputStream() threw IOException: Timed out

--------------THE REQUEST OUTPUT--------------

a MYAPP- 0 (response code not set due to exception): POST http://xy.myserver.com/login

  X-Carrier: Rogers Wireless; MCC=302; MNC=720


  X-Device-Name: BlackBerry 9900

  X-Device-Vendor: BlackBerry

  X-Auth-Token: // auth token used

  X-Date: 2012.09.16 12:47:32

  X-App-Version: 3.2.2

  X-App-Key: // the key of my app

  X-Device-Token: 697585708

  X-Locale: en

  X-Screen-Pixels: 640x480


  Accept: application/json

  Content-Type: application/json; charset=utf-8

  x-rim-transcode-content: none

  User-Agent: BlackBerry9900/ Profile/MIDP-2.0 Configuration/CLDC-1.1

  Connection: close

{/* the request's body content (login credentials) */}


As you can see above, I am trying to connect to my server (sample name in this case) with the transport selectors for WAP2 set.


On most of the devices, the connection works perfectly fine, but for some other devices, I keep having these issues.


What could be reasons for this issue? Has anyone ever had a similar issue and a possible solution?