2 #include "sum_serverC.h"
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
.optarg
;
20 ACE_ERROR_RETURN ((LM_ERROR
,
31 ACE_TMAIN(int argc
, ACE_TCHAR
*argv
[])
36 CORBA::ORB_init (argc
, argv
, "client_sum_orb");
38 if (parse_args (argc
, argv
) != 0)
41 CORBA::Object_var obj
=
42 orb
->string_to_object (ior
);
44 ORT::sum_server_var server
=
45 ORT::sum_server::_narrow (obj
.in ());
47 if (CORBA::is_nil (server
.in ()))
49 ACE_ERROR_RETURN ((LM_ERROR
,
50 "Object reference <%s> is nil.\n",
58 CORBA::ULong result
= server
->add_variables (a
,
63 "Error: Add Variables did not return the right value\n"));
65 catch (const CORBA::Exception
& ex
)
67 ex
._tao_print_exception ("ORT example on client side :");