[omniORB] Client in Java (Jacorb) and Server in C++ (OmniOrb)

Valter Henrique valter.bcc at gmail.com
Wed Nov 24 05:55:30 GMT 2010


Hi everyone,
i'm tryng do build a simple application using 'echo' example.

I have my client in Java:

EchoClient.java
-----------------------
import org.omg.CORBA.*;
import org.omg.CosNaming.*;
import java.io.* ;

public class EchoClient {
	public static void main(String args[]) {
		try {
			String SetInfo, ReturnInfo, ref;
			org.omg.CORBA.Object objRef;
			Echo EchoRef;
			ORB orb = ORB.init(args, null);

			objRef = orb.resolve_initial_references("NameService");
			NamingContext ncRef = NamingContextHelper.narrow(objRef);
			// locate the service
			NameComponent nc = new NameComponent("Echo", "");
			NameComponent path[] = { nc };
			EchoRef = EchoHelper.narrow(ncRef.resolve(path));

			if (args.length > 1) {
				SetInfo = args[1];
			} else {

			}
			System.out.println("Client Process Begin: ");
			ReturnInfo = EchoRef.echoString("my corba test");
			System.out.println(ReturnInfo);
		} catch (Exception e) {
			System.out.println("ERROR : " + e);
		}
	}
}
--------------------

And my server in C++:  http://old.nabble.com/file/p30296994/eg3_impl.cc
eg3_impl.cc 

Both are been compiled by Java e C++ respectively.

I have changed omniORB.cfg : supportBootstrapAgent = 1

So i start my omniNames :

omniNames -start

Then my server 

./eg3_impl

The my client :

java EchoClient -ORBInitialPort 2809

And appears : 
valter at Eniac:~/Corba/omniOrb/install/omniORB-4.1.4/build/src/examples/echo$
java EchoClient -ORBInitialPort 2809
ERROR : org.omg.CosNaming.NamingContextPackage.NotFound:
IDL:omg.org/CosNaming/NamingContext/NotFound:1.0

Can anyone help me ?
Thanks for your attention.

Best regards,
Valter Henrique.
-- 
View this message in context: http://old.nabble.com/Client-in-Java-%28Jacorb%29-and-Server-in-C%2B%2B-%28OmniOrb%29-tp30296994p30296994.html
Sent from the OmniORB - User mailing list archive at Nabble.com.




More information about the omniORB-list mailing list