PERL error using nameservice
- From: Wouter van Atteveldt <wouter apenstaartje nl>
- To: orbit-list gnome org, orbit-perl-list gnome org
- Subject: PERL error using nameservice
- Date: Fri, 6 Jul 2001 15:32:16 +0200 (CEST)
[cross-posted to orbit-list, orbit-perl-list]
Dear all,
I am tryibg to write a perl corba server & client using a
nameservice. I am using Orbit 0.5.8 (?) and the perl ORBit mapping 0.4.3.
I managed to get a perl server & client to work by passing
the IOR's around using the patches to the marshal.c and demarshal.c found
on this mailing list
(http://mail.gnome.org/archives/orbit-perl-list/2001-April/msg00004.html
and
http://mail.gnome.org/archives/orbit-list/2001-March/msg00090.html). However,
when trying to use the nameservice with the routine below I get an
commications error on running the client script (details below).
Does anybody have any suggestions on what is wrong with my code? Should I
use a different ORBit version (the one on the CVS)?
Thanks in advance,
Wouter van Atteveldt
------------
Details:
I did:
$orbit-name-server >ns.ref &
$perl server.pl `cat ns.ref` &
$perl client.pl `cat ns.ref`
Exception: CORBA::COMM_FAILURE ('IDL:omg.org/CORBA/COMM_FAILURE:1.0')
(0, COMPLETED_MAYBE)
Communication failure
------------
Code used:
#### test.idl ####
module test
{
interface test
{
string test();
};
};
#### (excerpt from) server.pl ####
use CORBA::ORBit idl => [ qw(test.idl CosNaming.idl) ];
use Error qw(:try);
#<SNIP definition of test object - works fine anyway>
my $t = new test;
$t->setMessage("Server test...");
my $orb = CORBA::ORB_init("orbit-local-orb");
my $poa = $orb->resolve_initial_references("RootPOA");
my $id = $poa->activate_object ($t);
$poa->_get_the_POAManager->activate;
my $nc_ior = shift;
my $namingContext = $orb->string_to_object($nc_ior);
# get the namingServer from the IOR on the commandline
my $name = [{id => "test", kind => ""}];
#my $name = create_name("test");
$namingContext->bind($name, $t);
$orb->run()
#### client.pl ####
use CORBA::ORBit idl => [ qw(test.idl CosNaming.idl) ];
use Error qw(:try);
use strict;
my $orb = CORBA::ORB_init("orbit_local_orb");
my $nc_ior = shift;
my $namingContext = $orb->string_to_object($nc_ior);
my $name = [{id => "test", kind => ""}];
my $server = $namingContext->resolve($name);
print $server->test();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]