Sophie

Sophie

distrib > Fedora > 17 > i386 > by-pkgid > 675c8c8167236dfcf8d66da674f931e8 > files > 1088

erlang-doc-R15B-03.3.fc17.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns:fn="http://www.w3.org/2005/02/xpath-functions">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../doc/otp_doc.css" type="text/css">
<title>Erlang -- OrberWeb</title>
</head>
<body bgcolor="white" text="#000000" link="#0000ff" vlink="#ff00ff" alink="#ff0000"><div id="container">
<script id="js" type="text/javascript" language="JavaScript" src="../../../../doc/js/flipmenu/flipmenu.js"></script><script id="js2" type="text/javascript" src="../../../../doc/js/erlresolvelinks.js"></script><script language="JavaScript" type="text/javascript">
            <!--
              function getWinHeight() {
                var myHeight = 0;
                if( typeof( window.innerHeight ) == 'number' ) {
                  //Non-IE
                  myHeight = window.innerHeight;
                } else if( document.documentElement && ( document.documentElement.clientWidth ||
                                                         document.documentElement.clientHeight ) ) {
                  //IE 6+ in 'standards compliant mode'
                  myHeight = document.documentElement.clientHeight;
                } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
                  //IE 4 compatible
                  myHeight = document.body.clientHeight;
                }
                return myHeight;
              }

              function setscrollpos() {
                var objf=document.getElementById('loadscrollpos');
                 document.getElementById("leftnav").scrollTop = objf.offsetTop - getWinHeight()/2;
              }

              function addEvent(obj, evType, fn){
                if (obj.addEventListener){
                obj.addEventListener(evType, fn, true);
                return true;
              } else if (obj.attachEvent){
                var r = obj.attachEvent("on"+evType, fn);
                return r;
              } else {
                return false;
              }
             }

             addEvent(window, 'load', setscrollpos);

             //--></script><div id="leftnav"><div class="innertube">
<img alt="Erlang logo" src="../../../../doc/erlang-logo.png"><br><small><a href="users_guide.html">User's Guide</a><br><a href="index.html">Reference Manual</a><br><a href="release_notes.html">Release Notes</a><br><a href="../pdf/orber-3.6.24.pdf">PDF</a><br><a href="../../../../doc/index.html">Top</a></small><p><strong>orber</strong><br><strong>User's Guide</strong><br><small>Version 3.6.24</small></p>
<br><a href="javascript:openAllFlips()">Expand All</a><br><a href="javascript:closeAllFlips()">Contract All</a><p><small><strong>Chapters</strong></small></p>
<ul class="flipMenu" imagepath="../../../../doc/js/flipmenu">
<li id="no" title="The Orber Application" expanded="false">The Orber Application<ul>
<li><a href="ch_contents.html">
              Top of chapter
            </a></li>
<li title="Content Overview"><a href="ch_contents.html#id61214">Content Overview</a></li>
<li title="Brief Description of the User's Guide"><a href="ch_contents.html#id62498">Brief Description of the User's Guide</a></li>
</ul>
</li>
<li id="no" title="Introduction to Orber" expanded="false">Introduction to Orber<ul>
<li><a href="ch_introduction.html">
              Top of chapter
            </a></li>
<li title="Overview"><a href="ch_introduction.html#id64790">Overview</a></li>
</ul>
</li>
<li id="no" title="The Orber Application" expanded="false">The Orber Application<ul>
<li><a href="ch_orber_kernel.html">
              Top of chapter
            </a></li>
<li title="ORB Kernel and IIOP "><a href="ch_orber_kernel.html#id57197">ORB Kernel and IIOP </a></li>
<li title="The Object Request Broker (ORB)"><a href="ch_orber_kernel.html#id63374">The Object Request Broker (ORB)</a></li>
<li title="Internet Inter-Object Protocol (IIOP)"><a href="ch_orber_kernel.html#id65057">Internet Inter-Object Protocol (IIOP)</a></li>
</ul>
</li>
<li id="no" title="Interface Repository" expanded="false">Interface Repository<ul>
<li><a href="ch_ifr.html">
              Top of chapter
            </a></li>
