|
The first exercise within the chapter webservices is to use a webservice
without any knowledge about it.
- Conditions: perl and SOAP-Lite (SOAP implementation for Perl), possibly proxy settings
- open an editor of your choice and cut and paste the following lines
#!/usr/bin/env perl
use SOAP::Lite;
my $usa = shift;
my $format = shift;
my $style = shift;
print SOAP::Lite->service("http://www.ebi.ac.uk/Tools/webservices/wsdl/WSDbfetch.wsdl")
->on_fault(sub {print "error!\n\n"})
->fetchData($usa,$format,$style);
- save the file as 'WSDbfetch.pl' and make it executable ("chmod u+x WSDbfetch.pl").
- a sample call of this webservice should be
./WSDbfetch.pl 'embl:xxxxx' fasta raw (Hint: Replace xxxxx for example with one of the following accession numbers: AB003143, AB041360, AM901009, DT726325, DN161306, EF534371, EF534372. If you practice this exercise in a curse, please use different accession numbers, because the EBI judges more than 25 calls with the same accession number from the same IP range within a few hours as an attac. This will result in a temporary blockade of all your future webservice calls.)
- ...
|
|