[omniORB] Is this possible?

Visscher, Bruce VISSCHB at RJRT.com
Thu Jun 2 11:41:23 BST 2005



> -----Original Message-----
> From: omniorb-list-bounces at omniorb-support.com
> [mailto:omniorb-list-bounces at omniorb-support.com]On Behalf Of Clarke
> Brunt
> Sent: Thursday, June 02, 2005 7:22 AM
> To: 'Sang-Hoon, Lee'; omniorb-list at omniorb-support.com
> Subject: RE: [omniORB] Is this possible?
> 
> 
> > -----Original Message-----
> > I'm a newbie about CORBA progamming. 
> > I have a question. Is this possible not using idl definition on
> > omniORB? please, see the follow (Pseudo )code.

Yes, but if you are truly a newbie, I wouldn't advise it.  If you
really are interested in doing this then let me suggest that you
study Any, DynAny, DII, and DSI in the CORBA spec before attempting
to do that.

I believe Clark addressed the problem with your specific example.

> > 
> > struct Something_s {
> >     unsigned int index;
> >     char * data;
> > };
> > 
> > Something_s myStruct;
> > myStruct.index = 100;
> > myStruct.data = "Blah Blah";
> > 
> > mySend(&myStruct, sizeof(myStruct));
> > 
> > This code is wrapped upon CORBA code...
> 
> I've not studied your pseudo-code in detail, but you appear 
> to be sending a
> 'char *' pointer from client to server. The value of the 
> pointer is probably
> being transmitted correctly, but will be meaningless in the 
> context of the
> server (it won't point to the characters, which haven't been 
> transmitted).
> 
> You will have to include the actual string of characters in 
> your structure
> for thie to work (and bear in mind that using sequence<octet> 
> for everything
> won't work if your client/server disagree about byte-ordering etc.

Of course, I agree with this.  I can't help but wonder, though, why
you don't want to pass something like:

struct Something_s {
  unsigned long index;
  string data;
};

through an IDL compiler.  Then you could (if you really wanted to)
pass this as an Any to an interface.

> 
> -- 
> Clarke Brunt, Principal Software Engineer, Trafficmaster
> 
> 
> _______________________________________________
> omniORB-list mailing list
> omniORB-list at omniorb-support.com
> http://www.omniorb-support.com/mailman/listinfo/omniorb-list
> 

-----------------------------------------
CONFIDENTIALITY NOTE:  This e-mail message, including any  attachment(s),
contains information that may be confidential,  protected by the attorney-
client or other legal privileges, and/or  proprietary non-public
information.  If you are not an intended  recipient of this message or an
authorized assistant to an intended  recipient, please notify the sender by
replying to this message and  then delete it from your system.  Use,
dissemination, distribution,  or reproduction of this message and/or any of
its attachments (if  any) by unintended recipients is not authorized and
may be unlawful.




More information about the omniORB-list mailing list