spacer

WSDbfetch (SOAP)

Description

WSDbfetch allows you to retrieve entries from various up-to-date biological databases using entry identifiers or accession numbers. This is equivalent to the CGI based dbfetch service. Like the CGI service a request can return a maximum of 200 entries.

For more information see:

Clients

Sample clients are provided for a number of programming languages. For details of how to use these clients, download the client and run the program without any arguments.

Language Download Requirements
C# .NET Executable: wsdbfetch.exe; Source: wsdbfetch.cs A .NET runtime environment. If building from source development tools are also required. See the .NET tutorial for details.
Java Executable jar: WSDbfetch.jar; Source: WSDbfetchClient.java Axis 1.4; All dependencies, including Axis 1.4 and Commons-CLI, are available in lib-1.4.zip.
Perl dbfetch.pl SOAP::Lite
PHP wsdbfetch_cli_nusoap.php nuSOAP/nusoap-for-php5
wsdbfetch_cli_pear_soap.php PEAR SOAP
wsdbfetch_cli_php_soap.php PHP SOAP
Python wsdbfetch.py SOAPpy
wsdbfetch_zsi.py ZSI 2.0
Ruby wsdbfetch.rb soap4r
VB.NET .NET Executable: wsdbfetch.exe; Source: wsdbfetch.vb A .NET runtime environment. If building from source development tools are also required. See the .NET tutorial for details.

For further details see WSDbfetch Clients.

WSDL

Service API

fetchBatch(db, ids, format, style)

Fetch a set of entries in a defined format and style.

Arguments:

  • db: the name of the database to obtain the entries from. For example: “uniprotkb”
  • query: a string containing a comma separated list of entry identifiers. For example: WAP_MOUSE,WAP_RAT”
  • format: the name of the format required. To get the default format for the database use the value “default”.
  • style: the name of the style required. To get the default style for the database use the value “default”.

Returns: an array of strings containing the entries. Generally this will contain only one item which contains the set of entries.

Throws:

fetchData(query, format, style)

Fetch an entry in a defined format and style.

Arguments:

  • query: the entry identifier in db:id format. For example: “UniProtKB:WAP_RAT”
  • format: the name of the format required. To get the default format for the database use the value “default”.
  • style: the name of the style required. To get the default style for the database use the value “default”.

Returns: an array of strings containing the entry. Generally this will contain only one item which contains the whole entry.

Throws:

getDbFormats(db)

Get a list of format names for a given database.

Arguments:

  • db: database name to get available formats for. For example: “uniprotkb”

Returns: an array of strings containing the format names.

Throws:

getFormatStyles(db, format)

Get a list of style names available for a given database and format.

Arguments:

  • db: database name to get available styles for. For example: “uniprotkb”
  • format: the data format to get available styles for. For example: “fasta”

Returns: an array of strings containing the style names.

Throws:

getSupportedDBs()

Get a list of database names usable with WSDbfetch.

Arguments: none

Returns: an array of strings containing the database names.

getSupportedFormats()

Get a list of database and format names usable with WSDbfetch.

Arguments: none

Returns: an array of strings containing the database and format names. For example:

uniprotkb       default,fasta,uniprot,uniprotxml

getSupportedStyles()

Get a list of database and style names usable with WSDbfetch.

Arguments: none

Returns: an array of strings containing the database and style names. For example:

uniprotkb       default,html,raw

DbfException

Generic exception used for errors thrown by the WSDbfetch service.

Subclasses:

DbfParamsException

Exception indicating that the input parameters failed to validate. The message contains specific information about the cause. For example:

  • uk.ac.ebi.jdbfetch.exceptions.DbfParamsException: Database, wibble , not found!
  • uk.ac.ebi.jdbfetch.exceptions.DbfParamsException: No database found for the job:
    Job: 
            Database name: wibble
            Style: raw
            Format: default
            IDs:    blah
    

Parent class: DbfException

DbfConnException

Exception indicating that there was a problem contacting the database to retrieve the requested data. For example:

uk.ac.ebi.jdbfetch.exceptions.DbfConnException: Unexpected error when opening stream on the URL, please contact support@ebi.ac.uk

Parent class: DbfException

DbfNoEntryFoundException

Exception indicating that no entries were found in the database which matches the request. For example:

uk.ac.ebi.jdbfetch.exceptions.DbfNoEntryFoundException: No result found

Common causes of the error include:

  • Invalid identifier used for the specified database. For example: EMBL-Bank does not contain entries with RefSeq identifiers (e.g. XM_002123246).
  • Use of an identifier which is not supported for the specified database. For example: the EMBL-Bank query used by WSDbfetch does not support sequence versions (e.g. L12345.1) instead the accession (e.g. L12345) should be used, or the archive database EMBL-SVA, which does support sequence versions, should be queried.

Parent class: DbfException

InputException

Exception indicating that required parameters were not specified, or were in an incorrect format. For example:

  • uk.ac.ebi.jdbfetch.ws.wsdbfetch.InputException: The 'query' argument doesn't contain ':'. Proper format= DBNAME:ID
  • uk.ac.ebi.jdbfetch.ws.wsdbfetch.InputException: No database found in the query
  • uk.ac.ebi.jdbfetch.ws.wsdbfetch.InputException: No ID found in the query

Contact

If you have any questions, comments, if you plan to use this service as part of a course or for a high number of submissions, please contact us via EBI Support.

 
services/dbfetch.txt · Last modified: 2009/12/14 10:49 (external edit)
spacer
spacer