1
<?xml version="1.0" encoding="latin1" ?>
2
<!DOCTYPE chapter SYSTEM "chapter.dtd">
9
<holder>Ericsson AB, All Rights Reserved</holder>
12
The contents of this file are subject to the Erlang Public License,
13
Version 1.1, (the "License"); you may not use this file except in
14
compliance with the License. You should have received a copy of the
15
Erlang Public License along with this software. If not, it can be
16
retrieved online at http://www.erlang.org/.
18
Software distributed under the License is distributed on an "AS IS"
19
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
20
the License for the specific language governing rights and limitations
23
The Initial Developer of the Original Code is Ericsson AB.
26
<title>OrberWeb</title>
27
<prepared>Nick</prepared>
29
<date>2001-11-22</date>
34
<title>Using OrberWeb</title>
35
<p><c>OrberWeb</c> is intended to make things easier when developing and
36
testing applications using <c>Orber</c>. The user is able to interact
37
with <c>Orber</c> via a GUI by using a web browser.</p>
38
<p><c>OrberWeb</c> requires that the application <c>WebTool</c> is available and
39
started on at least one node; if so <c>OrberWeb</c> can usually be used to
40
to access <c>Orber</c> nodes supporting the Interoperable Naming
41
Service. How to start OrberWeb is described in
42
<seealso marker="ch_orberweb#startorberweb">Starting OrberWeb</seealso></p>
43
<p>The <c>OrberWeb</c> GUI consists of a <em>Menu Frame</em> and a
44
<em>Data Frames</em>.</p>
47
<title>The Menu Frame</title>
48
<p>The menu frame consists of:</p>
49
<list type="bulleted">
50
<item><em>Node List</em> - which node to access.</item>
51
<item><em>Configuration</em> - see how Orber on the current node is configured.</item>
52
<item><em>Name Service</em> - browse the NameService and add/remove a Context/Object.</item>
53
<item><em>IFR Types</em> - see which types are registered in IFR.</item>
54
<item><em>Create Object</em> - create a new object and, possibly, store it in the NameService.</item>
57
<marker id="menuframe"></marker>
58
<image file="menuframe">
59
<icaption>The Menu Frame.</icaption>
61
<p>Which nodes we can access is determined by what is returned when invoking <c>[node()|nodes()]</c>.
62
If you cannot see a desired node in the list, you have to call <c>net_adm:ping(Node)</c>.
63
But this requires that the node is started with the distribution switched on
64
(e.g. <c>erl -sname myNode</c>); this also goes for the node <c>OrberWeb</c> is running on.</p>
68
<title>The Configuration Data Frame</title>
69
<p>When accessing the <em>Configuration</em> page OrberWeb presents a table containing the
70
<seealso marker="ch_install#config">configuration settings</seealso> for the target node.</p>
72
<marker id="dataframe3"></marker>
73
<image file="dataframe3">
74
<icaption>Configuration Settings.</icaption>
76
<p>It is also possible to change those configuration parameters which can be changed when Orber
77
is already started. The Key-Value pairs is given as a list of tuples, e.g.,
78
<em>[{orber_debug_level, 5}, {iiop_timeout, 60}, {giop_version, {1,2}}]</em>. If one tries to update a parameter
79
which may not be changed an error message will be displayed.</p>
83
<title>The IFR Data Frame</title>
84
<p>All types registered in the IFR (Interface Repository) which have an associated IFR-id
85
can be viewed via the IFR Data Frame. This gives the user an easy way to confirm that
86
all necessary IDL-specifications have been properly registered. All available types are
87
listed when choosing <c>IFR Types</c> in the menu frame:</p>
89
<marker id="dataframe1"></marker>
90
<image file="dataframe1">
91
<icaption>Select Type.</icaption>
93
<p>After selecting a type all definitions of that particular type will be displayed. If no such
94
bindings exists the table will be empty.</p>
95
<p>Since Orber adds definitions to the IFR when it is installed (e.g. CosNaming), not only
96
types defined by the user will show up in the table. In the figure below you find the
97
the NameService exceptions listed.</p>
99
<marker id="dataframe2"></marker>
100
<image file="dataframe2">
101
<icaption>List Registered Exceptions.</icaption>
106
<title>The NameService Data Frame</title>
107
<p>The NameService main purpose is to make possible to bind object references, which
108
can client applications can resolve and invoke operations on. Initially, the NameService
109
is empty. The most common scenario, is that user applications create Contexts and add objects
110
in the NameService. OrberWeb allows the user to do the very same thing.</p>
111
<p>When referencing an object or context you must use stringified NameComponents.
112
For more information see the <seealso marker="ch_naming_service">Interoperable Naming Service</seealso>.
113
In the following example we will use the string <em>org/erlang/TheObjectName</em>, where
114
<em>org</em> and <em>erlang</em> will be contexts and <em>TheObjectName</em>
115
the name the object will be bound to.</p>
116
<p>Since the NameService is empty in the beginning, the only thing we can do is creating
117
a new context. Simply write <em>org</em> in the input field and press <c>New Context</c>.
118
If OrberWeb was able to create the context or not, is shown in the completion message.
119
If successful, just press the <c>Go Back</c> button. Now, a link named <em>org</em> should
120
be listed in the table. In the right column the context type is displayed. Contexts are
121
associated with <em>ncontext</em> and objects with <em>nobject</em>.</p>
123
<marker id="dataframe5"></marker>
124
<image file="dataframe5">
125
<icaption>Add a New Context.</icaption>
127
<p>To create the next level context (i.e. erlang), simply follow the link and repeat the procedure.
128
If done correctly, a table containing the same data as the following figure should be the result
129
if you follow the <em>erlang</em> link. Note, that the path is displayed in the yellow
132
<p>If a context does not contain any sub-contexts or object bindings, it is possible to
133
delete the context. If these requirements are met, a <c>Delete Context</c> button will appear.
134
A completion status message will be displayed after deleting the context.</p>
136
<marker id="dataframe6"></marker>
137
<image file="dataframe6">
138
<icaption>Delete Context.</icaption>
140
<p>Now it is possible to bind an object using the complete name string. To find out how this is
141
done using OrberWeb see <seealso marker="ch_orberweb#create">Object Creation</seealso>.
142
For now, we will just assume that an object have been created and bound as <em>TheObjectName</em>. </p>
144
<marker id="dataframe7"></marker>
145
<image file="dataframe7">
146
<icaption>Object Stored in the NameService.</icaption>
148
<p>If you follow the <em>TheObjectName</em> link, data about the bound object will be
149
presented. Note, depending on which type of object it is, the information given differs.
150
It would, for example, not be possible to display a Pid for all types of objects since
151
it might reside on a Java-ORB. In the figure below a CosNotification FilterFactory have
152
been bound under the name <em>org/erlang/TheObjectName</em>.</p>
154
<marker id="dataframe8"></marker>
155
<image file="dataframe8">
156
<icaption>Object Data.</icaption>
158
<p>OrberWeb also makes it possible to remove a binding and dispose the associated object.
159
Pressing <em>Unbind</em> the binding will be removed but the object will still exist.
160
But, if the <em>Unbind and Dispose</em> button is pressed, the binding will be removed
161
and the object terminated.</p>
165
<title>The Object Creation Data Frame</title>
166
<marker id="create"></marker>
167
<p>This part makes it possible to create a new object and, if wanted, store it the
170
<marker id="dataframe4"></marker>
171
<image file="dataframe4">
172
<icaption>Create a New Object.</icaption>
174
<list type="bulleted">
175
<item><em>Module</em> - simply type the name of the module of the object type
176
you want to create. If the module begins with a capital letter, we normally must
177
write <c>'Module_Interface'</c>. But, when using OrberWeb, you shall <em>NOT</em>.
178
Since we cannot create linked objects this is not an option.</item>
179
<item><em>Arguments</em> - the supplied arguments must be written as a single Erlang term.
180
That is, as a list or tuple containing other Erlang terms. The arguments will be
181
passed to the <c>init</c> function of the object. It is, however, not possible
182
to use Erlang records. If OrberWeb is not able to parse the arguments, an error message
183
will be displayed. If left empty, an empty list will be passed.</item>
184
<item><em>Options</em> - the options can be the ones listed under
185
<seealso marker="Module_Interface">Module_Interface</seealso> in Orber's Reference manual.
186
Hence, they are not further described here. But, as an example, in the figure above
187
we started the object as globally registered. If no options supplied the object
188
will be started as default.</item>
189
<item><em>Name String</em> - if left empty the object will <em>not</em> be registered in the
190
NameService. Hence, it is important that you can access the object in another way,
191
otherwise a zombie process is created. In the previous section we used the name string
192
<em>org/erlang/TheObjectName</em>. If we choose the same name here, the listed contexts
193
(i.e. <em>org</em> and <em>erlang</em>) must be created <em>before</em> we can create
194
and bind the object to <em>TheObjectName</em>. If this requirement is not met, OrberWeb
195
cannot bind the object. Hence, the object will be terminated and an error message
197
<item><em>Operation to use</em> - which option choosed will determine the behavior of OrberWeb.
198
If you choose <em>bind</em> and a binding already exists an error message will be
199
displayed and the newly started object terminated. But if you choose <em>rebind</em>
200
any existing binding will over-written.</item>
206
<title>Starting OrberWeb</title>
207
<marker id="startorberweb"></marker>
208
<p>You may choose to start OrberWeb on node, on which Orber is running or not. But
209
the Erlang distribution must be started (e.g. by using -sname aNodeName). Now, all
210
you have to do is to invoke:</p>
213
erl> webtool:start().
214
WebTool is availible at http://localhost:8888/
215
Or http://127.0.0.1:8888/
217
<p>Type one of the URL:s in your web-browser. If you want to access the WebTool application
218
from different machine, just replace <c>localhost</c> with its name. For more information,
219
see the WebTool documentation.</p>