<li title="Interface Repository(IFR)"><a href="ch_ifr.html#id64309">Interface Repository(IFR)</a></li>
</ul>
</li>
<li id="no" title="Installing Orber" expanded="false">Installing Orber<ul>
<li><a href="ch_install.html">
              Top of chapter
            </a></li>
<li title="Installation Process "><a href="ch_install.html#id62824">Installation Process </a></li>
<li title="Configuration"><a href="ch_install.html#id74009">Configuration</a></li>
<li title="Firewall Configuration"><a href="ch_install.html#id76130">Firewall Configuration</a></li>
<li title="Interface Configuration"><a href="ch_install.html#id76571">Interface Configuration</a></li>
</ul>
</li>
<li id="no" title="OMG IDL to Erlang Mapping" expanded="false">OMG IDL to Erlang Mapping<ul>
<li><a href="ch_idl_to_erlang_mapping.html">
              Top of chapter
            </a></li>
<li title="OMG IDL to Erlang Mapping - Overview"><a href="ch_idl_to_erlang_mapping.html#id76788">OMG IDL to Erlang Mapping - Overview</a></li>
<li title="OMG IDL Mapping Elements"><a href="ch_idl_to_erlang_mapping.html#id76811">OMG IDL Mapping Elements</a></li>
<li title="Getting Started"><a href="ch_idl_to_erlang_mapping.html#id76868">Getting Started</a></li>
<li title="Basic OMG IDL Types"><a href="ch_idl_to_erlang_mapping.html#id76929">Basic OMG IDL Types</a></li>
<li title="Template OMG IDL Types and Complex Declarators"><a href="ch_idl_to_erlang_mapping.html#id77470">Template OMG IDL Types and Complex Declarators</a></li>
<li title="Constructed OMG IDL Types"><a href="ch_idl_to_erlang_mapping.html#id77956">Constructed OMG IDL Types</a></li>
<li title="Scoped Names and Generated Files"><a href="ch_idl_to_erlang_mapping.html#id78395">Scoped Names and Generated Files</a></li>
<li title="Typecode, Identity and Name Access Functions"><a href="ch_idl_to_erlang_mapping.html#id78787">Typecode, Identity and Name Access Functions</a></li>
<li title="References to Constants"><a href="ch_idl_to_erlang_mapping.html#id78931">References to Constants</a></li>
<li title="References to Objects Defined in OMG IDL"><a href="ch_idl_to_erlang_mapping.html#id78990">References to Objects Defined in OMG IDL</a></li>
<li title="Exceptions"><a href="ch_idl_to_erlang_mapping.html#id79013">Exceptions</a></li>
<li title="Access to Attributes"><a href="ch_idl_to_erlang_mapping.html#id79046">Access to Attributes</a></li>
<li title="Invocations of Operations"><a href="ch_idl_to_erlang_mapping.html#id79103">Invocations of Operations</a></li>
<li title="Implementing the DB Application"><a href="ch_idl_to_erlang_mapping.html#id79262">Implementing the DB Application</a></li>
<li title="Reserved Compiler Names and Keywords"><a href="ch_idl_to_erlang_mapping.html#id79480">Reserved Compiler Names and Keywords</a></li>
<li title="Type Code Representation"><a href="ch_idl_to_erlang_mapping.html#id80225">Type Code Representation</a></li>
</ul>
</li>
<li id="no" title="CosNaming Service" expanded="false">CosNaming Service<ul>
<li><a href="ch_naming_service.html">
              Top of chapter
            </a></li>
<li title="Overview of the CosNaming Service"><a href="ch_naming_service.html#id80888">Overview of the CosNaming Service</a></li>
<li title="The Basic Use-cases of the Naming Service"><a href="ch_naming_service.html#id81031">The Basic Use-cases of the Naming Service</a></li>
<li title="Interoperable Naming Service"><a href="ch_naming_service.html#id81378">Interoperable Naming Service</a></li>
</ul>
</li>
<li id="no" title="How to use security in Orber" expanded="false">How to use security in Orber<ul>
<li><a href="ch_security.html">
              Top of chapter
            </a></li>
<li title="Security in Orber"><a href="ch_security.html#id82238">Security in Orber</a></li>
</ul>
</li>
<li id="no" title="Orber Stubs/Skeletons" expanded="false">Orber Stubs/Skeletons<ul>
<li><a href="ch_stubs.html">
              Top of chapter
            </a></li>
