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: 52
Registered: ‎11-03-2008
My Device: Not Specified

Retrieve data via web service

Hi all,


Yet another request for you guys...I have a .NET web service that returns a base64 encoded string. I am able to make a connection but unfortunately a connection time out Exception comes up before the whole response is acknowleded. May the response length is large...


I am using simpe HttpConnection Interface object for this and DataInputStream to hold the data.


Is there some protocols that one must follow in order to access a lengthy response from web service ?





- Arun

BlackBerry Development Advisor
Posts: 15,882
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Retrieve data via web service

Just to clarify, by large do you mean you are downloading a large amount of data or that the response takes a long time before returning data?  The timeout for an idle connection can be set in two ways, depending on the route you are using.  You can use the SocketConnectionEnhanced interface for direct TCP connections.  If you are connecting through a BlackBerry Enterprise Server (BES), you can use the method outlined below.  Note that the default timeout value is 2 minutes.  An application connection through a BES can not extend this beyond the limit configured on the BES (2 minute default).  So to go beyond this, you'll need to configure it on the server side and within your application.


How To - Control the connection timeout for TCP connections through BlackBerry Mobile Data System Connection Service
Article Number: DB-00526


Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.