%META:TOPICINFO{author="RenatoDeGiovanni" date="1229969698" format="1.1" reprev="1.36" version="1.36"}%
This section provides some examples of common TAPIR messages.
The latest version of the examples can always be found in the subversion repository. This page is only updated once in a while, so it might be that the examples below are not valid against the latest schema. But they will only vary in minor details.
http://ww2.biocase.org/svn/tapir/trunk/protocol/examples/
Messages in TAPIR should be sent through HTTP.
Every TAPIR message can be sent as an XML encoded document as defined by the TAPIR schema or alternatively through a list of URL [[GetInvokedOperations][parameters]] specified by TAPIR as well.
This allows to invoke all TAPIR operations through HTTP GET (using the [[GetInvokedOperations][parameters]]) or trough HTTP POST (using [[GetInvokedOperations][parameters]] or sending an XML document).
Here we provide a parameterized version of every example and the corresponding XML version. They MUST generate the same result from a TAPIR compliant service. The parameterized version is represented with an*unencoded* URL string.
----
---+++ TAPIR Operations
* [[#p][Ping]]
* [[#preq][request]]
* [[#presp][response]]
* [[#c][Capabilities]]
* [[#creq][request]]
* [[#cresp][response]]
* [[#m][Metadata]]
* [[#mreq][request]]
* [[#mresp][response]]
* [[#i][Inventory]]
* [[#it][inventory template]]
* [[#ireq][request]]
* [[#iresp][response]]
* [[#s][Search]]
* [[#om][output model]]
* [[#st][search template]]
* [[#sreq][request]]
* [[#sresp][response]]
----
---++ Ping operation
*HTTP Parameters*
* http://wrapper_end_point?op=ping
*XML message*
http://accesspoint_url
*Response*
----
---++ Metadata operation
*HTTP Parameters*
* http://wrapper_end_point?op=metadata
*XML message*
*Response*
BioCASe traininghttp://purl.org/dc/dcmitype/Servicehttp://localhost:8080/tapir/pywrapper/trainingThis testing database is used in BioCASE workshops and other events.
This database was gratefully provide by the Herbarium at the Universidad of Barcelona CeDocBiv,
but the data has been greatly modified so DO NOT CONSIDER IT AS REAL DATA
en-usBioCASe, Barcelona, CeDocBiv, herbarium, plantae, specimenThe BioCASE training databaseYou can distribute this database freely but only for testing purposes and training.2005-03-17data supplierdata supplierhttp://ww3.bgbm.org/biocase/datasources/training/metadata.xmlBotanic Garden & Botanical Museum Berlin-Dahlem
BGBM
http://www.biocase.org/images/bdi_logo.gifThe Botanic Garden Berlin-Dahlem comprises an area of 126 acres and hence is one of the world´s largest and most important gardens. About 22,000 different species of plants are cultivated here. In the 39 acres of the plant-geography section - one of the biggest of its kind in the world - you can travel all the way around the Northern Hemisphere, and in the 42 acre Arboretum and taxonomy section you can get an insight into the relationship among woody and herbaceous plants. The greenhouse complex consists of 16 houses open to the public and offers the possibility to travel through tropical and subtropical vegetation. These living collections, along with the preserved collections, form the basis for the continued expansion of scientific study within the plant kingdom, with the goal to deepen the knowledge necessary for the utilization and protection of plant diversity on earth.
Königin-Luise-Straße 6-8, D-14191 Berlin, Germany
http://www.bgbm.org/technicalFrank Sinatrasenior developer+49 30-5555-55frank@worldstars.orgadministrativeFrankensteinhead of biodiversity department+49 30-5555-56fstein@worldstars.org52.45835613.305017
----
---++ Capabilities operation
*HTTP Parameters*
* http://wrapper_end_point?op=capabilities
*XML message*
*Response*
21020500500
----
---++ Inventory operation
*HTTP Parameters*
* Without aliases
* http://wrapper_end_point?op=inventory&start=10&limit=10&concept=http://digir.net/schema/conceptual/darwin/2003/1.0#/Country&concept=http://digir.net/schema/conceptual/darwin/2003/1.0#/Genus
* With global concept aliases
* http://wrapper_end_point?op=inventory&start=10&limit=10&concept=Country@dwc&concept=Genus@dwc
* With template
* http://wrapper_end_point?op=inventory&start=10&limit=10&template=http://you.net/inventory3.xml&name=Inula*
*Inventory template*
An inventory template can be referred to in a request and allows simple parameter bindings to a more complex operation. Example template:
Search and list unique scientific names of specimen identifications ordered
alphabetically by their name. The filter parameter "name" is used to build the filter
*XML message*
In the XML messages aliases could also be used, but we only shows here the example with complete concept IDs
*Response*
AUSTRALIACaliciumAUSTRALIAFellhanera
----
---++ Search operation
Search operations make use of [[#om][output models]].
*HTTP Parameters*
* Without aliases
* http://wrapper_end_point?op=search&start=0&limit=10&model=http://res.tdwg.org/tapir/models/abcd206.xml&filter=http://www.tdwg.org/schemas/abcd/2.06/DataSets/DataSet/Units/Unit/Identifications/Identification/Result/TaxonIdentified/ScientificName/FullScientificNameString like "Luzu*"&orderby=http://www.tdwg.org/schemas/abcd/2.06/DataSets/DataSet/Units/Unit/Identifications/Identification/Result/TaxonIdentified/ScientificName/FullScientificNameString
* With global concept aliases
* http://wrapper_end_point?op=search&start=0&limit=10&model=http://res.tdwg.org/tapir/models/abcd206.xml&filter=FullScientificName@abcd206 like "Luzu*"&orderby=FullScientificName@abcd206
* With template
* http://wrapper_end_point?op=search&start=0&limit=10&template=http://you.net/search3.xml&name=Luzu*
*Output Model*
*Search template*
A search template can be referred to in a request and allows simple parameter bindings to a more complex operation. Example template:
Search specimens by their scientific name. Result is returned ordered by name and
catalogue number. The filter parameter "name" is used to build the filter.
*XML message*
*Response*
Luzula luzuloidesLuzula alpestris