[MOBY-l] glue for web services...

Ken Steube steube at sdsc.edu
Fri Nov 21 16:51:23 UTC 2003


Part of my "Discovering and Executing Services" talk shows how to do this:

  http://plantgenome.sdsc.edu/mobyed2/Talks/discovering_executing_services.html

Page 2 has a link to my PBI_Cluster_Blast program which does what you want.

If you need go ahead and parse the XML the MobyXmlObject.pm perl module
supplied with the FASTA example makes it easy.

Ken

On Thu, 20 Nov 2003, Michael Jensen wrote:

> There are lots of neat services people are putting up on moby. One of
> the advantages to moby is being able to put together services...one
> service's output as another's input. Is there some quick way to get the
> output from one service into another service without parsing all the
> XML as the result? For example I would like to use SearchPubMed and get
> some PMIDs, and then use those in GetPubmed to get the MEDLINE display
> format. Any help, guidance, or redirection would be appreciated!
>
>
> I have been learning by using one of the tutorial scripts like the
> following:
>
>
> #!/usr/bin/perl
> #Executes a service, where the name of the service, its namespace and
> its parameter are provided on the command line.
>
> use MOBY::Client::Central;
> use MOBY::Client::Service;
>
> my $Central = MOBY::Client::Central->new();
>
> my $serv_name = ($ARGV[0])? $ARGV[0] : 'getGoTerm';
> my $namespace = ($ARGV[1])? $ARGV[1] : 'go';
> my $query = ($ARGV[2])? $ARGV[2] : '0012502';
> print $serv_name, " ", $namespace, " ", $query, "\n";
>
> my ($ServiceInstances,$RegObject) = $Central->findService(
>                                            serviceName=>$serv_name);
> if (not $ServiceInstances) {
>      die $RegObject->message;
> }
>
> foreach my $ServiceInstance (@{ $ServiceInstances} ) {
>      my $WSDL = $Central->retrieveService($ServiceInstance);
>      my $Service = MOBY::Client::Service->new(service => $WSDL);
>      my $Triple = '<Object namespace="' . $namespace . '" id="' . $query
> . '"/>';
>      print "Triple: $Triple\n";
>      print "Sending request to ", $ServiceInstance->authority,"\n";
>      my $result = $Service->execute(XMLinputlist => [
>                               ['object1', $Triple] ]);
>      print "result: ", $result, "\n";
> }
>
> The result is in XML format so I could parse it and get my values, but
> I was thinking there may be a better way to do it than I am not aware
> of. Thanks!
>
> -Michael Jensen
> mdjgf8 at mizzou.edu

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




More information about the moby-l mailing list