summaryrefslogtreecommitdiff
path: root/TAO/tests/Param_Test/bd_short_seq.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/Param_Test/bd_short_seq.cpp')
-rw-r--r--TAO/tests/Param_Test/bd_short_seq.cpp85
1 files changed, 23 insertions, 62 deletions
diff --git a/TAO/tests/Param_Test/bd_short_seq.cpp b/TAO/tests/Param_Test/bd_short_seq.cpp
index 8412b139fdc..b46047ad57e 100644
--- a/TAO/tests/Param_Test/bd_short_seq.cpp
+++ b/TAO/tests/Param_Test/bd_short_seq.cpp
@@ -47,10 +47,32 @@ Test_Bounded_Short_Sequence::opname (void) const
}
void
-Test_Bounded_Short_Sequence::dii_req_invoke (CORBA::Request *req,
+Test_Bounded_Short_Sequence::dii_req_invoke (CORBA::Request *req,
CORBA::Environment &ACE_TRY_ENV)
{
+ req->add_in_arg ("s1") <<= this->in_.in ();
+ req->add_inout_arg ("s2") <<= this->inout_.in ();
+ req->add_out_arg ("s3") <<= this->out_.in ();
+ req->set_return_type (Param_Test::_tc_Bounded_Short_Seq);
+
req->invoke (ACE_TRY_ENV);
+ ACE_CHECK;
+
+ Param_Test::Bounded_Short_Seq *tmp;
+ req->return_value () >>= tmp;
+ this->ret_ = new Param_Test::Bounded_Short_Seq (*tmp);
+
+ CORBA::NamedValue_ptr arg2 =
+ req->arguments ()->item (1, ACE_TRY_ENV);
+ ACE_CHECK;
+ *arg2->value () >>= tmp;
+ this->inout_ = new Param_Test::Bounded_Short_Seq (*tmp);
+
+ CORBA::NamedValue_ptr arg3 =
+ req->arguments ()->item (2, ACE_TRY_ENV);
+ ACE_CHECK;
+ *arg3->value () >>= tmp;
+ this->out_ = new Param_Test::Bounded_Short_Seq (*tmp);
}
int
@@ -111,67 +133,6 @@ Test_Bounded_Short_Sequence::run_sii_test (Param_Test_ptr objref,
return -1;
}
-int
-Test_Bounded_Short_Sequence::add_args (CORBA::NVList_ptr param_list,
- CORBA::NVList_ptr retval,
- CORBA::Environment &ACE_TRY_ENV)
-{
- ACE_TRY
- {
- CORBA::Any in_arg (Param_Test::_tc_Bounded_Short_Seq,
- (void *) &this->in_.in (),
- 0);
-
- CORBA::Any inout_arg (Param_Test::_tc_Bounded_Short_Seq,
- &this->inout_.inout (),
- 0);
-
- CORBA::Any out_arg (Param_Test::_tc_Bounded_Short_Seq,
- &this->out_.inout (), // .out () causes crash
- 0);
-
- // add parameters
- param_list->add_value ("s1",
- in_arg,
- CORBA::ARG_IN,
- ACE_TRY_ENV);
- ACE_TRY_CHECK;
-
- param_list->add_value ("s2",
- inout_arg,
- CORBA::ARG_INOUT,
- ACE_TRY_ENV);
- ACE_TRY_CHECK;
-
- param_list->add_value ("s3",
- out_arg,
- CORBA::ARG_OUT,
- ACE_TRY_ENV);
- ACE_TRY_CHECK;
-
- // add return value type
- CORBA::NamedValue *item = retval->item (0,
- ACE_TRY_ENV);
- ACE_TRY_CHECK;
-
- item->value ()->replace (Param_Test::_tc_Bounded_Short_Seq,
- &this->ret_.inout (), // see above
- 0, // does not own
- ACE_TRY_ENV);
- ACE_TRY_CHECK;
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_Bounded_Short_Sequence::add_args\n");
-
- }
- ACE_ENDTRY;
- return -1;
-}
-
CORBA::Boolean
Test_Bounded_Short_Sequence::check_validity (void)
{