Welcome!

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

Reply
Contributor
Posts: 22
Registered: ‎10-05-2012
My Device: 9800
My Carrier: 0

not able connect to server

i am able to connect to server through browser but i m not able to connect to server through my application.Please find the code for server connection

 

HttpConnection httpConn = (HttpConnection)Connector.open(urlStr,Connector.READ_WRITE) httpConn.setRequestMethod(HttpConnection.POST);

 

i m using 3G data plan.

Highlighted
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: not able connect to server

There is quite a lot to understand when attempting to connect in this way.  Here are some places to start:

 

http://supportforums.blackberry.com/t5/Java-Development/Network-Transports/ta-p/482457

 

http://supportforums.blackberry.com/t5/Java-Development/Networking-Transports-II/ta-p/446742

 

http://supportforums.blackberry.com/t5/Java-Development/Different-ways-to-make-an-HTTP-or-socket-con...

 

You will find more, and some similar Threads if you use the search facility (see Search box, near top right).

 

Once you have the theory under your belt, I recommend you investigate using the ConnectionFactory API