[omniORB] CosNaming::NamingContext::_narrow(obj_var) renders CORBA::UNKNOWN

baileyk@schneider.com baileyk@schneider.com
Thu Feb 27 20:41:02 2003


Are you sure you should pass


-ORBInitRef NameService=corbaname::10.192.0.4:900


and not


-ORBbootstrapAgentHostname 10.192.0.4





The Java proprietary bootstrap protocol is supported by omniORB, and I
think that's what is expected on port 900.  I don't use tnameserv though so
I could be wrong.  In my environment, using port 900 for bootstrapAgentPort
yields a name service NamingContext IOR with port number 9000.  I'm using
WebSphere.





Kendall





                                                                                                                                             
                      RKOSS@opto22.com                                                                                                       
                      Sent by:                           To:       omniorb-list@omniorb-support.com                                          
                      omniorb-list-admin@omniorb-        cc:                                                                                 
                      support.com                        Fax to:                                                                             
                                                         Subject:  [omniORB] CosNaming::NamingContext::_narrow(obj_var) renders              
                                                          CORBA::UNKNOWN                                                                     
                      02/27/2003 02:06 PM                                                                                                    
                                                                                                                                             
                                                                                                                                             




Hello all


Win2K, VC 6.0


First off, I'm new to CORBA so I hope I don't waste too much of your time.
I've created a client using omniORB which will communicate to an ORB
residing in an embedded device. Up to this point, I've limited the
transport to IIOP and all works well. Ultimately, I must allow a second
transport mechanism which will utilize a Nokia gateway. I've downloaded
some trial software from a Nokia web site - a Naming Service is part of the
download (tnameserv.exe).


I start the Naming Service on a separate PC then start my application. When
I execute the following code:


CORBA::ORB_var g_orb_var; // ... "ORBInit is passed -ORBInitRef
NameService=corbaname::10.192.0.4:900" which, of course, is the location of
the Naming Service


CORBA::Object_var obj_var = g_orb_var->resolve_initial_references
("NameService"); // does not generate an exception
CosNaming::NamingContext_var inc_var = CosNaming::NamingContext::
_narrow(obj_var); // does generate an exception


the _narrow() generates a CORBA::UNKNOWN exception. If I sniff the
communication between my application and the Naming Service I can see the
request going to the Naming Service. The packet contains, among other
things, the following:


GIOP ...
NameService- ...
_is_a- ...
IDL:omg.org/CosNaming/NamingContext:1.0


In the response from the Naming Service, the packet contains the following:


GIOP ...
IDL:omg.org/CORBA/UNKNOWN:1.0


I'm probably missing something very basic. I know other clients work with
this Naming Service. Does anyone know where I can get some "Naming Service
for Dummies (from a client perspective)" information?


Thank you for your time
Ron Koss
rkoss@opto22.com