[CBIN] [MOBY-l] GetPubmed service: calling from Perl, sample response
Mark Wilkinson
markw at illuminae.com
Thu Apr 1 19:14:31 UTC 2004
Yeah, the list server is stripping all attachments right now. I must
have "hit a switch" that I didn't mean to when I was playing with the
settings to cut down on the amount of spam we were getting...
I'll try to see where I went wrong. In the meantime, inline is the best
we can do.
M
On Thu, 2004-04-01 at 09:38, Frank Gibbons wrote:
> Oops - sorry about that, Vijay, I was sure I had attached it. The list
> server told me my message looked suspicious, and perhaps it stripped it.
> Whatever the reason, here it is appended, the output is attached, since
> it's rather long.
>
> -Frank
>
> At 12:15 PM 4/1/2004, Vijay Narayanasamy wrote:
> >Frank,
> >
> >The attachment PMid.pl is missing.
> >
> >Vijay
> >
> >Vijay Narayanasamy
> >Project Programmer / Analyst
> >Bioinformatics Program, Human and Molecular Genetics Center
> >Medical College of Wisconsin
> >8701, W. Watertown Plank Road
> >Milwaukee, WI 53226
> >414-456-8026
> >vnarayan at mcw.edu
> >http://brc.mcw.edu/
> >
> >-----Original Message-----
> >From: Frank Gibbons [mailto:fgibbons at hms.harvard.edu]
> >Sent: Thursday, April 01, 2004 9:59 AM
> >To: moby-l at biomoby.org
> >Subject: Re: [MOBY-l] help needed for GetPubmed service
> >
> >Martin,
> >
> > Thanks for any advise, actually, if someone can get me any simple XML
> > >object and tell me where to send it in order to get an answer and not an
> > >errror I will be happy... :-)
> >
> >
> >I'm attaching some Perl code (PMid.pl) that calls the GetPubmed service at
> >prometheus. I wrote it last week, and just tried it right now, and it still
> >works. I'm also appending the output from the service also (PM.txt).
> >
> >I hope this helps.
> >
> >-Frank
> >
> >
> >
> >PhD, Computational Biologist,
> >Harvard Medical School BCMP/SGM-322, 250 Longwood Ave, Boston MA 02115, USA.
> >Tel: 617-432-3555 Fax:
> >617-432-3557 http://llama.med.harvard.edu/~fgibbons
>
>
> ================= Perl code to look up PubMed IDs at GetPubmed service
> ===============
> #!/home/fgibbons/bin/perl
>
> use MOBY::Client::Central;
> use MOBY::Client::Service;
>
> my $Central = MOBY::Client::Central->new();
>
> my ($Services, $REG) =
> $Central->findService( authURI => 'prometheus.brc.mcw.edu',
> serviceName => 'GetPubmed'
> );
> unless ($Services) {
> print "Service discovery failed with the following errror: ",
> $REG->message;
> end
> }
>
> my @PMids = ("9788350", "14730315", "12368250");
> printf("%-35s\t\t %s\n%s\n", "Service", "provided by", "="x80);
> foreach my $S ( @{$Services}) {
> printf("%-35s\t\t%s%s\n", $S->name, $S->authority, $S->description);
> my $WSDL = $Central->retrieveService($S);
> my $service = MOBY::Client::Service->new(service => $WSDL);
> foreach my $pmid (@PMids) {
> my $result =
> $service->execute( XMLinputlist => [
> ['object0',
> "<Object
> namespace='PMID' id='" . $pmid
> . "' articleName='" .
> $pmid . "'/>"],
> ]
> ) || 'None';
> print "Result: ", $result, "\n";
> }
> }
>
>
>
>
>
> PhD, Computational Biologist,
> Harvard Medical School BCMP/SGM-322, 250 Longwood Ave, Boston MA 02115, USA.
> Tel: 617-432-3555 Fax:
> 617-432-3557 http://llama.med.harvard.edu/~fgibbons
>
> ______________________________________________________________________
> _______________________________________________
> moby-l mailing list
> moby-l at biomoby.org
> http://biomoby.org/mailman/listinfo/moby-l
--
Mark Wilkinson (mwilkinson at mrl.ubc.ca)
University of British Columbia iCAPTURE Centre
More information about the moby-l
mailing list