2 #include "ace/Get_Opt.h"
4 #include "tao/Strategies/advanced_resource.h"
5 #include "tao/Strategies/OC_Endpoint_Selector_Loader.h"
7 const ACE_TCHAR
*ior
= ACE_TEXT("file://test.ior");
10 parse_args (int argc
, ACE_TCHAR
*argv
[])
12 ACE_Get_Opt
get_opts (argc
, argv
, ACE_TEXT("k:"));
15 while ((c
= get_opts ()) != -1)
19 ior
= get_opts
.opt_arg ();
24 ACE_ERROR_RETURN ((LM_ERROR
,
31 // Indicates successful parsing of the command line
36 ACE_TMAIN(int argc
, ACE_TCHAR
*argv
[])
41 CORBA::ORB_init (argc
, argv
);
43 if (parse_args (argc
, argv
) != 0)
46 CORBA::Object_var tmp
=
47 orb
->string_to_object(ior
);
49 Test::Hello_var hello
=
50 Test::Hello::_narrow(tmp
.in ());
52 if (CORBA::is_nil (hello
.in ()))
54 ACE_ERROR_RETURN ((LM_DEBUG
,
55 "Nil Test::Hello reference <%s>\n",
60 CORBA::String_var the_string
= hello
->get_string ();
62 ACE_DEBUG ((LM_DEBUG
, "(%P|%t) - string returned <%C>\n",
69 catch (const CORBA::TRANSIENT
& )
71 ACE_DEBUG ((LM_DEBUG
, "(%P|%t) Expected CORBA::TRANSIENT caught\n"));
73 catch (const CORBA::Exception
& ex
)
75 ex
._tao_print_exception ("Exception caught:");