[omniORB] about add_out_arg() in DII (add some missing statement)
zhang ji
zsfunl@yahoo.com
Tue Jul 9 23:06:00 2002
Hi all,
I try to find some reference in how to use the
add_out_arg() in DII for my problem:
Below is the interface:
"
struct Parameter {
string name;
any value;
};
typedef sequence<Parameter> ParameterSeq;
interface test {
long diiRequest(in ParameterSeq psin, out
ParameterSeq psout);
};
"
>From omniORB's doc, it said "For in/input arguments
the value must be initialised, for out arguments only
the type need be given." I inited the in parameters
and just gave one declaretion of out parameters like
below.
in my client I tried to use _request() to call the
diiRequest() function in server.
Below is the c++ client
"
ParameterSeq psinv, psoutv;
CORBA::Object_var obj =
orb->string_to_object(argv[1]);
CORBA::Request_var req = obj->_request("diiRequest");
// some init for psinv
...
//
req->add_in_arg() <<= psinv;
req->add_out_arg() <<= psoutv;
req->set_return_type(CORBA::_tc_long);
req->invoke();
"
Compiling is successful, but I got nothing from the
out result: psoutv but with SystemException.
I once try to set the psout as ParameterSrq_var, but
it also report error when run it.
So can anybody give some hint on that?
Thanks,
Shifeng
__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com