How to get a reference to a remote ORB's name server?



Hi All,

  I'm still trying to get ORBit/Perl to connect to my BEA Tuxedo 8.0
ORB.  My code snipet is below:

#!/usr/bin/perl -w

use CORBA::ORBit idl => [ qw(/home/dmaltz/ORBit-0.5.17/src/services/name/CosNaming.idl) ];

use Error qw(:try);
use strict;
require 'dumpvar.pl';

unshift @ARGV, "--ORBNamingAddr" => "corbaloc://hawaii:7958/NameService";
#unshift @ARGV, "--ORBNamingIOR" => "corbaloc://hawaii:7958/NameService";

my $orb = CORBA::ORB_init("orbit-local-orb");

my $x = $orb->list_initial_services();

dumpValue(\$x);

my $initial_ref = $orb->resolve_initial_references("NameService");

if (!$initial_ref->_narrow("IDL:omg.org/CosNaming/NamingContext:1.0")) {
    die ("not a naming service");
}

And in output I get:

Using /home/dmaltz/CORBA-ORBit-0.4.6/blib
-> ARRAY(0x20be9c)
   0  'RootPOA'
Can't call method "_narrow" on an undefined value at tuxclient.pl line 24.

The ORBit ORB never even tries to contact the Tux ORB, so I'm clearly
not even initializing the local ORBit orb properly.

Any suggestions?

-dam



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]