views:

28

answers:

2

I am currently developing a proof of concept Blackberry application that uses RPC calls. I have also developed a very basic server application in .Net that simply timestamps a string sent to it and returns it to the client. I have been able to connect to the server app using a .Net client and a Java client so I am fairly confident it works correctly.

For the Blackberry client application I used Java Wireless Toolkit 2.5.2 to generate stubs for the RPC calls. I then used these calls in a basic Blackberry app to try and replicate the results of the .Net and Java clients, but it keeps throwing exceptions. I am not sure if I am using stubs correctly.

    pushScreen(new HelloWorldScreen("Initiating communication"));
    try {
        IHelloService_Stub stub = new IHelloService_Stub();
        String result = stub.hello("Hello From Blackberry");
        pushScreen(new HelloWorldScreen(result));
     } catch (RemoteException e) {
        pushScreen(new HelloWorldScreen(e.getMessage()));
     }

At present I am running everything locally. The server runs as localhost and the Blackberry app is running on the Blackberry simulator. I have used the Blackberry browser to check if I can reach the service and I can so its not the network connection that is the issue.

The exception thrown is the following:

java.io.interruptedIOException: Local connection timed out after ~ 120000

A: 

The above code is correct. When running the simulator I was unaware that the MDS simulator was required. The browser can reach the internet, but it seems like apps take a different path.

Ren
A: 

Try appending ;deviceside=true to your URL. That should eliminate the need for using the MDS simulator.

seand