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
New Developer
Posts: 2
Registered: ‎10-24-2008
My Device: Not Specified
Accepted Solution

Eclipse Plug-in Simulator - How to configure network

Hi I have installed Blackberry JDE Eclipse Plug-in successfully. My test app works great on simulator until it tried to open a HTTP connection to a URL (either localhost or a real web address like www.google.com):

 

Below is the code I used:

 

StreamConnection s = null;

 

try

{

s = (StreamConnection)Connector.open(getUrl());

HttpConnection httpConn = (HttpConnection)s;

 

int status = httpConn.getResponseCode();

...

}

 

So my question is how to configure the simulator's setting so that it can open connection to network.  

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

Re: Eclipse Plug-in Simulator - How to configure network

Have you also started the MDS Simulator?  If so, do you see activity in the window when you make a connection?

 

Are you using the deviceside parameter?  If so, what is it set to?  Do you have a proxy server in your environment?

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
New Developer
Posts: 2
Registered: ‎10-24-2008
My Device: Not Specified

Re: Eclipse Plug-in Simulator - How to configure network

Hi Mark,

 

Thanks for your fast response.

 

I am new to Blackberry development. I want to migrate a current Java app to BB plateform. Currently we are using HTTP to exchange data between java client and server (which is running on weblogic server). 

 

My questions are:

 

(1) how to start MDS simulator? Do I need to download MDS or it comes with Elcipse plug-in?

(2) what is deviceside parameter, do I need one for HTTP connection to my weblogic server?

(3) If we deploy our application, do we need to set up a MDS at server side?

 

Thanks!

 

Sean

Retired
Posts: 76
Registered: ‎07-11-2008
My Device: Z10

Re: Eclipse Plug-in Simulator - How to configure network

The BlackBerry MDS Simulator is packaged and installed with the Eclipse plug-in and can also be downloaded separately if needed. You can configure to launch the MDS Simulator along with your device simulator under the Debug/Run Dialog. For more details on these steps, check the Eclipse-Plug-in for the following topic Test a BlackBerry Application that uses an HTTP connection.

 

To understand the deviceside parameter and information on network gateways, please see the following resources:

 

DB-00396: What Is - Different ways to make an HTTP or socket connection
http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800563/What_Is...

 

Network Transports Video:

http://na.blackberry.com/eng/developers/resources/videolibrary.jsp#tab_ddetail_subtab_jde

 

Managing Wireless Data Transport on BlackBerry - Part 1

http://www.blackberry.com/knowledgecenterpublic/livelink.exe?func=ll&objId=832210&objAction=browse&s...

Sarim
BlackBerry Development Advisor
www.BlackBerryDeveloper.com
New Developer
Posts: 1
Registered: ‎03-04-2009
My Device: Not Specified

Re: Eclipse Plug-in Simulator - How to configure network

>  (1) how to start MDS simulator? Do I need to download MDS or it comes with Eclipse plug-in?

 

MDS installs with the Eclipse plugin, but the startup script wouldn't run for me.  For version 4.5, you'll find 'run.bat' in eclipse-3.4\plugins\net.rim.eide.componentpack4.5.0_4.5.0.14\components\MDS, assuming you've installed Eclipse in eclipse-3.4.  I copied run.bat and changed the '!' characters to '%'.  I also defined JAVA_HOME in the script to point to a 1.6 JDK, set "echo on", and removed the wrapping shells in favor of direct invocations of java so I could see any error messages.  With those changes, I can use the modified script to start MDS from the command line or a shortcut.  My test for this is that the web browser works in the phone emulator.  For component pack 4.7, it's the same deal.

 

Carl