[Biocorba-l] BioCorba-0.2 IDL sequence<> retrieval question

Alan Robinson alan@ebi.ac.uk
Fri, 1 Jun 2001 18:27:25 +0100 (GMT Daylight Time)


Hello Mark,

The following should work with the EMBL BioCORBA server (N.B. there's
only one database in the 'bioenv', and that's EMBL).

# [Path to your perl]

# Use the LWP::Simple package.
use LWP::Simple;

# Load in the IDL file that describes the objects available and the
# methods they have.
# See http://www.biocorba.org for a description of the Biocorba IDL.
use CORBA::ORBit idl => [qw(BioCorba-0.2.0.idl) ];

# Create an ORB object that will handle communication.
$orb = CORBA::ORB_init("orbit-local-orb");

# The IOR is like a URL for a CORBA object. I make the IORs of my servers
# available # via http. The EMBL Biocorba server IOR is located here: 
$url = "http://corba.ebi.ac.uk/IOR/EmblBiocorba_v0_2.IOR";

# Read the IOR from a URL into a variable using LWP::Simple.
$ior = get($url);

# Chomp any terminal '\n' and whitespace off the IOR string.
chomp($ior);

# Use the $orb to decode the IOR and get a reference to its CORBA object
at the EBI.
$bioenv = $orb->string_to_object($ior);

# Get the array of database names back.
@seqDBNames = @{$bioenv->get_SeqDB_names()};

# Print out each database name.
foreach $seqDBName (@seqDBNames) {
  print "Database: ".$seqDBName."\n";
}





--
============================================================
Alan J. Robinson, D.Phil.             Tel:+44-(0)1223 494444
European Bioinformatics Institute     Fax:+44-(0)1223 494468
EMBL Outstation - Hinxton             Email:  alan@ebi.ac.uk
Wellcome Trust Genome Campus
Hinxton, Cambridge
CB10 1SD, UK                http://industry.ebi.ac.uk/~alan/
============================================================

On Fri, 1 Jun 2001, Mark Hoebeke wrote:

> 
> Hello all,
> 
> sorry to interrupt the high-level debate over standardization, but I wish
> to submit a down to earth coding question ;)
> 
> I'm starting to play with the BioCorba-0.2 idl to retrieve sequence and
> annotation data from the EMBL server whose IOR was posted some days ago.
> 
> All works fine, except when I try to retrieve sequences (in IDL parlance,
> that is). For example, when asking for the names of available databases
> (with BioEnv::get_SeqDB_Names(), returning a sequence of strings) or for
> the qualifiers of a given feature (with SeqFeature::qualifiers(),
> returning a sequence of Qualifiers), I get the following exception:
> 
> 	incomplete message received at FeatureDataSource/EMBLFeatureDataSource.pm
> 	line 81.
> 	Error demarshalling result at FeatureDataSource/EMBLFeatureDataSource.pm
> 	line 81.
> 	Exception: CORBA::MARSHAL ('IDL:omg.org/CORBA/MARSHAL:1.0')
> 	    (0, COMPLETED_YES)
> 	   Error marshalling parameter or result
> 
> 
> My client program is written in Perl, and uses the CORBA::ORBit module.
> 
> Thanks for any help (or pointer) you provide.
> 
> Mark
> 
> -- 
> hoebeke@versailles.inra.fr	    		_/      _/  _/_/_/    _/_/_/
> Tel : (+33) 01 30 83 33 62	   	       _/_/  _/_/    _/    _/
> Fax : (+33) 01 30 83 33 59	  	      _/  _/  _/    _/    _/  _/_/
> Unité MIG, INRA - CRV           	     _/      _/    _/    _/    _/
> F - 78026 Versailles CEDEX	            _/      _/  _/_/_/    _/_/_/
> 
> 
> 
> 
> 
> _______________________________________________
> Biocorba-l mailing list
> Biocorba-l@biocorba.org
> http://www.biocorba.org/mailman/listinfo/biocorba-l
>