[omniORB] (no subject)

Olden A (SApS) aolden@glam.ac.uk
Mon Jan 6 17:28:02 2003


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C2B5A2.613926A0
Content-Type: text/plain

Hi Folks,
 
How do I use the NamingContextExt with omniORB (or it could be a "with
C++"), I have a JAVA server (some of the code is given below) which works
using the JAVA client (using Omninames), but the client uses
NamingContextExt, and whenever I try it in c I get an error buring
compilation, 
 
"binary 'a' : no operator defined takes a right hand operand type class
CosNaming::_objRef_NamingContextExt"
 
the code is:
 
int main(int argc, char* argv[])
{
      
      // Initalize The Orb.
      CORBA::ORB_var orb = CORBA::ORB_init(argc, argv);
    
      CosNaming::NamingContext_var rootContext;
    CosNaming::NamingContextExt ncRef;
      
 
      CORBA::Object_var obj;
      obj = orb->resolve_initial_references("NameService");
    cerr << "Resolved Initial References.." << endl; 
      
    rootContext = CosNaming::NamingContext::_narrow(obj);
    
    //  NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);
    ncRef = CosNaming::NamingContextExt::_narrow(rootContext);
      
}
 
 
and the java code, which is basicllt what I'm trying to recreate (with a lot
more objects) is:
 
Properties props = new Properties();
props.put("org.omg.CORBA.ORBInitialHost", "bslap");
props.put("org.omg.CORBA.ORBInitialPort", "2809");
 
// Set Up The ORB
ORB orb = ORB.init(args,props);
 
// Get The Naming Context
org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);
      
phsensor = Sensor_DetailsHelper.narrow(ncRef.resolve_str("PH"));
phsensor.setSesnorID(0);
 
which access the server:
 
public class Server
{
   public static void main(String args[]) 
   {  
        Properties props = new Properties();
        props.put("org.omg.CORBA.ORBInitialHost", "bslap");
        props.put("org.omg.CORBA.ORBInitialPort", "2809");
 
         // Initalize The ORB
         ORB orb = ORB.init(args,props);
         
         // Initalize The POA
         POA poa =
POAHelper.narrow(orb.resolve_initial_references("RootPOA"));
         poa.the_POAManager().activate();
 
         POA poa2 =
POAHelper.narrow(orb.resolve_initial_references("RootPOA"));
         poa2.the_POAManager().activate();
 
         Sensor_ObjectImpl phsensor = new Sensor_ObjectImpl();
          
         // Work With PH:
         org.omg.CORBA.Object ref = poa.servant_to_reference(phsensor);
         Sensor_Details href = Sensor_DetailsHelper.narrow(ref);
         org.omg.CORBA.Object objRef =
orb.resolve_initial_references("NameService");
         NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);
 
         String name = "PH";
         NameComponent path[] = ncRef.to_name(name);
         ncRef.rebind(path,href);
 
         orb.run(); 
      }
}
 
 
 
 
 
 
 
 

------_=_NextPart_001_01C2B5A2.613926A0
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">


<meta name=3DProgId content=3DWord.Document>
<meta name=3DGenerator content=3D"Microsoft Word 10">
<meta name=3DOriginator content=3D"Microsoft Word 10">
<link rel=3DFile-List href=3D"cid:filelist.xml@01C2B5A2.773497A0">
<!--[if gte mso 9]><xml>
 <o:OfficeDocumentSettings>
  <o:DoNotRelyOnCSS/>
 </o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:SpellingState>Clean</w:SpellingState>
  <w:GrammarState>Clean</w:GrammarState>
  <w:DocumentKind>DocumentEmail</w:DocumentKind>
  <w:EnvelopeVis/>
  <w:Compatibility>
   <w:BreakWrappedTables/>
   <w:SnapToGridInCell/>
   <w:WrapTextWithPunct/>
   <w:UseAsianBreakRules/>
  </w:Compatibility>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]-->
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-parent:"";
	margin:0cm;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;
	text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;
	text-underline:single;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	mso-style-noshow:yes;
	mso-ansi-font-size:10.0pt;
	mso-bidi-font-size:10.0pt;
	font-family:Arial;
	mso-ascii-font-family:Arial;
	mso-hansi-font-family:Arial;
	mso-bidi-font-family:Arial;
	color:windowtext;}
span.SpellE
	{mso-style-name:"";
	mso-spl-e:yes;}
