views:

542

answers:

2

Hi,

I'm trying to do a remote call to remote object running as part of a application installed in Websphere. The end solution will be RPG to local java cilent to call remote service that calls the webservice. This mainly so we have one set of code to call the webservice and doing the xml parsing, plus the iSeries doesn't have direct access to internet.

Iseries WebSphere Server RPG>Java --> Java->Webservice

In my RMI server class I'm registering like this

 Naming.rebind("rmi://127.0.0.1:2813/CAPostcodeService", obj);

If I'm using the jdk on my localmachine then I run the "rmiregistry" and can connect ok, how to I connect to the class if it's running within Websphere. I assumed websphere was running a rmi server on port 2813 as noted in the admin console.

I'm currently getting read time out issues

CAPostcodeRMILookup exception: error during JRMP connection establishment; nested exception is: 
java.net.SocketTimeoutException: Read timed out
java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is: 
    java.net.SocketTimeoutException: Read timed out

I'm new to using RMI I might be assuming up much/little :S

Thanks, Scottyab

+1  A: 

The webSphere RMI is not general-purpose, consider it as internal, embracing WebSphere's own EJB RMI/IIOP invocation mechanism and admin service. The 2813 port is for access by admin tools.

Application code running in WebSphere can expose remotely callable EJBs, JMS queues, WebServices - or any HTTP request/responses you care to build for yourself.

As you intend to use a web service call once "inside" WebSphere, why could you not do that directly from your stand-alone java?

djna
Thanks, I thought I was missing something obvious with WAS/RMI. The idea aginst not simply calling the webservice from java running on the iSeries was because of the lack of direct http connection to the internet and I wasn't keen on having two copies of the same code to consume the service, but maybe I'm gonna need to do that after all.
scottyab
+1  A: 

That port is likely for the remote JMX connector.