[omniORB] DII and struct as operation argument
Duncan Grisby
duncan at grisby.org
Fri Jul 24 16:25:47 BST 2009
On Wednesday 22 July, "Smits, Martin" wrote:
[...]
> - Create the _request(“add”)
>
> - Create the TypeCode for the item_list sequence and the add_info
> struct
>
> - Create DynamicAnys for the item_list and add_info from the
> TypeCodes
>
> - Fill in the values of all the fields
>
> - Convert the DynamicAny to an Any
>
> - Use add_in_arg(“input”) to add the Any as argument
Exactly what code are you using? From the symptoms, it looks as though
you are inserting your Any into the in arg Any -- i.e. you have an Any
inside an Any. That means the client is marshalling the request with an
Any as the argument.
I expect your code is something like this:
CORBA::Any arg = // value from the DynamicAny
CORBA::Request_var req = obj->_request("add");
req->add_in_arg() <<= arg;
That is inserting the Any into the Any that's returned by add_in_arg().
Instead, just use assignment:
req->add_in_arg() = arg;
Cheers,
Duncan.
--
-- Duncan Grisby --
-- duncan at grisby.org --
-- http://www.grisby.org --
More information about the omniORB-list
mailing list