3 #include "ace/Get_Opt.h"
5 const ACE_TCHAR
*ior
= ACE_TEXT("file://test.ior");
8 parse_args (int argc
, ACE_TCHAR
*argv
[])
10 ACE_Get_Opt
get_opts (argc
, argv
, ACE_TEXT("k:"));
13 while ((c
= get_opts ()) != -1)
17 ior
= get_opts
.opt_arg ();
22 ACE_ERROR_RETURN ((LM_ERROR
,
29 // Indicates successful parsing of the command line
35 ACE_TMAIN(int argc
, ACE_TCHAR
*argv
[])
37 int received_expected_exception
= 0;
41 CORBA::ORB_init (argc
, argv
);
43 if (parse_args (argc
, argv
) != 0)
46 CORBA::Object_var object
=
47 orb
->string_to_object (ior
);
49 Test::Roundtrip_var roundtrip
=
50 Test::Roundtrip::_narrow (object
.in ());
52 if (CORBA::is_nil (roundtrip
.in ()))
54 ACE_ERROR_RETURN ((LM_ERROR
,
55 "Nil Test::Roundtrip reference <%s>\n",
61 Test::Timestamp time
= 10;
62 roundtrip
->test_method (time
);
64 catch (const Test::ServerOverload
& )
66 ACE_DEBUG ((LM_DEBUG
, "Received expected exception\n"));
67 received_expected_exception
= 1;
69 roundtrip
->shutdown ();
74 catch (const CORBA::Exception
& ex
)
76 ex
._tao_print_exception ("");
80 if(!received_expected_exception
)
82 ACE_ERROR_RETURN ((LM_ERROR
,
83 "ERROR, expecting a ServerOverload exception!!\n"),