[MOBY-l] Example client?

Ken Steube steube at sdsc.edu
Thu Dec 19 02:20:52 UTC 2002


Hi everybody, my name's Ken Steube and I'm planning to put some of our
PlantsP data (http://plantsp.sdsc.edu) on-line via a MOBY service.

I'm trying to figure out how to write clients first.  Can somebody share
the source for a working client for some service you have up and running?
It doesn't have to be anything fancy, but one that works against current
moby-live source so I can run and experiment with it.

I've already managed to read a little source code and update
simple_client.pl.  It all works against MarksTestSequenceRetrieve at
michael.cbr.nrc.ca except for the arguments to the critical execute().
All but the important part!

Any help appreciated.

Ken

-------------------------------------
Ken Steube            steube at sdsc.edu
San Diego Supercomputer Center @ UCSD
San Diego, California             USA



Here's my updated simple_client.pl:



#!/usr/local/bin/perl -w
use strict;

use MOBY::Client::Central;
use MOBY::Client::Service;

my $Central = MOBY::Client::Central->new(
  MOBY_server => "http://michael.cbr.nrc.ca/cgi-bin/MOBY-Central.pl"
);

print "looking for services that use Objects with genbank ID's to retrieve\n";
my @services =  $Central->locateServiceByInput(
  ['Object'], ['GenBank/GI'], 'Retrieve'
);

my $si = shift(@services);

my $ServiceName = $si->{name};
my $authority = $si->{authority};
my $wsdl = $Central->retrieveService($authority, $ServiceName);

my $Service = MOBY::Client::Service->new(service => $wsdl);

my $data = SOAP::Data->type(base64 => "<Object namespace='GenBank/GI' id='168257'/><Object namespace='GenBank/GI' id='168257'/>");

my $result = $Service->execute($data);




More information about the moby-l mailing list