<li title="Orber Stubs and Skeletons Description"><a href="ch_stubs.html#id82459">Orber Stubs and Skeletons Description</a></li>
</ul>
</li>
<li id="no" title="CORBA System and User Defined Exceptions" expanded="false">CORBA System and User Defined Exceptions<ul>
<li><a href="ch_exceptions.html">
              Top of chapter
            </a></li>
<li title="System Exceptions"><a href="ch_exceptions.html#id83036">System Exceptions</a></li>
<li title="User Defined Exceptions"><a href="ch_exceptions.html#id83473">User Defined Exceptions</a></li>
<li title="Throwing Exceptions"><a href="ch_exceptions.html#id83493">Throwing Exceptions</a></li>
<li title="Catching Exceptions"><a href="ch_exceptions.html#id83525">Catching Exceptions</a></li>
</ul>
</li>
<li id="no" title="Orber Interceptors" expanded="false">Orber Interceptors<ul>
<li><a href="ch_interceptors.html">
              Top of chapter
            </a></li>
<li title="Using Interceptors"><a href="ch_interceptors.html#id83634">Using Interceptors</a></li>
<li title="Interceptor Example"><a href="ch_interceptors.html#id83850">Interceptor Example</a></li>
</ul>
</li>
<li id="loadscrollpos" title="OrberWeb" expanded="true">OrberWeb<ul>
<li><a href="ch_orberweb.html">
              Top of chapter
            </a></li>
<li title="Using OrberWeb"><a href="ch_orberweb.html#id84111">Using OrberWeb</a></li>
<li title="Starting OrberWeb"><a href="ch_orberweb.html#id84699">Starting OrberWeb</a></li>
</ul>
</li>
<li id="no" title="Debugging" expanded="false">Debugging<ul>
<li><a href="ch_debugging.html">
              Top of chapter
            </a></li>
<li title="Tools and FAQ"><a href="ch_debugging.html#id84785">Tools and FAQ</a></li>
</ul>
</li>
</ul>
</div></div>
<div id="content">
<div class="innertube">
<h1>12 OrberWeb</h1>
  

  <h3><a name="id84111">12.1 
        Using OrberWeb</a></h3>
    
    <p><span class="code">OrberWeb</span> is intended to make things easier when developing and 
      testing applications using <span class="code">Orber</span>. The user is able to interact
      with <span class="code">Orber</span> via a GUI by using a web browser.</p>
    <p><span class="code">OrberWeb</span> requires that the application <span class="code">WebTool</span> is available and
      started on at least one node; if so <span class="code">OrberWeb</span> can usually be used to
      to access <span class="code">Orber</span> nodes supporting the Interoperable Naming 
      Service. How to start OrberWeb is described in
      <span class="bold_code"><a href="ch_orberweb.html#startorberweb">Starting OrberWeb</a></span></p>
    <p>The <span class="code">OrberWeb</span> GUI consists of a <strong>Menu Frame</strong> and a 
      <strong>Data Frames</strong>.</p>

    <h4>The Menu Frame</h4>
      
      <p>The menu frame consists of:</p>
      <ul>
        <li>
<strong>Node List</strong> - which node to access.</li>
        <li>
<strong>Configuration</strong> - see how Orber on the current node is configured.</li>
        <li>
<strong>Name Service</strong> - browse the NameService and add/remove a Context/Object.</li>
        <li>
<strong>IFR Types</strong> - see which types are registered in IFR.</li>
        <li>
