blob: ad64a1153a15ee0f2426b67ddb0424d4d05c8e01 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
// $Id$
// ******************************************************************
// Include Section
// ******************************************************************
#include "Notify_Test_Client.h"
#include "ace/Get_Opt.h"
#include "ace/Argv_Type_Converter.h"
int
ACE_TMAIN (int argc, ACE_TCHAR* argv[])
{
int status = 0;
try
{
Notify_Test_Client client;
ACE_Argv_Type_Converter argcon (argc, argv);
status = client.init (argcon.get_argc (), argcon.get_TCHAR_argv ());
if (status == 0)
{
CosNaming::NamingContext_ptr naming = client.naming_context ();
if (CORBA::is_nil (naming))
{
ACE_ERROR_RETURN ((LM_ERROR,
"Can't find naming service\n"),
1);
}
CosNaming::Name name (1);
name.length (1);
name[0].id = CORBA::string_dup ("Channel1");
CORBA::Object_var obj1 = naming->resolve (name);
ACE_DEBUG ((LM_DEBUG, ACE_TEXT("Successfully retrieved Challel1\n")));
name[0].id = CORBA::string_dup ("Channel2");
CORBA::Object_var obj2 = naming->resolve (name);
ACE_DEBUG ((LM_DEBUG, ACE_TEXT("Successfully retrieved Challel2\n")));
}
}
catch (const CORBA::Exception& e)
{
e._tao_print_exception ("Error: ");
status = 1;
}
return status;
}
|