spacer
spacer

Perl

Web Services Tool-kits

There are many modules available for developing Web Services clients or servers available for Perl 1). These fall into two broad categories:

  1. General purpose modules which implement Web Services technologies (i.e. REST or SOAP)
  2. Service libraries which implement the client and/or server interface for a service type (e.g. OpenSearch 2)) or for a specific service.

A selection of modules commonly used to access Web Services are listed below.

General Purpose

Perl modules which implement Web Services technologies, for example:

Web Service Style Perl Module
REST LWP (CPAN)
REST::Client (CPAN)
WWW::Curl (CPAN)
WWW::Curl::Simple (CPAN)
SOAP SOAP (CPAN)
SOAP::Lite (CPAN)
SOAP::WSDL (CPAN)
XML::Compile::SOAP (CPAN)

Note: When building a SOAP client the choice of Perl module is driven by compatibility with the Web Service(s) being used (e.g. RPC/encoded vs. Document/literal support), see SOAP Styles and the tutorials.

Client Libraries

Purpose built libraries for a type of service or a specific service, for example:

Web Service Type Perl Module
AtomPub Atompub (CPAN)
DAS Bio::Das (CPAN)
Bio::Das::Lite (CPAN)
DrugBank WWW::Search::DrugBank (CPAN)
GMOD Bio::GMOD (CPAN)
HGNC WWW::Search::HGNC (CPAN)
Integr8 SOAP::Integr8 (CPAN)
ISI Web of Knowledge SOAP::ISIWoK (CPAN)
NCBI Boulder::Genbank (CPAN)
NCBIx::BigFetch (CPAN)
OpenSearch WWW::OpenSearch (CPAN)
PDB WWW::PDB (CPAN)
PharmGKB WWW::Search::PharmGKB (CPAN)
PubChem WWW::Search::PubChem (CPAN)
PubMed WWW::Search::NCBI::PubMed (CPAN)
WWW::Search::PubMed (CPAN)
WWW::Search::PubMedLite (CPAN)

BioPerl

BioPerl (CPAN) includes support for a number of bioinformatics Web Services, for example:

Web Service BioPerl Module
dbfetch Bio::Biblio
Bio::DB::BioFetch
Bio::DB::EMBL
Bio::DB::RefSeq
Bio::DB::SwissProt
NCBI E-Utilities Bio::Biblio
Bio::DB::EUtilities
Bio::DB::EntrezGene
Bio::DB::GenBank
Bio::DB::GenPept
Bio::DB::Taxonomy
Open Biological Database Access (OBDA) 3) Bio::DB::Registry 4)
OpenBQS Bio::Biblio
QBlAST URL API Bio::Tools::Run::RemoteBlast
Soaplab Bio::Tools::Run::AnalysisFactory

Tutorials

Prerequisites

Knowledge of the following is required for these tutorials:

Web Services Tutorials Examples and Solutions

The examples and solutions for the exercises are available: perl_exercises.zip

The download is based on the E.P.I.C. project used to develop the tutorials. The files are explicitly referenced in the tutorials and links provided to the on-line versions. E.P.I.C. is not required to work though the exercises, a text editor and a working Perl installation are the only requirements.

To import the project into Eclipse:

  1. Download and install Eclipse
  2. If necessary install Perl, see http://www.perl.com/download.csp
  3. Install the E.P.I.C. plug-in for Eclipse
  4. Configure E.P.I.C. to use the installed Perl
  5. Download the project
  6. Unpack the project into a working directory
  7. Import the project into Eclipse using “File” → “Import…”
    1. For “import source” select “General” → “Existing Projects into Workspace”
    2. Specify the working directory containing the project
    3. Select the project

Initially the project will contain errors due to some code generated as part of the exercises not being present. Additionally there may be some errors due to some of the Perl modules required by the scripts not being installed.

Web Services Tutorials

Tutorials on using a selection of popular Perl modules to develop clients for Web Services:


Up Programming Web Services Contents Contents
3) Open Biological Database Access - http://obda.open-bio.org/
5) Extensible Markup Language (XML) - http://www.w3.org/XML/
 
tutorials/06_programming/perl.txt · Last modified: 2014/02/26 11:24 by hpm
spacer
spacer