3 #include "ace/Get_Opt.h"
4 #include "ace/OS_NS_unistd.h"
6 #include "tao/Messaging/Messaging.h"
12 parse_args (int argc
, ACE_TCHAR
*argv
[])
14 ACE_Get_Opt
get_opts (argc
, argv
, ACE_TEXT(""));
17 while ((c
= get_opts ()) != -1)
22 ACE_ERROR_RETURN ((LM_ERROR
,
28 // Indicates successful parsing of the command line
33 ACE_TMAIN (int argc
, ACE_TCHAR
*argv
[])
37 CORBA::ORB_var orb
= CORBA::ORB_init(argc
, argv
);
39 if (parse_args (argc
, argv
) != 0)
42 CORBA::Object_var obj
= orb
->resolve_initial_references("Test");
43 if (CORBA::is_nil(obj
.in()))
45 ACE_DEBUG ((LM_DEBUG
, "Client could not RIR Test\n"));
48 Test_var test
= Test::_narrow( obj
.in());
49 if (CORBA::is_nil(test
.in()))
51 ACE_DEBUG ((LM_DEBUG
, "Client could not narrow Test\n"));
55 test
->_stubobj()->reset_profiles();
60 a
<<= Messaging::SYNC_WITH_SERVER
;
62 CORBA::PolicyList
policy_list (1);
63 policy_list
.length (1);
65 orb
->create_policy (Messaging::SYNC_SCOPE_POLICY_TYPE
, a
);
67 obj
= test
->_set_policy_overrides (policy_list
, CORBA::ADD_OVERRIDE
);
68 test
= Test::_narrow ( obj
.in());
70 test
->_stubobj()->reset_profiles();
74 CORBA::Short n
= test
->get_call_count();
76 "Got call count of %d\n",
81 catch(const CORBA::Exception
& ex
) {
82 ex
._tao_print_exception ("client:");