RAMS logo
Introduction | Species lists | Search taxa | Taxon tree | Literature | Distributions | Statistics | Editors | Match taxa | Webservice | Log in
[Back]

Calling the RAMS webservice from Matlab

This tutorial assumes you have installed Matlab (http://www.mathworks.nl/products/matlab/).

Step 1: Download the WSDL file
from "https://www.marinespecies.org/rams/aphia.php?p=soap&wsdl=1"
Name the file and put in folder of choice (e.g. "rootdir/RAMS/aphia.xml")

Step 2: in Matlab: move to folder where wsdl file is located and run:
>> cd rootdir/RAMS
>> createClassFromWsdl('aphia.xml')
This creates a subfolder @AphiaNameService which is populated by a series of m-files (e.g. getAphiaNameByID.m).

Step 3: in Matlab: add folder to Matlab's path:
>> addpath('rootdir/RAMS/')
This completes the required set up.

Step 4: in Matlab: create an object of the class:
>> obj= AphiaNameService

Step 5: in Matlab: use one of the methods of the object
for example:
>> name = getAphiaNameByID(obj,127160)
which returns: name = 'Solea solea'

Credits for this tutorial go to Benoit Casault (DFO, Canada)


Website and databases developed and hosted by VLIZ · Page generated 2024-04-19 GMT · contact: Anton Van de Putte