<strong>Create Object</strong> - create a new object and, possibly, store it in the NameService.</li>
      </ul>
      <p></p>
      <a name="menuframe"></a>
      <img alt="IMAGE MISSING" src="menuframe.gif"><br>
        <em>Figure
        12.1:
         
        The Menu Frame.</em>
      
      <p>Which nodes we can access is determined by what is returned when invoking <span class="code">[node()|nodes()]</span>.
        If you cannot see a desired node in the list, you have to call <span class="code">net_adm:ping(Node)</span>.
        But this requires that the node is started with the distribution switched on
        (e.g. <span class="code">erl -sname myNode</span>); this also goes for the node <span class="code">OrberWeb</span> is running on.</p>
    

    <h4>The Configuration Data Frame</h4>
      
      <p>When accessing the <strong>Configuration</strong> page OrberWeb presents a table containing the
        <span class="bold_code"><a href="ch_install.html#config">configuration settings</a></span> for the target node.</p>
      <p></p>
      <a name="dataframe3"></a>
      <img alt="IMAGE MISSING" src="dataframe3.gif"><br>
        <em>Figure
        12.2:
         
        Configuration Settings.</em>
      
      <p>It is also possible to change those configuration parameters which can be changed when Orber
        is already started. The Key-Value pairs is given as a list of tuples, e.g.,
        <strong>[{orber_debug_level, 5}, {iiop_timeout, 60}, {giop_version, {1,2}}]</strong>. If one tries to update a parameter
        which may not be changed an error message will be displayed.</p>
    

    <h4>The IFR Data Frame</h4>
      
      <p>All types registered in the IFR (Interface Repository) which have an associated IFR-id
        can be viewed via the IFR Data Frame. This gives the user an easy way to confirm that
        all necessary IDL-specifications have been properly registered. All available types are
        listed when choosing <span class="code">IFR Types</span> in the menu frame:</p>
      <p></p>
      <a name="dataframe1"></a>
      <img alt="IMAGE MISSING" src="dataframe1.gif"><br>
        <em>Figure
        12.3:
         
        Select Type.</em>
      
      <p>After selecting a type all definitions of that particular type will be displayed. If no such
        bindings exists the table will be empty.</p>
      <p>Since Orber adds definitions to the IFR when it is installed (e.g. CosNaming), not only
        types defined by the user will show up in the table. In the figure below you find the
        the NameService exceptions listed.</p>
      <p></p>
      <a name="dataframe2"></a>
      <img alt="IMAGE MISSING" src="dataframe2.gif"><br>
        <em>Figure
        12.4:
         
        List Registered Exceptions.</em>
      
    

    <h4>The NameService Data Frame</h4>
      
      <p>The NameService main purpose is to make possible to bind object references, which
        can client applications can resolve and invoke operations on. Initially, the NameService
        is empty. The most common scenario, is that user applications create Contexts and add objects
        in the NameService. OrberWeb allows the user to do the very same thing.</p>
      <p>When referencing an object or context you must use stringified NameComponents.
        For more information see the <span class="bold_code"><a href="ch_naming_service.html">Interoperable Naming Service</a></span>.
        In the following example we will use the string <strong>org/erlang/TheObjectName</strong>, where
        <strong>org</strong> and <strong>erlang</strong> will be contexts and <strong>TheObjectName</strong>
        the name the object will be bound to.</p>
      <p>Since the NameService is empty in the beginning, the only thing we can do is creating
        a new context. Simply write <strong>org</strong> in the input field and press <span class="code">New Context</span>.
        If OrberWeb was able to create the context or not, is shown in the completion message. 
        If successful, just press the <span class="code">Go Back</span> button. Now, a link named <strong>org</strong> should
        be listed in the table. In the right column the context type is displayed. Contexts are
        associated with <strong>ncontext</strong> and objects with <strong>nobject</strong>.</p>
      <p></p>
      <a name="dataframe5"></a>
      <img alt="IMAGE MISSING" src="dataframe5.gif"><br>
        <em>Figure
        12.5:
         
        Add a New Context.</em>
      
      <p>To create the next level context (i.e. erlang), simply follow the link and repeat the procedure.
        If done correctly, a table containing the same data as the following figure should be the result 
        if you follow the <strong>erlang</strong> link. Note, that the path is displayed in the yellow
        field.</p>
      <p></p>
      <p>If a context does not contain any sub-contexts or object bindings, it is possible to
        delete the context. If these requirements are met, a <span class="code">Delete Context</span> button will appear.
        A completion status message will be displayed after deleting the context.</p>
      <p></p>
      <a name="dataframe6"></a>
      <img alt="IMAGE MISSING" src="dataframe6.gif"><br>
        <em>Figure
        12.6:
         
        Delete Context.</em>
      
      <p>Now it is possible to bind an object using the complete name string. To find out how this is
        done using OrberWeb see <span class="bold_code"><a href="ch_orberweb.html#create">Object Creation</a></span>.
        For now, we will just assume that an object have been created and bound as <strong>TheObjectName</strong>. </p>
      <p></p>
      <a name="dataframe7"></a>
      <img alt="IMAGE MISSING" src="dataframe7.gif"><br>
        <em>Figure
        12.7:
         
        Object Stored in the NameService.</em>
      
      <p>If you follow the <strong>TheObjectName</strong> link, data about the bound object will be
        presented. Note, depending on which type of object it is, the information given differs.
        It would, for example, not be possible to display a Pid for all types of objects since
        it might reside on a Java-ORB. In the figure below a CosNotification FilterFactory have
        been bound under the name <strong>org/erlang/TheObjectName</strong>.</p>
      <p></p>
      <a name="dataframe8"></a>
      <img alt="IMAGE MISSING" src="dataframe8.gif"><br>
        <em>Figure
        12.8:
         
        Object Data.</em>
      
      <p>OrberWeb also makes it possible to remove a binding and dispose the associated object.
        Pressing <strong>Unbind</strong> the binding will be removed but the object will still exist. 
        But, if the <strong>Unbind and Dispose</strong> button is pressed, the binding will be removed
        and the object terminated.</p>
    

    <h4>The Object Creation Data Frame</h4>
      
      <a name="create"></a>
      <p>This part makes it possible to create a new object and, if wanted, store it the
        NameService.</p>
      <p></p>
      <a name="dataframe4"></a>
      <img alt="IMAGE MISSING" src="dataframe4.gif"><br>
        <em>Figure
        12.9:
         
        Create a New Object.</em>
      
      <ul>
        <li>
