[omniORB] omniorb C++ client connecting to a Java server

Tingle, Alex Alex.Tingle at bronermetals.com
Tue Jan 27 12:09:57 GMT 2004


Nikos,
 
You need to tell omniORB where to find the initial reference "NameService".
Try starting you client with these options:
 
> client -ORBInitRef NameService=corbaname::localhost:1088
 
I would try first with the 'nameclt' name service client that comes with
omniORB. If you can't get that to talk to you naming service then there's no
hope for your own client.
 
> nameclt -ORBInitRef NameService=corbaname::localhost:1088 list
 
Once you've got your client talking to the naming service, you can specify
the InitRef in the config file (or the Windows registry) so that you don't
have to keep typing it into the command line.
 
Incidentally, why are you using port 1088 for your naming service? Port 2809
is the standard.
 
-Alex

  -----Original Message-----
From: Nikos Karamessinis [mailto:nightfall_gr at yahoo.com]
Sent: 27 January 2004 11:36
To: omniorb-list at omniorb-support.com
Subject: [omniORB] omniorb C++ client connecting to a Java server


Hello, 
I am trying to create an OmniOrb C++ client which connects to a Java (JDK
1.4.1) server in order to run a function  (guess which: String sayHello() ).
I want to use the Sun's ORBD Naming server. The Java server works fine ( I
have tested it with a Java client) and the C++ client is compiled and built
fine. However, when I run the client ( I have already run the orbd and the
Java server) it fails at the following line of code:
obj = orb->resolve_initial_references("NameService");

throwing an Exception. I run the orbd, server and client as follows:

start orbd -ORBInitialPort 1088 -ORBInitialHost 127.0.0.1

java HelloServer -ORBInitialPort 1088 & 

client 127.0.0.1 1088  

Am I running the client with wrong parameters? Am I forgetting something? I
will really appreciate any help since I have very little experience in CORBA
programming

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20040127/24071158/attachment.htm


More information about the omniORB-list mailing list