summaryrefslogtreecommitdiff
path: root/TAO/tests/Param_Test/except.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/Param_Test/except.cpp')
-rw-r--r--TAO/tests/Param_Test/except.cpp81
1 files changed, 18 insertions, 63 deletions
diff --git a/TAO/tests/Param_Test/except.cpp b/TAO/tests/Param_Test/except.cpp
index 09d7cd82cc8..b2832867328 100644
--- a/TAO/tests/Param_Test/except.cpp
+++ b/TAO/tests/Param_Test/except.cpp
@@ -49,8 +49,26 @@ Test_Exception::dii_req_invoke (CORBA::Request *req,
{
ACE_TRY
{
+ req->add_in_arg ("s1") <<= this->in_;
+ req->add_inout_arg ("s2") <<= this->inout_;
+ req->add_out_arg ("s3") <<= this->out_;
+
+ req->set_return_type (CORBA::_tc_long);
+
req->invoke (ACE_TRY_ENV);
ACE_TRY_CHECK;
+
+ req->return_value () >>= this->ret_;
+
+ CORBA::NamedValue_ptr o2 =
+ req->arguments ()->item (1, ACE_TRY_ENV);
+ ACE_CHECK;
+ *o2->value () >>= this->inout_;
+
+ CORBA::NamedValue_ptr o3 =
+ req->arguments ()->item (2, ACE_TRY_ENV);
+ ACE_CHECK;
+ *o3->value () >>= this->out_;
}
ACE_CATCH (CORBA::UnknownUserException, user_ex)
{
@@ -180,69 +198,6 @@ Test_Exception::run_sii_test (Param_Test_ptr objref,
return -1;
}
-int
-Test_Exception::add_args (CORBA::NVList_ptr param_list,
- CORBA::NVList_ptr retval,
- CORBA::Environment &ACE_TRY_ENV)
-{
- ACE_TRY
- {
- // we provide top level memory to the ORB to retrieve the data
- CORBA::Any in_arg (CORBA::_tc_ulong,
- &this->in_,
- 0);
-
- CORBA::Any inout_arg (CORBA::_tc_ulong,
- &this->inout_,
- 0);
-
- CORBA::Any out_arg (CORBA::_tc_ulong,
- &this->out_,
- 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. Let the ORB allocate storage. We simply tell the ORB
- // what type we are expecting.
- CORBA::NamedValue *item = retval->item (0,
- ACE_TRY_ENV);
- ACE_TRY_CHECK;
-
- item->value ()->replace (CORBA::_tc_ulong,
- &this->ret_,
- 0, // does not own
- ACE_TRY_ENV);
- ACE_TRY_CHECK;
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_Exception::add_args\n");
-
- }
- ACE_ENDTRY;
- return -1;
-}
-
CORBA::Boolean
Test_Exception::check_validity (void)
{