[omniORB] Newbie question
Sankar S Salvady
sankarasubramanian.s at gmail.com
Wed Oct 13 17:39:31 BST 2010
Hello,
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.
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 http://omniorb.sourceforge.net/omni40/omniORB/index.html , for guidance:
I created an IDL file dummychannel.idl:
*#ifndef _ChannelAttributes_idl_*
*#define _ChannelAttributes_idl_*
*#endif*
*
*
*module ChannelAttributesDefs*
*{*
* **// Interface to the Channel attributes *
* **interface channel_attributes*
* **{*
* **//Thrown when authentication fails*
* **exception login_failed {};*
*
*
* **//Authentication first, rest later*
* **void login(in string name, in string value, out long session_id)*
* **raises (login_failed); ** *
*
*
* **};*
*};*
I have a couple of questions regarding this file:
1. Instead of saying *void login(in string name, in string value, out long
session_id), *if I say,
* long** login(in string name, in string value), *is it the same ?
If not, could someone help me understand the difference ?
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.
The command I used:
*omniidl -bcxx -Wbh=.h dummychannel.id*
I have copy pasted the relvant portion of the generated .h below:
class channel_attributes;
class _objref_channel_attributes;
class _impl_channel_attributes;
typedef _objref_channel_attributes* channel_attributes_ptr;
typedef channel_attributes_ptr channel_attributesRef;
class channel_attributes_Helper {
public:
......
};
....
class channel_attributes {
public:
// Other IDL defined within this scope.
class login_failed : public CORBA::UserException {
public:
...................
private:
};
};
class _objref_channel_attributes :
public virtual CORBA::Object, public virtual omniObjRef
{
public:
void login(const char* name, const char* value, CORBA::Long&
session_id);
..
protected:
virtual ~_objref_channel_attributes();
private:
............
};
class _pof_channel_attributes : public _OMNI_NS(proxyObjectFactory) {
public:
.......
};
class _impl_channel_attributes :
public virtual omniServant
{
public:
virtual ~_impl_channel_attributes();
virtual void login(const char* name, const char* value, CORBA::Long&
session_id) = 0;
public: // Really protected, workaround for xlC
...
private:
.....
};
_CORBA_MODULE_END
_CORBA_MODULE POA_ChannelAttributesDefs
_CORBA_MODULE_BEG
class channel_attributes :
public virtual ChannelAttributesDefs::_impl_channel_attributes,
public virtual PortableServer::ServantBase
{
public:
virtual ~channel_attributes();
inline ::ChannelAttributesDefs::channel_attributes_ptr _this() {
return (::ChannelAttributesDefs::channel_attributes_ptr)
_do_this(::ChannelAttributesDefs::channel_attributes::_PD_repoId);
}
};
_CORBA_MODULE_END
Thank you in anticipation
RegardsSankar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20101013/d4f5347d/attachment.htm
More information about the omniORB-list
mailing list