2 #include "ace/Get_Opt.h"
4 const ACE_TCHAR
*ior
= ACE_TEXT("file://test.ior");
7 parse_args (int argc
, ACE_TCHAR
*argv
[])
9 ACE_Get_Opt
get_opts (argc
, argv
, ACE_TEXT("k:"));
12 while ((c
= get_opts ()) != -1)
16 ior
= get_opts
.opt_arg ();
21 ACE_ERROR_RETURN ((LM_ERROR
,
28 // Indicates successful parsing of the command line
33 ACE_TMAIN(int argc
, ACE_TCHAR
*argv
[])
38 CORBA::ORB_init (argc
, argv
);
40 if (parse_args (argc
, argv
) != 0)
43 CORBA::Object_var tmp
=
44 orb
->string_to_object(ior
);
46 Test::Hello_var hello
=
47 Test::Hello::_narrow(tmp
.in ());
49 if (CORBA::is_nil (hello
.in ()))
51 ACE_ERROR_RETURN ((LM_DEBUG
,
52 "Nil Test::Hello reference <%s>\n",
57 CORBA::String_var A
= CORBA::string_dup ("DKWC");
58 CORBA::String_var B
= CORBA::string_dup ("kwc");
59 CORBA::String_var C
= CORBA::string_dup ("MV-files");
60 CORBA::String_var the_string
=
61 hello
->get_string (A
.in (), B
.in (), C
.in ());
63 ACE_DEBUG ((LM_DEBUG
, "(%P|%t) - string returned <%C>\n",
70 catch (const CORBA::Exception
& ex
)
72 ex
._tao_print_exception ("Exception caught:");