2 //=============================================================================
6 * This is the client program that tests TAO's Smart Proxy extension.
8 * @author Kirthika Parameswaran <kirthika@cs.wustl.edu>
10 //=============================================================================
13 #define ACE_BUILD_SVC_DLL
14 #include "ace/Get_Opt.h"
16 #include "ace/OS_NS_string.h"
18 const ACE_TCHAR
*ior
= ACE_TEXT("file://test.ior");
21 parse_args (int argc
, ACE_TCHAR
*argv
[])
23 ACE_Get_Opt
get_opts (argc
, argv
, ACE_TEXT("i:"));
26 while ((c
= get_opts ()) != -1)
30 ior
= get_opts
.opt_arg ();
34 ACE_ERROR_RETURN ((LM_ERROR
,
45 ACE_TMAIN(int argc
, ACE_TCHAR
*argv
[])
50 CORBA::ORB_init (argc
,
53 if (parse_args (argc
, argv
) != 0)
56 CORBA::Object_var object
=
57 orb
->string_to_object (ior
);
59 // To use the smart proxy just enter it as a svc.conf
63 Test::_narrow (object
.in ());
65 if (CORBA::is_nil (server
.in ()))
66 ACE_ERROR_RETURN ((LM_ERROR
,
67 "Object reference <%s> is nil.\n",
77 catch (const CORBA::Exception
& ex
)
79 ex
._tao_print_exception ("Client-side exception:");