<font face="'Times New Roman'"><span style="font-size:medium">Hello,</span></font><div>
<font face="'Times New Roman'"><span style="font-size:medium"><br></span></font></div>
<div><font face="'Times New Roman'"><span style="font-size:medium">I am a newbie to CORBA, and I am entrusted with a responsibility to provide a CORBA interface to our clients , for a server-side application that we have. </span></font></div>
<div><font face="'Times New Roman'"><span style="font-size:medium"><br></span></font></div>
<div><font face="'Times New Roman'"><span style="font-size:medium">The client would be running JAVA, and the server would be in C++. I have decided to use OmniORB for the C++ part, and I am following the User's guide in <a href="http://omniorb.sourceforge.net/omni40/omniORB/index.html" target="_blank">http://omniorb.sourceforge.net/omni40/omniORB/index.html</a> , for guidance:</span></font></div>
<div><font face="'Times New Roman'"><span style="font-size:medium"><br></span></font></div>
<div><font face="'Times New Roman'"><span style="font-size:medium">I created an IDL file dummychannel.idl:</span></font></div>
<div><font face="'Times New Roman'"><span style="font-size:medium"><br></span></font></div>
<div><font face="'Times New Roman'"><span style="font-size:medium"><div><i>#ifndef _ChannelAttributes_idl_</i></div><div><i>#define _ChannelAttributes_idl_</i></div>
<div><i>#endif</i></div><div><i><br></i></div><div><i>module ChannelAttributesDefs</i></div><div><i>{</i></div><div><span style="white-space:pre-wrap"><i>        </i></span><i>// Interface to the Channel attributes </i></div>
<div><span style="white-space:pre-wrap"><i>        </i></span><i>interface channel_attributes</i></div><div><span style="white-space:pre-wrap"><i>        </i></span><i>{</i></div><div><span style="white-space:pre-wrap"><i>                </i></span><i>//Thrown when authentication fails</i></div>
<div><span style="white-space:pre-wrap"><i>                </i></span><i>exception login_failed {};</i></div><div><i><br></i></div><div><span style="white-space:pre-wrap"><i>                </i></span><i>//Authentication first, rest later</i></div>
<div><span style="white-space:pre-wrap"><i>                </i></span><i>void login(in string name, in string value, out long session_id)</i></div><div><span style="white-space:pre-wrap"><i>                        </i></span><i>raises (login_failed); </i><span style="white-space:pre-wrap"><i>                        </i></span></div>
<div><i><br></i></div><div><span style="white-space:pre-wrap"><i>        </i></span><i>};</i></div><div><i>};</i></div><div><br></div><div>I have a couple of questions regarding this file:</div><div>1. Instead of saying <span style="font-family:arial;font-size:small"><i>void login(in string name, in string value, out long session_id), </i>if I say, </span></div>
<div><span style="font-family:arial;font-size:small"><i> long</i></span><span style="font-family:arial;font-size:small"><i> login(in string name, in string value), </i></span><span style="font-family:arial;font-size:small">is it the same ? If not, could someone help me understand the difference ? </span></div>
<div><span style="font-family:arial;font-size:small"><br></span></div><div><span style="font-family:arial;font-size:small">2. According to the guide above, the .h file generated will have a class like class POA_xxxxxxxxx ,and that will be the skeleton class. But in my generated file, I do not see a class like that.</span></div>
<div><span style="font-family:arial;font-size:small">The command I used: </span></div><div><span style="font-family:arial;font-size:small"> <i>omniidl -bcxx -Wbh=.h <a href="http://dummychannel.id">dummychannel.id</a></i></span></div>
<div><span style="font-family:arial;font-size:small"><br></span></div><div><span style="font-family:arial;font-size:small"> I have copy pasted the relvant portion of the generated .h below: </span></div>
<div><font class="Apple-style-span" face="arial"><span class="Apple-style-span" style="font-size: small;"><br></span></font></div>
<div><font face="arial"><span style="font-size:small"><div> class channel_attributes;</div><div> class _objref_channel_attributes;</div><div> class _impl_channel_attributes;</div>
<div> </div><div> typedef _objref_channel_attributes* channel_attributes_ptr;</div><div> typedef channel_attributes_ptr channel_attributesRef;</div><div><br></div><div> class channel_attributes_Helper {</div><div> public:</div>
<div> ...... </div><div> };</div><div><br></div><div>....</div><div> class channel_attributes {</div><div> public:</div><div><br></div><div> // Other IDL defined within this scope.</div><div> class login_failed : public CORBA::UserException {</div>
<div> public:</div><div> ................... </div><div> private:</div><div> };</div><div> };</div><div><br></div><div> class _objref_channel_attributes :</div>
<div>
public virtual CORBA::Object, public virtual omniObjRef</div><div> {</div><div> public:</div><div> void login(const char* name, const char* value, CORBA::Long& session_id);</div><div> ..</div><div> protected:</div>
<div> virtual ~_objref_channel_attributes();</div><div> private:</div><div> ............</div><div> };</div><div><br></div><div> class _pof_channel_attributes : public _OMNI_NS(proxyObjectFactory) {</div><div> public:</div>
<div> .......</div><div> };</div><div><br></div>
<div> class _impl_channel_attributes :</div><div> public virtual omniServant</div><div> {</div><div> public:</div><div> virtual ~_impl_channel_attributes();</div><div> virtual void login(const char* name, const char* value, CORBA::Long& session_id) = 0;</div>
<div> </div><div> public: // Really protected, workaround for xlC</div><div> ...</div><div> private:</div><div> .....</div><div> };</div><div><br></div><div><br></div><div>_CORBA_MODULE_END</div><div><br>
</div><div><br></div><div><br></div><div>_CORBA_MODULE POA_ChannelAttributesDefs</div>
<div>_CORBA_MODULE_BEG</div><div><br></div><div> class channel_attributes :</div><div> public virtual ChannelAttributesDefs::_impl_channel_attributes,</div><div> public virtual PortableServer::ServantBase</div><div>
{</div><div> public:</div><div> virtual ~channel_attributes();</div><div><br></div><div> inline ::ChannelAttributesDefs::channel_attributes_ptr _this() {</div><div> return (::ChannelAttributesDefs::channel_attributes_ptr) _do_this(::ChannelAttributesDefs::channel_attributes::_PD_repoId);</div>
<div> }</div><div> };</div><div><br></div><div>_CORBA_MODULE_END</div><div><br></div><div><br></div><div>Thank you in anticipation</div><div>RegardsSankar</div></span></font></div></span></font></div>