<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-7">
<META content="MSHTML 6.00.2800.1276" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face="Courier New" color=#800080 size=1><SPAN
class=960334911-27012004>Nikos,</SPAN></FONT></DIV>
<DIV><FONT face="Courier New" color=#800080 size=1><SPAN
class=960334911-27012004></SPAN></FONT> </DIV>
<DIV><FONT face="Courier New" color=#800080 size=1><SPAN
class=960334911-27012004>You need to tell omniORB where to find the initial
reference "NameService". Try starting you client with these
options:</SPAN></FONT></DIV>
<DIV><FONT face="Courier New" color=#800080 size=1><SPAN
class=960334911-27012004></SPAN></FONT> </DIV>
<DIV><FONT face="Courier New" color=#800080 size=1><SPAN
class=960334911-27012004>> client -ORBInitRef
NameService=corbaname::localhost:1088</SPAN></FONT></DIV>
<DIV><FONT face="Courier New" color=#800080 size=1><SPAN
class=960334911-27012004></SPAN></FONT> </DIV>
<DIV><FONT face="Courier New" color=#800080 size=1><SPAN
class=960334911-27012004>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.</SPAN></FONT></DIV>
<DIV><FONT face="Courier New" color=#800080 size=1><SPAN
class=960334911-27012004></SPAN></FONT> </DIV>
<DIV><FONT face="Courier New" color=#800080 size=1><SPAN
class=960334911-27012004>> nameclt -ORBInitRef
NameService=corbaname::localhost:1088 list</SPAN></FONT></DIV>
<DIV><FONT face="Courier New" color=#800080 size=1><SPAN
class=960334911-27012004></SPAN></FONT> </DIV>
<DIV><FONT face="Courier New" color=#800080 size=1><SPAN
class=960334911-27012004>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.</SPAN></FONT></DIV>
<DIV><FONT face="Courier New" color=#800080 size=1><SPAN
class=960334911-27012004></SPAN></FONT> </DIV>
<DIV><FONT face="Courier New" color=#800080 size=1><SPAN
class=960334911-27012004>Incidentally, why are you using port 1088 for your
naming service? Port 2809 is the standard.</SPAN></FONT></DIV>
<DIV><FONT face="Courier New" color=#800080 size=1><SPAN
class=960334911-27012004></SPAN></FONT> </DIV>
<DIV><FONT face="Courier New" color=#800080 size=1><SPAN
class=960334911-27012004>-Alex</SPAN></FONT></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #800080 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2><SPAN class=960334911-27012004><FONT face="Courier New" color=#800080
size=1> </FONT></SPAN>-----Original Message-----<BR><B>From:</B>
Nikos Karamessinis [mailto:nightfall_gr@yahoo.com]<BR><B>Sent:</B> 27 January
2004 11:36<BR><B>To:</B> omniorb-list@omniorb-support.com<BR><B>Subject:</B>
[omniORB] omniorb C++ client connecting to a Java server<BR><BR></FONT></DIV>
<DIV><FONT face=Arial size=2>Hello, </FONT></DIV>
<DIV><FONT face=Arial size=2>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:</FONT></DIV>
<DIV><FONT size=2>
<P>obj = orb->resolve_initial_references("NameService");</P>
<P>throwing an Exception. I run the orbd, server and client as
follows:</P>
<P>start orbd -ORBInitialPort 1088 -ORBInitialHost 127.0.0.1</P>
<P>java HelloServer -ORBInitialPort 1088 & </P>
<P>client 127.0.0.1 1088 </P>
<P>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</P></FONT></DIV></BLOCKQUOTE></BODY></HTML>