1 #include "ace/Get_Opt.h"
3 #include "simple_testC.h"
5 const ACE_TCHAR
*ior
= ACE_TEXT("file://test.ior");
6 int server_shutdown
= 0;
9 parse_args (int argc
, ACE_TCHAR
*argv
[])
11 ACE_Get_Opt
get_opts (argc
, argv
, ACE_TEXT("k:x"));
14 while ((c
= get_opts ()) != -1)
18 ior
= get_opts
.opt_arg ();
26 ACE_ERROR_RETURN ((LM_ERROR
,
33 // Indicates successful parsing of the command line
40 // Defines a class that is used to test and understand the
41 // different ways of loading the default and advanced TAO
45 // A simple client which receives the CORBA boolean variabel
46 // from the server to indicate that everything went on good.
54 // ****************************************************************
61 ACE_TMAIN(int argc
, ACE_TCHAR
*argv
[])
66 CORBA::ORB_init (argc
, argv
);
68 if (parse_args (argc
, argv
) != 0)
71 CORBA::Object_var object
=
72 orb
->string_to_object (ior
);
74 Simple_Server_var server
=
75 Simple_Server::_narrow (object
.in ());
77 if (CORBA::is_nil (server
.in ()))
79 ACE_ERROR_RETURN ((LM_ERROR
,
80 "Object reference <%s> is nil.\n",
85 // Invoke a request on the server
86 CORBA::Boolean ret_value
=
87 server
->print_status ();
92 "The server has been contacted !!\n",
103 catch (const CORBA::Exception
& ex
)
105 ex
._tao_print_exception ("Caught exception:");