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

RKOSS@Opto22.com RKOSS@Opto22.com
Thu Feb 27 20:09:02 2003


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C2DE9B.BCEB2760
Content-Type: text/plain;
	charset="iso-8859-1"

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


------_=_NextPart_001_01C2DE9B.BCEB2760
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>CosNaming::NamingContext::_narrow(obj_var) renders =
CORBA::UNKNOWN</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2 FACE=3D"Verdana">Hello all</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Verdana">Win2K, VC 6.0</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Verdana">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).</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Verdana">I start the Naming Service on a =
separate PC then start my application. When I execute the following =
code:</FONT>
</P>

<P><FONT COLOR=3D"#008000" SIZE=3D2 FACE=3D"Verdana">CORBA::ORB_var =
g_orb_var; // ... &quot;ORBInit is passed -ORBInitRef =
NameService=3Dcorbaname::10.192.0.4:900&quot; which, of course, is the =
location of the Naming Service</FONT></P>

<P><FONT COLOR=3D"#008000" SIZE=3D2 FACE=3D"Verdana">CORBA::Object_var =
obj_var =3D =
g_orb_var-&gt;resolve_initial_references(&quot;NameService&quot;); // =
does not generate an exception</FONT>
<BR><FONT COLOR=3D"#008000" SIZE=3D2 =
FACE=3D"Verdana">CosNaming::NamingContext_var inc_var =3D =
CosNaming::NamingContext::_narrow(obj_var); // does generate an =
exception</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Verdana">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:</FONT></P>

<P><FONT COLOR=3D"#008000" SIZE=3D2 FACE=3D"Verdana">GIOP ...</FONT>
<BR><FONT COLOR=3D"#008000" SIZE=3D2 FACE=3D"Verdana">NameService- =
...</FONT>
<BR><FONT COLOR=3D"#008000" SIZE=3D2 FACE=3D"Verdana">_is_a- ...</FONT>
<BR><FONT COLOR=3D"#008000" SIZE=3D2 =
FACE=3D"Verdana">IDL:omg.org/CosNaming/NamingContext:1.0</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Verdana">In the response from the Naming =
Service, the packet contains the following:</FONT>
</P>

<P><FONT COLOR=3D"#008000" SIZE=3D2 FACE=3D"Verdana">GIOP ...</FONT>
<BR><FONT COLOR=3D"#008000" SIZE=3D2 =
FACE=3D"Verdana">IDL:omg.org/CORBA/UNKNOWN:1.0</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Verdana">I'm probably missing something very =
basic. I know other clients work with this Naming Service. Does anyone =
know where I can get some &quot;Naming Service for Dummies (from a =
client perspective)&quot; information?</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Verdana">Thank you for your time</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Verdana">Ron Koss</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Verdana">rkoss@opto22.com</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C2DE9B.BCEB2760--