[omniORB] Newbie help wanted
Pasi Kovanen
Pasi.Kovanen@sonera.com
Fri, 31 Mar 2000 17:24:21 +0300
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();
}