Thanks very much for this - it now correctly instantiates the CORBA object
that I am trying to invoke on, and I can see the connection appearing in
the ORB daemon window on the remote machine.
However, now when I actually do the invocation, I get a
Exception: org.omg.CORBA.NO_IMPLEMENT
The remote machine (DDDEV_MOC) is running Orbix 3.0.1, and the application
(C++) I am trying to invoke on. Do I need to further configure IIOP on
this machine, or do you know if this ORB doesn't support it. I created the
stub files on the local machine using idlj, and the method is definately
implemented as I can invoke it from a C++ CORBA client OK.
Also, this is a C++ ORB - I assume that this can actually accept
invocations which were originally Java, and that I don't need the Java
based ORB (OrbixWeb)?? The whole idea of IDL is that the ORB is language
independant, right?
Or maybe it's to do with the interface repository?
I'd be grateful for any suggestions
Thanks again
Michael.
> Hi,
> You can use any one of the following code:-
> -------------------------------------------------------------------------
-
> Properties p = new Properties();
> p.put("org.omg.CORBA.ORBClass", "IE.Iona.OrbixWeb.CORBA.ORB");
> p.put
(> "org.omg.CORBA.ORBSingletonClass", "IE.Iona.OrbixWeb.CORBA.singletonORB"
);
> p.put("org.omg.CORBA.ORBInitialHost", "DDDEV_MOC");
> p.put("org.omg.CORBA.ORBInitialPort", "1570");
> p.put
(> "org.omg.CORBA.ORBInitRef", "NameService=corbaloc:iiop:1.0@:/NameService
")
;>
> p.put("OrbixWeb.IT_NS_HOSTNAME","DDDEV_MOC");
> orb = IE.Iona.OrbixWeb.CORBA.ORB.init(args, p);
>
> try
> {
> ref = orb.resolve_initial_references("NameService");
> System.out.println("ref:" + ref);
> ...
-> ------------------------------------------------------------------------
--
> OR
-> ------------------------------------------------------------------------
--
> Properties p = new Properties();
> p.put("org.omg.CORBA.ORBClass", "IE.Iona.OrbixWeb.CORBA.ORB");
> p.put
(> "org.omg.CORBA.ORBSingletonClass", "IE.Iona.OrbixWeb.CORBA.singletonORB"
);
> p.put("org.omg.CORBA.ORBInitialHost", "DDDEV_MOC");
> p.put("org.omg.CORBA.ORBInitialPort", "1570");
> p.put
(> "org.omg.CORBA.ORBInitRef", "NameService=corbaloc:iiop:1.0@:/NameService
")
;>
> orb = IE.Iona.OrbixWeb.CORBA.ORB.init(args, p);
> _OrbixWeb.ORB(orb).setConfigItem
(> "IT_NS_HOSTNAME","alphaes40.ushacomm.co.in");
> try
> {
> ref = orb.resolve_initial_references("NameService");
> System.out.println("ref:" + ref);
> ...
-> ------------------------------------------------------------------------
--
>
>
> > I need a Java IDL client to connect to a CORBA server (C++) who's ORB
is
o> n a remote machine -
>
M> y code goes as follows,
> Properties p = new Properties();
> p.put("org.omg.CORBA.ORBClass", "IE.Iona.OrbixWeb.CORBA.ORB");
> p.put
(> "org.omg.CORBA.ORBSingletonClass", "IE.Iona.OrbixWeb.CORBA.singletonORB"
);
> p.put("org.omg.CORBA.ORBInitialHost", "DDDEV_MOC");
> p.put("org.omg.CORBA.ORBInitialPort", "1570");
> p.put
(> "org.omg.CORBA.ORBInitRef", "NameService=corbaloc:iiop:1.0@:/NameService
")
;>
>
> orb = IE.Iona.OrbixWeb.CORBA.ORB.init(args, p);
>
> try
> {
> ref = orb.resolve_initial_references("NameService");
> System.out.println("ref:" + ref);
> ...
> This always prints 'localhost' as the ORB server instead of 'DDDEV_MOC'
as
I> intend.
> Does anyone know what might be wrong here?
>