span.GramE
	{mso-style-name:"";
	mso-gram-e:yes;}
@page Section1
	{size:595.3pt 841.9pt;
	margin:72.0pt 90.0pt 72.0pt 90.0pt;
	mso-header-margin:35.4pt;
	mso-footer-margin:35.4pt;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
 /* Style Definitions */=20
 table.MsoNormalTable
	{mso-style-name:"Table Normal";
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-parent:"";
	mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
	mso-para-margin:0cm;
	mso-para-margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:10.0pt;
	font-family:"Times New Roman";}
</style>
<![endif]-->
</head>

<body lang=3DEN-GB link=3Dblue vlink=3Dpurple =
style=3D'tab-interval:36.0pt'>

<div class=3DSection1>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-US =
style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-US'>Hi =
Folks,<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-US =
style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></spa=
n></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-US =
style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-US'>How do I use the =
<span
class=3DSpellE>NamingContextExt</span> with <span =
class=3DSpellE>omniORB</span> (or
it could be a "with C++"), I have a JAVA server (some of the code
is given below) which works using the JAVA client (using <span =
class=3DSpellE>Omninames</span>),
but the client uses <span class=3DSpellE>NamingContextExt</span>, and =
whenever I
try it in c I get an error <span class=3DSpellE>buring</span> =
compilation, <o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-US =
style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></spa=
n></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-US =
style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-US'>"<span =
class=3DGramE>binary</span>
'a' : no operator defined takes a right hand operand type class <span
class=3DSpellE>CosNaming::_objRef_NamingContextExt</span>"<o:p></o:p></s=
pan></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-US =
style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></spa=
n></font></p>

<p class=3DMsoNormal><span class=3DGramE><font size=3D2 =
face=3DArial><span lang=3DEN-US
style=3D'font-size:10.0pt;font-family:Arial;mso-ansi-language:EN-US'>the=
</span></font></span><font
size=3D2 face=3DArial><span lang=3DEN-US =
style=3D'font-size:10.0pt;font-family:Arial;
mso-ansi-language:EN-US'> code is:<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-US =
style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></spa=
n></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><span class=3DSpellE><span class=3DGramE><font =
size=3D2
face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier =
New"'>int</span></font></span></span><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'>
main(<span class=3DSpellE>int</span> <span class=3DSpellE>argc</span>, =
char* <span
class=3DSpellE>argv</span>[])<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'>{<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span =
style=3D'mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
</span><o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span =
style=3D'mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>//
<span class=3DSpellE>Initalize</span> <span class=3DGramE>The</span> =
Orb.<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span =
style=3D'mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
class=3DSpellE>CORBA::ORB_var</span> orb =3D <span =
class=3DSpellE>CORBA::ORB_<span
class=3DGramE>init</span></span><span class=3DGramE>(</span><span =
class=3DSpellE>argc</span>,
<span class=3DSpellE>argv</span>);<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; =
</span><o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span =
style=3D'mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
class=3DSpellE>CosNaming::NamingContext_var</span> <span =
class=3DSpellE>rootContext</span>;<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span =
class=3DSpellE>CosNaming::NamingContextExt</span>
<span class=3DSpellE>ncRef</span>;<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span =
style=3D'mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
</span><o:p></o:p></span></font></p>

<p class=3DMsoNormal style=3D'mso-pagination:none;mso-layout-grid-align:=
none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span =
style=3D'mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
class=3DSpellE>CORBA::Object_var</span> <span =
class=3DSpellE>obj</span>;<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span =
style=3D'mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
class=3DSpellE><span class=3DGramE>obj</span></span> =3D orb-&gt;<span =
class=3DSpellE>resolve_initial_references</span>(&quot;<span
class=3DSpellE>NameService</span>&quot;);<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span =
class=3DSpellE><span
class=3DGramE>cerr</span></span> &lt;&lt; &quot;Resolved Initial
References..&quot; &lt;&lt; <span class=3DSpellE><span =
class=3DGramE>endl</span></span>;
<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span =
style=3D'mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
</span><o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span =
class=3DSpellE><span
class=3DGramE>rootContext</span></span> =3D <span =
class=3DSpellE>CosNaming::NamingContext::_narrow</span>(<span
class=3DSpellE>obj</span>);<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; =
</span><o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>/<span =
class=3DGramE>/<span
style=3D'mso-spacerun:yes'>&nbsp; </span><span =
class=3DSpellE>NamingContextExt</span></span>
<span class=3DSpellE>ncRef</span> =3D <span =
class=3DSpellE>NamingContextExtHelper.narrow</span>(<span
class=3DSpellE>objRef</span>);<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span =
class=3DSpellE><span
class=3DGramE>ncRef</span></span> =3D <span =
class=3DSpellE>CosNaming::NamingContextExt::_narrow</span>(<span
class=3DSpellE>rootContext</span>);<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span =
style=3D'mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
</span><o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'>}<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><span class=3DGramE><font size=3D2 face=3D"Courier =
New"><span
style=3D'font-size:10.0pt;font-family:"Courier =
New"'>and</span></font></span><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'>
the java code, which is <span class=3DSpellE>basicllt</span> what I'm
trying to recreate (with a lot more objects) =
is:<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'>Properties props =3D new <span =
class=3DGramE>Properties(</span>);<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><span class=3DSpellE><span class=3DGramE><font =
size=3D2
face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier =
New"'>props.put</span></font></span></span><span
class=3DGramE><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;
font-family:"Courier New"'>(</span></font></span><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt;font-family:"Courier New"'>&quot;<span =
class=3DSpellE>org.omg.CORBA.ORBInitialHost</span>&quot;,
&quot;<span =
class=3DSpellE>bslap</span>&quot;);<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><span class=3DSpellE><span class=3DGramE><font =
size=3D2
face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier =
New"'>props.put</span></font></span></span><span
class=3DGramE><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;
font-family:"Courier New"'>(</span></font></span><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt;font-family:"Courier New"'>&quot;<span =
class=3DSpellE>org.omg.CORBA.ORBInitialPort</span>&quot;,
&quot;2809&quot;);<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'>// Set Up <span =
class=3DGramE>The</span> ORB<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'>ORB <span class=3DSpellE>orb</span> =
=3D <span
class=3DSpellE><span class=3DGramE>ORB.init</span></span><span =
class=3DGramE>(</span><span
class=3DSpellE>args,props</span>);<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'>// Get <span class=3DGramE>The</span> =
Naming
Context<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><span class=3DSpellE><span class=3DGramE><font =
size=3D2
face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier =
New"'>org.omg.CORBA.Object</span></font></span></span><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'>
<span class=3DSpellE>objRef</span> =3D <span =
class=3DSpellE>orb.resolve_initial_references</span>(&quot;<span
class=3DSpellE>NameService</span>&quot;);<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><span class=3DSpellE><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt;font-family:"Courier =
New"'>NamingContextExt</span></font></span><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'>
<span class=3DSpellE>ncRef</span> =3D <span class=3DSpellE><span =
class=3DGramE>NamingContextExtHelper.narrow</span></span><span
class=3DGramE>(</span><span =
class=3DSpellE>objRef</span>);<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
</span><o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><span class=3DSpellE><span class=3DGramE><font =
size=3D2
face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier =
New"'>phsensor</span></font></span></span><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'>
=3D <span class=3DSpellE>Sensor_DetailsHelper.narrow</span>(<span =
class=3DSpellE>ncRef.resolve_str</span>(&quot;PH&quot;));<o:p></o:p></sp=
an></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><span class=3DSpellE><span class=3DGramE><font =
size=3D2
face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier =
New"'>phsensor.setSesnorID</span></font></span></span><span
class=3DGramE><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;
font-family:"Courier New"'>(</span></font></span><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt;font-family:"Courier =
New"'>0);<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><span class=3DGramE><font size=3D2 =
face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial'>which</span></font></span><=
font
size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;font-family:Arial'> access the
server:<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><span class=3DGramE><font size=3D2 face=3D"Courier =
New"><span
style=3D'font-size:10.0pt;font-family:"Courier =
New"'>public</span></font></span><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;font-family:"Courier New"'>
class Server<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'>{<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span =
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;
</span><span class=3DGramE>public</span> static void main(String <span
class=3DSpellE>args</span>[]) <o:p></o:p></span></font></p>

