[omniORB] Using omniORB's 3.0.1 naming service with Visibroker 3.3

armin.gerritsen@philips.com armin.gerritsen@philips.com
Tue, 24 Oct 2000 11:45:42 +0200


>Can anybody provide me with any helpful hints and/or suggestions on ho=
w I
can
>get  a Visibroker 3.3 client program to communicate through omniNames =
3.0.1
to
>an omniORB server program.  The server object is located on a differen=
t
server
>than omniNames and the client program is ran from my desktop.  Anythin=
g
would be
>helpful.  Thank you.

I have some code here that I use (for a C++ program but the idea should=
 be
clear):

    // Get the object reference of the Name server
    ifstream fin;
    fin.open("nameserver.ior");
    char buffer[2048];
    fin.get(buffer, 2048, '\n');
    fin.close();
    CosNaming::NamingContext_var rootctx =3D
      CosNaming::NamingContext::_narrow(orb->string_to_object(buffer));=

    if(CORBA::is_nil(rootctx))
    {
     cerr << "Error: Invalid rootcontext object reference." << endl ;
    }

With the rootcontext you can do all kinds of cool things. Check the
documentation for details.
(I have used Visiborker Java clients too with the omniORB namingsever, =
but I
don't have the code anymore at hand - am on a new project. But the idea=
 is
the same.)

Regards,

Armin
--
Philips Semiconductors B.V.
Systems Laboratory Eindhoven (PS-SLE)
Building BE, Room 333,
Hurksestraat 19, P.O.Box 218,
5600MD Eindhoven, The Netherlands
Phone: +31-40-27 23960
Fax  : +31-40-27 22764
E-mail: Armin.Gerritsen@philips.com


=