blob: 183bc338fd4a707dca92e08c8179aee89d27f278 (
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
53
54
55
|
// $Id$
#include "Test_impl.h"
#include "ace/OS_NS_stdio.h"
const char *ior_callback = "callback.ior";
const char *ior_server = "file://server.ior";
int
main (int argc, char *argv[])
{
int result = 0;
try
{
CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
CORBA::Object_var poa_object =
orb->resolve_initial_references("RootPOA");
PortableServer::POA_var root_poa =
PortableServer::POA::_narrow (poa_object.in ());
PortableServer::POAManager_var poa_manager =
root_poa->the_POAManager ();
poa_manager->activate ();
const char* uipmc_ior = "corbaloc:miop:1.0@1.0-domain-1/127.0.0.1:23232";
CORBA::Object_var obj =orb->string_to_object (uipmc_ior);
CORBA::Object_var tmp = orb->string_to_object (ior_server);
server_var server = server::_narrow (tmp.in ());
try
{
server->method (obj.in());
ACE_DEBUG ((LM_DEBUG, "Test passed !!\n"));
}
catch (const CORBA::SystemException& marshal)
{
ACE_DEBUG ((LM_ERROR, "Test Failed - Regression. "
"Sending UIPMC object ref to server failed with:\n"));
ACE_PRINT_EXCEPTION (marshal, "Exception : \n");
result = 1;
}
server->shutdown ();
}
catch(const CORBA::SystemException& e)
{
ACE_PRINT_EXCEPTION (e, "Unexpected exception - not a regression.\n");
result = 1;
}
return result;
}
|