<p class=3DMsoNormal style=3D'mso-pagination:none;mso-layout-grid-align:=
none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span =
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;
</span>{<span style=3D'mso-spacerun:yes'>&nbsp; =
</span><o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>Properties props =3D new <span =
class=3DGramE>Properties(</span>);<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
</span><span
class=3DSpellE><span class=3DGramE>props.put</span></span><span =
class=3DGramE>(</span>&quot;<span
class=3DSpellE>org.omg.CORBA.ORBInitialHost</span>&quot;, &quot;<span
class=3DSpellE>bslap</span>&quot;);<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
</span><span
class=3DSpellE><span class=3DGramE>props.put</span></span><span =
class=3DGramE>(</span>&quot;<span
class=3DSpellE>org.omg.CORBA.ORBInitialPort</span>&quot;, =
&quot;2809&quot;);<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;
</span>// <span class=3DSpellE>Initalize</span> <span =
class=3DGramE>The</span> ORB<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;
</span>ORB <span class=3DSpellE>orb</span> =3D <span =
class=3DSpellE><span
class=3DGramE>ORB.init</span></span><span class=3DGramE>(</span><span =
class=3DSpellE>args,props</span>);<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;
</span><o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;
</span>// <span class=3DSpellE>Initalize</span> <span =
class=3DGramE>The</span> POA<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;
</span>POA <span class=3DSpellE>poa</span> =3D <span =
class=3DSpellE><span
class=3DGramE>POAHelper.narrow</span></span><span =
class=3DGramE>(</span><span
class=3DSpellE>orb.resolve_initial_references</span>(&quot;<span =
class=3DSpellE>RootPOA</span>&quot;));<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;
</span><span class=3DSpellE>poa.the_<span =
class=3DGramE>POAManager</span></span><span
class=3DGramE>(</span>).activate();<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;
</span>POA poa2 =3D <span class=3DSpellE><span =
class=3DGramE>POAHelper.narrow</span></span><span
class=3DGramE>(</span><span =
class=3DSpellE>orb.resolve_initial_references</span>(&quot;<span
class=3DSpellE>RootPOA</span>&quot;));<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;
</span>poa2.the_<span =
class=3DGramE>POAManager(</span>).activate();<o:p></o:p></span></font></=
p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;
</span><span class=3DSpellE>Sensor_ObjectImpl</span> <span =
class=3DSpellE>phsensor</span>
=3D new <span class=3DSpellE>Sensor_<span =
class=3DGramE>ObjectImpl</span></span><span
class=3DGramE>(</span>);<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;
</span><o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;
</span>// Work With PH:<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;
</span><span class=3DSpellE><span =
class=3DGramE>org.omg.CORBA.Object</span></span>
ref =3D <span class=3DSpellE>poa.servant_to_reference</span>(<span =
class=3DSpellE>phsensor</span>);<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;
</span><span class=3DSpellE>Sensor_Details</span> <span =
class=3DSpellE>href</span>
=3D <span class=3DSpellE>Sensor_<span =
class=3DGramE>DetailsHelper.narrow</span></span><span
class=3DGramE>(</span>ref);<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;
</span><span class=3DSpellE><span class=3DGramE>org.omg.CORBA.Object</sp=
an></span> <span
class=3DSpellE>objRef</span> =3D <span =
class=3DSpellE>orb.resolve_initial_references</span>(&quot;<span
class=3DSpellE>NameService</span>&quot;);<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;
</span><span class=3DSpellE>NamingContextExt</span> <span =
class=3DSpellE>ncRef</span>
=3D <span class=3DSpellE><span =
class=3DGramE>NamingContextExtHelper.narrow</span></span><span
class=3DGramE>(</span><span =
class=3DSpellE>objRef</span>);<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;
</span>String name =3D &quot;PH&quot;;<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;
</span><span class=3DSpellE>NameComponent</span> <span =
class=3DGramE>path[</span>]
=3D <span =
class=3DSpellE>ncRef.to_name</span>(name);<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;
</span><span class=3DSpellE><span =
class=3DGramE>ncRef.rebind</span></span><span
class=3DGramE>(</span><span =
class=3DSpellE>path,href</span>);<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;
</span><span class=3DSpellE><span =
class=3DGramE>orb.run</span></span><span
class=3DGramE>(</span>); <o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><span =
style=3D'mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
</span>}<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'>}<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-pagination:none;mso-layout-grid-align:none;
text-autospace:none'><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-US =
style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></spa=
n></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-US =
style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></spa=
n></font></p>

</div>

</body>

</html>

------_=_NextPart_001_01C2B5A2.613926A0--