<strong>Module</strong> - simply type the name of the module of the object type
         you want to create. If the module begins with a capital letter, we normally must
         write <span class="code">'Module_Interface'</span>. But, when using OrberWeb, you shall <strong>NOT</strong>.
         Since we cannot create linked objects this is not an option.</li>
        <li>
<strong>Arguments</strong> - the supplied arguments must be written as a single Erlang term.
         That is, as a list or tuple containing other Erlang terms. The arguments will be 
         passed to the <span class="code">init</span> function of the object. It is, however, not possible
         to use Erlang records. If OrberWeb is not able to parse the arguments, an error message
         will be displayed. If left empty, an empty list will be passed.</li>
        <li>
<strong>Options</strong> - the options can be the ones listed under 
        <span class="bold_code"><a href="Module_Interface.html">Module_Interface</a></span> in Orber's Reference manual.
         Hence, they are not further described here. But, as an example, in the figure above
         we started the object as globally registered. If no options supplied the object
         will be started as default.</li>
        <li>
<strong>Name String</strong> - if left empty the object will <strong>not</strong> be registered in the 
         NameService. Hence, it is important that you can access the object in another way,
         otherwise a zombie process is created. In the previous section we used the name string
        <strong>org/erlang/TheObjectName</strong>. If we choose the same name here, the listed contexts
         (i.e. <strong>org</strong> and <strong>erlang</strong>) must be created <strong>before</strong> we can create
         and bind the object to <strong>TheObjectName</strong>. If this requirement is not met, OrberWeb
         cannot bind the object. Hence, the object will be terminated and an error message
         displayed.</li>
        <li>
<strong>Operation to use</strong> - which option choosed will determine the behavior of OrberWeb.
         If you choose <strong>bind</strong> and a binding already exists an error message will be 
         displayed and the newly started object terminated. But if you choose <strong>rebind</strong>
         any existing binding will over-written.</li>
      </ul>
    
  

  <h3><a name="id84699">12.2 
        Starting OrberWeb</a></h3>
    
    <a name="startorberweb"></a>
    <p>You may choose to start OrberWeb on node, on which Orber is running or not. But
      the Erlang distribution must be started (e.g. by using -sname aNodeName). Now, all 
      you have to do is to invoke:</p>
    <div class="example"><pre>
    
erl&gt; webtool:start().
WebTool is available at http://localhost:8888/
Or  http://127.0.0.1:8888/
    </pre></div>
    <p>Type one of the URL:s in your web-browser. If you want to access the WebTool application
      from different machine, just replace <span class="code">localhost</span> with its name. For more information,
      see the WebTool documentation.</p>
  
</div>
<div class="footer">
<hr>
<p>Copyright © 1997-2012 Ericsson AB. All Rights Reserved.</p>
</div>
</div>
</div></body>
</html>