EJB weblogic client and ORBACUS C++ server
"Anoop Ahamad" <[email protected]>
| Newsgroups | gmane.comp.corba.orbacus |
|---|---|
| Message-ID | <[email protected]> |
Dear Darren,
We are trying to call Orbacus corba c++ server using EJB client (in Weblogic 8.1).
I had written one stateless session bean in which there is a method(sayHello) which the EJB client is calling
My Orbacus nameservice and c++ server are running on 192.168.1.28:8001
where as EJB client calling from 192.168.1.32
Note: We are able to do this sample with normal java client
public class CorbaEaiBean implements SessionBean {
public void sayHello()
{
String[] argv={"ORBInitRef NameService= ","corbaloc:iiop:192.168.1.28:8001/NameService"};
System.out.println("Starting");
java.util.Properties props = System.getProperties();
props.put("org.omg.CORBA.ORBClass", "com.ooc.CORBA.ORB");
props.put("org.omg.CORBA.ORBSingletonClass", "com.ooc.CORBA.ORBSingleton");
System.setProperties(props);
org.omg.CORBA.ORB orb;
System.out.println("Initialization start");
orb = org.omg.CORBA.ORB.init(argv, props);
System.out.println("Initialization over");
// find the naming service
org.omg.CORBA.Object obj = null;
org.omg.CosNaming.NamingContext ctx;
try {
System.out.println("Before initial reference");
obj = orb.resolve_initial_references("NameService");
} catch(org.omg.CORBA.ORBPackage.InvalidName e) { e.printStackTrace();}
ctx = org.omg.CosNaming.NamingContextHelper.narrow(obj);
// find the object reference
NameComponent nc = new NameComponent("Hello", "");
NameComponent path[] = {nc};
org.omg.CORBA.Object helloObj = null;
try {
helloObj = ctx.resolve(path);
} catch(Exception e) {e.printStackTrace();}
HelloApp.Hello helloRef = HelloHelper.narrow(helloObj);
helloRef.helloWorld();
}
We are getting this error:
Starting
Initialization start
Initialization over
Before initial reference
org.omg.CORBA.ORBPackage.InvalidName: IDL:omg.org/CORBA/ORB/InvalidName:1.0
at com.ooc.OB.InitialServiceManager.resolveInitialReferences(Ljava.lang.String;)Lorg.omg.CORBA.Object;(Initial
ServiceManager.java:192)
at com.ooc.OBCORBA.ORB_impl.resolve_initial_references(Ljava.lang.String;)Lorg.omg.CORBA.Object;(ORB_impl.java
:1170)
Thanks with Regards
Anoop Ahamad
_______________________________________________
OB-Users Mailing List - [email protected]
http://mail.ooc.nf.ca/mailman/listinfo/ob-users
Visit our support FAQ before you send a message.
http://www.orbacus.com/faq/support.html