<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>Hi Sebastian,<br>
<br>
stupid question: What happens if you return ret instead of m_return?<br>
<br>
Regards<br>
<br>
Markus<br>
<br>
Sebastian Bickel wrote:</tt>
<blockquote cite="mid44D12110.31040.CAC68A@Seb.ADIO.gmx.de" type="cite">
<title></title>
<meta http-equiv="content-type" content="text/html;">
<meta http-equiv="Content-Style-Type" content="text/css">
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
Client:</span></font>
</div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
NamingContext nc =</span></font>
</div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
NamingContextHelper.narrow(orb.resolve_initial_references(</span></font>
</div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
"NameService"));</span></font>
</div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
</span></font>
</div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
if(nc == null)</span></font>
</div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
System.out.println("nc
is NULL");</span></font>
</div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
else</span></font>
</div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
System.out.println("nc
is not NULL");</span></font>
</div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
<br>
</span>
</font></div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
NameComponent[] name = new
NameComponent[1];</span></font>
</div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
name[0] = new
NameComponent("Login","Object");</span></font>
</div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
org.omg.CORBA.Object o =
nc.resolve(name); </span></font>
</div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
CommunicationServer.Login l =
LoginHelper.narrow(o);</span></font>
</div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
</span></font>
</div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
if
(l != null)</span></font>
</div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
{</span></font>
</div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
System.out.println("It's
working.");</span></font>
</div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
short ret =
l.log_in(username, password);</span></font>
</div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
System.out.println("Retruncode:
" + ret);</span></font>
</div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
} else</span></font>
</div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
System.out.println("Not
in the naming context");</span></font>
</div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
<br>
</span>
</font></div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
Server:</span></font>
</div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
CORBA::Short Login_impl::log_in (const char * user, const char *
password)</span></font>
</div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
{</span></font>
</div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
std::cout << "Login_impl::log_in" << std::endl;</span></font>
</div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
system("touch /tmp/login_impl");</span></font>
</div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
CORBA::Short ret;</span></font>
</div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
ret = 1;</span></font>
</div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
return m_return; </span></font>
</div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
}</span></font>
</div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
<br>
</span>
</font></div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
<br>
</span>
</font></div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
I used omniORB in the actual release version; the java client has been
done with jdk 1.5.</span></font>
</div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
<br>
</span>
</font></div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
The line: System.out.println("Returncode: " + ret); should print: </span></font>
</div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
<br>
</span>
</font></div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
Returncode: 1</span></font>
</div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
<br>
</span>
</font></div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
but it is printing:</span></font>
</div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
<br>
</span>
</font></div>
<div align="left">
<font face="Courier New" size="2"><span style="font-size: 10pt;">
Returncode: 10709</span></font>
</div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
<br>
</span>
</font></div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
What am I doing wrong? Am I doing something wrong or is it an
implementation problem?</span></font>
</div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
<br>
</span>
</font></div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
I did a dump with Ethereal/Wireshark, but it did not work.</span></font>
</div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
<br>
</span>
</font></div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
<One OS to rule them all,</span></font>
</div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
>One OS to find them,</span></font>
</div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
<One OS to bring them all</span></font>
</div>
<div align="left">
<font face="Arial" size="2"><span style="font-size: 10pt;">
>and in the darkness bind them.</span></font>
</div>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
omniORB-list mailing list
<a class="moz-txt-link-abbreviated" href="mailto:omniORB-list@omniorb-support.com">omniORB-list@omniorb-support.com</a>
<a class="moz-txt-link-freetext" href="http://www.omniorb-support.com/mailman/listinfo/omniorb-list">http://www.omniorb-support.com/mailman/listinfo/omniorb-list</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">
</pre>
</body>
</html>