[omniORB] Interoperate with Java Server

Gary Duzan gduzan at bbn.com
Wed Apr 6 12:39:47 BST 2005


In Message <b69b167805040508027446b737 at mail.gmail.com> ,
   Rodrigo Baptista <digobaptista at gmail.com> wrote:

=>To prove the interoperability I also have to implement a client in
=>other language (in my case Python)
=>
=>Now here is the problem:
=>
=>I have the java server starting the naming service with
=>"tnameserv.exe" (transitional naming service) or "orbd -ORBInitialPort
=>900"
=>
=>How can I use the naming service generated in java in my python client?

   A little experimentation shows that omniORB's nameclt can be made to
talk to orbd (in this case under JDK 1.5.0_02). I run:

    orbd -ORBInitialPort 9000

in one window and 

    nameclt -ORBsupportBootstrapAgent 1 -ORBbootstrapAgentHostname localhost -ORBbootstrapAgentPort 9000 list

in another, and it seems to do the right thing. (You can add
"-ORBtraceLevel 10" to see the details about what's going on.) I get
a COMM_FAILURE (create listener failed) exception on the orbd side,
but it doesn't appear to affect its operation.

   You should be able to do the same thing in Python by giving those
-ORB* options to CORBA.ORB_init(), either by passing it
sys.argv and putting the options on the command line or by
adding args to sys.argv before the call. You can then do:

    ns = orb.resolve_initial_references('NameService')
    
to get the name service, or just do

    objref = orb.string_to_object('corbaname:rir:#MyObjectNSName')

to look up a particular object.

					Gary Duzan
					BBN Technologies




More information about the omniORB-list mailing list