Merge pull request #2303 from jwillemsen/jwi-803
[ACE_TAO.git] / TAO / tests / Portable_Interceptors / AdvSlotExt / client.cpp
blob4d413d9859a6e1f42653b0875bcc008b9048023b
1 // author : Boris Kolpackov <boris@dre.vanderbilt.edu>
2 #include "StateTransferC.h"
4 int
5 ACE_TMAIN(int argc, ACE_TCHAR *argv[])
7 try
9 CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
11 if (argc != 2)
13 ACE_DEBUG ((LM_ERROR, "Usage: %s <ior>\n", argv[0]));
14 return -1;
17 CORBA::Object_var obj = orb->string_to_object (argv[1]);
18 StateTransfer_var server = StateTransfer::_narrow (obj.in ());
20 CORBA::Short n = server->number ();
22 ACE_DEBUG ((LM_ERROR, "Got number %d\n", n));
24 server->shutdown ();
26 catch (const ::CORBA::Exception &ex)
28 ex._tao_print_exception ("ERROR : unexpected CORBA exception caught : ");
29 return 1;
31 return 0;