[omniORB] Newbie help wanted

Gary D. Duzan gdd0@gte.com
Fri, 31 Mar 2000 09:31:38 -0500


   genior is unlikely to work for you in general, and should be
avoided. In particular, you really do need the object key to get
a valid IOR. The easiest way to get a good IOR is to write a little
Orbix program to bind() to the object, then print the results of
object_to_string() on it. Feed that string to your OmniORB program
and you should be fine.
   In the future, you may prefer to have your Orbix program store
its object references in a name service. Then you only have to
convert the name service IOR to a string to allow access to all of
them from other ORBs.

					Gary Duzan
					GTE Laboratories



In Message <008a01bf9b1c$ceb262d0$d74ac2c0@dat.tele.fi> ,
   "Pasi Kovanen" <Pasi.Kovanen@sonera.com> wrote:

=>Hi,
=>
=>I'm very new to this Corba stuff and would really appreciate if someone could help
=>me a bit with my problem. I'm still confused with some of the basic concepts of
=>Corba thus these questions should be trivial for anyone who has worked with it.
=>
=>Orbix has a bind method and I know that it's not part of the Corba standard and
=>is not availabe in OmniORB (I've read the mailings concerning this subject on the
=>list archives). I've seen how one can easily using the bind connect to the server
=>and then use its objects.
=>
=>I'd like to call a remote object on a machine whose IP-address and port are known
=>beforehand from OmniORB. The remote object uses OrbixWeb and WonderWall.
=>I'd like to generate the IOR using genior.
=>
=>The following piece of code (IOR is truncated) shows some log in the WonderWall
=>log, but I know that the are some fundamental bugs. The IOR only specifies the server
=>(IR Type ID = 0 and no object key specified, is this OK?) but not the object, though I try
=>to get the object using it.
=>
=>How should the program be changed to accomplish what I'm looking for, ie. generate
=>server's IOR using genior and call the test object's nop method?
=>
=>Thank you very much beforehand for any help!
=>
=>    // Pasi Kovanen
=>
=>#include "mytest.hh"
=>
=>void
=>main(int argc, char** argv)
=>{
=> mytest* test = NULL;
=>
=> CORBA::ORB_ptr orb = CORBA::ORB_init(argc, argv, "omniORB2");
=> CORBA::BOA_ptr boa = orb->BOA_init(argc, argv, "omniORB2_BOA");
=> 
=>  CORBA::Object_var obj = orb->string_to_object("IOR:010000000200000030...");
=>  test = mytest::_narrow(obj);
=> test->nop();
=>
=> boa->destroy();
=> orb->NP_destroy();
=>}
=>
=>
=>