Web services

What is a web service?

Websites or applications are constructed from code which is sent by servers to web browsers (Firefox, Chrome, etc.). The web browser interprets this code and executes it using hardware resources (processor, memory, etc.,) on the client workstation.

The content (data, such as observation positions or metadata such as the description of datasets) presented and processed by these web applications is accessed when the web pages load or according to the actions of the user. This content is sent over the Internet by web services.

Example:

WebServices1

The use of a web service may be divided into different stages:

  • In stage 1, the client asks the service how to invoke it (i.e. how to request a service). The web service is asked for its WSDL (Web Service Description Language) contract: this is a formalised document (XML, W3C) which specifies the methods that may be called by this web service.
  • In stage 2, the service returns its description (WSDL) indicating how to invoke this service (methods, format of calls, parameters, values returned, etc.). Upon use: we call the method (SOAP+XML) that is desired in accordance with the previously acquired format. This is done quite simply by instantiating and using its methods. This is a transparent process.
  • In stage 3, the client invokes the service by sending a SOAP request in accordance with the previously acquired format.
  • In stage 4, the service returns the response to the client in a reply (still in SOAP). We recover the result of the method.

WebServices2

Points in common between the various web services

All web services have common points:

  • WEB services HTTP(POST/GET)
    • Common parameters: SERVICE, VERSION, REQUEST, etc.
  • Self-description of services provided: REQUEST=GetCapabilities
  • Format XML (Output format of the text reply: always XML)
  • Coordinate Reference Systems (CRS or SRS): EPSG codification (complete list: http://www.epsg-registry.org)

What content?

The access portals to marine information enable the following content to be explored:

  • the descriptions of:
    • means of observation and analysis of the marine environment
    • observations carried out
    • data products assembled for users
    • services for the conversion and processing of data
    • scientific publications
    • persons and organisations contributing to the observation and analysis of the marine environment.
    • vocabularies and reference terms used in the content
  • data from:
    • results of observations
    • compilations of results of observations or summaries

Why standardise web services?

There are two reasons why we standardise web services which transmit this content.

The first is that the structure of the content (description of the means of observation, results of observation, etc.,) is more stable than the way in which we present it in web pages. Therefore, the same web service transmitting content may be presented in different ways for different projects, in different contexts according to the requirements of users without it being necessary to redevelop the software that supplies the web services and transmits the content.

The second is that content may be shared with partner sites. The use of standards for querying and transmitting content facilitates its use by partner sites.

What standards for which content?

Amongst the standards, we sometimes distinguish:• protocols: they define the procedures for querying web services, for example: "I want the results of temperature observations in the water column in the Mediterranean".• formats: they define the structure of the replies and content sent by web services, for example CSV.The standards are developed by various organisations (OGC, W3C, ISO, OAI, WebID, etc.).For geo-referenced content, the Open GIS Consortium protocols are used:General protocols:

Content

Protocol

Format

Distribution of dynamic maps (images of geographical maps)

OGC/WMS

png, tiff, jpeg, ...

Distribution of geographical components ("features"): distribution of geo-referenced entities (locations, limits, trajectories,…)

OGC/WFS

GML

Distribution of geographical coverage

OGC/WCS

Distribution of data and metadata from observation equipment (sensors)

OGC/SOS

Querying of catalogues of metadata

OGC/CSW

Dedicated protocols:

Content

Protocol

Format

Description of observation equipment and analysis methods

OGC/SOS

SensorML

Description of observations

OGC/SOS

O&M

Résultat des observations

  • Summaries

OGC/WFS

GML

  • Details

OGC/SOS

GML, JSON, netCDF, CSV

Description of assembled data products

OGC/CSW

ISO19139, Dublin-Core

Results of data products

  • Collections of observations

OGC/SOS

NetCDF, CSV

  • Geo-spatial summaries

OGC/WCS

NetCDF, CSV

Data conversion and processing services

OGC/WPS

any

For non-geo-referenced content, specific standards are used:

Content

Standard

Description of publications

OAI-PMH, OAI-ORE

Description of persons

WebID/FOAF

Vocabularies and reference terms

W3C / SPARQL, SKOS, OWL, RDF, ...

Dedicated community standards are also used to transmit certain observation or analysis results:

Content

Standard

Physics and bio-geo-chemistry of the ocean and the atmosphere

OPENDAP

Biodiversity

Darwin-Core

Lastly, dynamic web applications, which have been developed since the 2000s under the name of AJAX or Web 2.0, make intensive use of web services called RESTful. These services implement the web logic (resources containing links to other resources) to access content. The format of this content is usually JSON. These web services are also standardised to access marine information, like the SensorThings API proposed by the OGC.