[omniORB] setting return type to be an array

Sveta Shasharina sveta@txcorp.com
Mon Sep 9 19:50:02 2002


Hi,
I have posted this question some time ago on comp.object.corba but nobody
responded.  Since I am using omniORB, I will repeat my question here.


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:

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();
//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.
I also tried to skip
the second line (with content_type): same result.  I tested the same
thing with the return type being a short int, keeping all the other
parameters the same.  It worked.  So I know that it has to do with
setting the return type.

Thanks,

Thanks,