blob: 67bc8f755573f79a338356b2e25229fd78b277a8 (
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
This is test to exercise the corbaloc: and corbaname: style URL.
The simple way to test is to run the run_test.pl.
The corbaloc: and corbaname: URL syntax is documented in Chapter
13.6.7 "Object URLs", of the CORBA 2.4.2 specification:
ftp://ftp.omg.org/pub/docs/formal/01-02-01.pdf
To test manually:
1. Run the NamingService at a specified endpoint.
$NamingService -m 1 -ORBEndPoint iiop://doc.ece.uci.edu:12345 &
2. Run the server.
./server STATUS -ORBInitRef NameService=corbaloc:iiop:doc.ece.uci.edu:12345 &
This will create a corbaloc::Status CORBA object and register
the object reference in the Naming Service with the name
STATUS.
3. The client takes in a corbaloc style URL for the CORBA
Naming Service on the command-line. The client will
first try to resolve the Naming Service using this corbaloc URL.
The client will then try to resolve a corbaloc::Status object
(see corbaloc.idl) named "STATUS".
The client will then try to invoke the print_status() method
on this object.
Run the client as one of these:
a) ./client corbaloc::doc.ece.uci.edu:12345/NameService
CORBALOC style URL is used and the protocol used to
contact the naming context is <iiop> implicitly.
b) ./client corbaloc:iiop:doc.ece.uci.edu:12345/NameService
CORBALOC style URL is used and the protocol used to
contact the naming context is <iiop>.
c) ./client corbaloc:rir:/NameService
CORBALOC style URL is used and the protocol used to
contact the naming context is <rir>.
d) ./client corbaloc:rir:/
CORBALOC style URL is used with resolve initial references (rir)
format. Since no object key is specified, it defaults
to "NameService"
4. The corbaname_client will try to look up an object in the
CORBA Naming Service based on the corbaname URL passed in on the
command line. The corbaname_client will resolve the object,
and then narrow it down to a corbaloc::Status object. The
corbaname_client will then try to invoke the print_status() method
on the object.
Run the corbaname_client as one of these:
a) ./corbaname_client corbaname:iiop:doc.ece.uci.edu:12345#STATUS
- Specify the protocol, host, and port where the Naming Service is.
- Resolve an object reference of name "STATUS".
b) ./corbaname_client corbaname::doc.ece.uci.edu:12345#STATUS
- Do not specify the protocol (defaults to iiop).
- Specify where the host and port of the Naming Service is.
- Resolve an object reference of name "STATUS".
c) ./corbaname_client corbaname:rir:#STATUS
- Determine where the Naming Service is by using
orb->resolve_initial_references("NameService")
- Resolve an object reference of name "STATUS"
|