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
Developer
ravindrakamble
Posts: 68
Registered: ‎07-21-2008
My Device: Not Specified
Accepted Solution

Unable to open connection problem?

Hello, I have one application which fetching data from server. some days before application works fine. But today I have updated my service book. Now my application in not connecting to web service. it throws exception : Unable to open connection.

 

What I have to do?

Please help..

Thanks in advance.

BlackBerry Development Advisor
MSohm
Posts: 14,864
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: Unable to open connection problem?

What route is your connection being made over?

 

What Is - Different ways to make an HTTP or socket connection
Article Number: DB-00396

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800563/What_Is...

 

Are you able to access the server using the browser?  This link may also help you.

 

What Is - Network Diagnostic Tool
Article Number: DB-00684

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800563/What_Is...

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
ravindrakamble
Posts: 68
Registered: ‎07-21-2008
My Device: Not Specified

Re: Unable to open connection problem?

I am using the HttpConnection and I am trying to access web method of a webservice. It is trying for some time and it throws error. "enable to open connection".

My code is

conn = (HttpConnection) Connector.open("some url" + "name of the method", Connector.READ_WRITE,true); conn.setRequestMethod(HttpConnection.POST); conn.setRequestProperty("Content-Type", " application/x-www-form-urlencoded"); conn.setRequestProperty("Content-Length"," " + initialiseData.length()+""); conn.setRequestProperty("ConnectionTimeout",CON_TIME_OUT); conn.setRequestProperty("deviceside", "false");

 

What i have to change?
BlackBerry Development Advisor
MSohm
Posts: 14,864
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: Unable to open connection problem?

Is this an internal server you need to access through your BlackBerry Enterprise Server? If so, you should append ;deviceside=false to the end of your URL.  If not, what route are you trying to connect over?
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
ravindrakamble
Posts: 68
Registered: ‎07-21-2008
My Device: Not Specified

Re: Unable to open connection problem?

After resending the service book from BES, now able to make a connection.

 

Thanks a lot.