[omniORB] setting return type to be an array
Duncan Grisby
duncan@grisby.org
Sat Sep 21 22:46:02 2002
On Monday 9 September, "Sveta Shasharina" wrote:
> After I query an Interface Repository and fugure out that the return
> type is an array, I want to set this type to return type in my request
> object:
OK.
> CORBA::TypeCode_var retType = method.result;
> //I check on this to see that retType->kind() is CORBA::tk_alias
> //and I know that it is of type
> //typedef long LongArray [3]
> //so I do this:
> retType = retType->content_type();
You shouldn't need to do this, but it shouldn't hurt.
> //At this point it of kind CORBA::tk_array.
> //After that I create request object req: skipped here
> //And set the return type
>
> req->set_return_type(retType);
>
> When I try to invoke, I get an exception as if the IFR does not
> recongnize the return type as the correct return type of the method.
What exception do you get? The IfR is not involved at all in a DII
call, so you can't be getting an exception from that. I've just tried
an example, by modifying the omniORB DII example, and it works fine
for me.
Can you post a more complete code example that shows the problem?
Cheers,
Duncan.
--
-- Duncan Grisby --
-- duncan@grisby.org --
-- http://www.grisby.org --