[omniORB] Is this possible?

Clarke Brunt clarke.brunt at trafficmaster.co.uk
Thu Jun 2 13:21:51 BST 2005


> -----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.
> 
> 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.

-- 
Clarke Brunt, Principal Software Engineer, Trafficmaster




More information about the omniORB-list mailing list