[omniORB] Naming Service grief

Andrew Parkin AndrewP@eigroup.com
Mon, 19 Feb 2001 11:48:24 -0000


Hi,

I am trying to get a C++ OmniORB client to talk to the Java JDK1.2.2 ORB.
Can anyone see why this code works when connecting to the Naming Service
using the IOR reference...


CORBA::Object_var obj =
orb->string_to_object("IOR:000000000000002849...000");
CosNaming::NamingContext_var rootContext =
CosNaming::NamingContext::_narrow(obj);


...but this code using a URL does not?


CORBA::Object_var obj =
orb->string_to_object("corbaname:iiop:localhost:900/NameService");
CosNaming::NamingContext_var rootContext =
CosNaming::NamingContext::_narrow(obj);


If there is some reason why the URL code will not work, how can I contact a
naming service on a remote machine?


Many thanks
Andrew Parkin