[omniORB] Re: [Fwd: Fw: Interoperability]

Filippo Lambiente filippo.lambiente@eudra.org
Wed, 24 Nov 1999 19:09:37 +0000


--------------A961D9CABC39BAEE520A20B0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi,

Problem Description:
Invoking methods on a CORBA server (C++) that uses omniORB 2.8 from
a java client (JDK 1.1.7)

> >> I thought that using the package that the sun's JKD 1.1.7 provides (like
> >> org.omg.CosNaming and org.omg.CORBA) should be work, isn'it?
> >
> >That should work.
> >
> >>     ORB orb = ORB.init(args, null);
> >>     org.omg.CORBA.Object objRef = orb.string_to_object(args[0]);
> >>
> >> where args[0] is the IOR of the NAMESERVICE.
> >
> >Are you sure that args[0] isn't the name of your program like it would
> >be in C++?  I don't know Java well enough.

Yes, args[0] is the IOR on the nameservice.

> >> Or is not enough? Shall I need also a specific Java ORB?
> >
> >No. The one with the JDK is sufficient.
> >
> >> > Can you do the echo example which passes the
> >> > IOR of the Echo object directly (eg2)?
> >>
> >> In C++ this example works, I did not try with java.
> >
> >It's best to start by trying this with Java, rather than complicating
> >things with the name service.

I have also tried the same thing passing to a java-client the IOR of my server
instance instead of the IOR of the NameService. In this way it works fine.

When I pass the IOR of the nameservice and then I try to narrow it to a
NamingContext I always get a null value.

Any suggestion?
cheers
filippo

--------------A961D9CABC39BAEE520A20B0
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Hi,
<p><b>Problem Description:</b>
<br>Invoking methods on a CORBA server (C++) that uses omniORB 2.8 from
<br>a java client (JDK 1.1.7)
<blockquote TYPE=CITE>>> I thought that using the package that the sun's
JKD 1.1.7 provides (like
<br>>> org.omg.CosNaming and org.omg.CORBA) should be work, isn'it?
<br>>
<br>>That should work.
<br>>
<br>>>&nbsp;&nbsp;&nbsp;&nbsp;<b> ORB orb = ORB.init(args, null);</b>
<br>>>&nbsp;&nbsp;&nbsp;&nbsp; <b>org.omg.CORBA.Object objRef = orb.string_to_object(args[0]);</b>
<br>>>
<br>>> <b>where args[0] is the IOR of the NAMESERVICE</b>.
<br>>
<br>>Are you sure that args[0] isn't the name of your program like it would
<br>>be in C++?&nbsp; I don't know Java well enough.</blockquote>
Yes, args[0] is the IOR on the nameservice.
<blockquote TYPE=CITE>>> Or is not enough? Shall I need also a specific
Java ORB?
<br>>
<br>>No. The one with the JDK is sufficient.
<br>>
<br>>> > Can you do the echo example which passes the
<br>>> > IOR of the Echo object directly (eg2)?
<br>>>
<br>>> In C++ this example works, I did not try with java.
<br>>
<br>>It's best to start by trying this with Java, rather than complicating
<br>>things with the name service.</blockquote>
I have also tried the same thing passing to a java-client the IOR of my
server
<br>instance instead of the IOR of the NameService. In this way it works
fine.
<p>When I pass the IOR of the nameservice and then I try to narrow it to
a
<br>NamingContext I always get a null value.
<p>Any suggestion?
<br>cheers
<br>filippo</html>

--------------A961D9CABC39BAEE520A20B0--