Navigation path

How to create a webservice for the language coverage of your documents on EUROPA

This document describes how developers of a dynamic application can create a webservice in order to provide the language coverage of their documents to other applications on EUROPA which includes the CWCMS.

 

Context

Pages of the EUROPA web sites may refer to other documents belonging to external systems (for example Rapid). The language coverage of a referred document should be shown when the user clicks on a link associated with the document.
In this approach, the language coverage is not provided at HTML rendition time, but is retrieved by the user's Web Browser. The information concerning the linguistic coverage of the documents is provided by one or several so-called Web Services. The relevant Web Service is called from the HTML source document using AJAX technology.
This approach has been implemented for files hosted on the Europa HTTP Web Servers and for Rapid, but should be extended to other systems.
We will call those Web Services the Language Coverage Services or LACO Services to avoid confusion with the Web Service definition of W3C; the LACO Services are not based on SOAP, but are HTTP GET requests that return XML as response.

 
 

Short description of the LACO Service

Each supported system has a specific implementation of LACO Service. The LACO Service will receive requests specifying a document belonging to its corresponding systems.
If the document specified in the request exists in at least one language, the list of the available languages in which the document exists and the associated URLs will be returned. The order of these languages and of the associated URLs must always be the same. If the document specified in the request does not exist in any language, an error code will be returned.
The format of the information to be returned might be specified in the request. The XML format must always be available. Other formats may be available too.

 
 

How to implement a LACO service?

The call to the webservice is formatted as follows

  • http://<system_path>/coverage.do?<system_parameters>
  • http://<system_path>/coverage.do?<system_parameters><system_optional_parameters>
 

E.g. for RAPID

  • http://europa.eu/rapid/coverage.do?reference=PRES/05/350&language=EN
  • http://europa.eu/rapid/coverage.do?reference=PRES/05/350&language=EN&format=DOC&anchor=LOCATION
 

The XML structure that should be returned

<language_coverage domain="europa.eu" request="http://<system_path>/coverage.do?<system_parameters><system_optional_parameters>">
<document lang="en" label="english (en)" type="official" href="http://<system_path>/<system_action>?parameter1=value1&amp;parameter2=en&amp;optional_parameter1=optional_value1#location"/>
<document lang="fr" label="Français (fr)" type="official" href="http://<system_path>/<system_action>?parameter1=value1&amp;parameter2=fr&amp;optional_parameter1=optional_value1#location"/>

<document lang="ar" label="Arabic (ar)" type="non-official" href="http://<system_path>/<system_action>?parameter1=value1&amp;parameter2=ar&amp;optional_parameter1=optional_value1#location"/>
</language_coverage>

 

E.g. for RAPID

<language_coverage domain="europa.eu" request="http://europa.eu/rapid/coverage.do?reference=PRES/05/350&language=EN&format=DOC&anchor=LOCATION">
<document lang="en" label="english (en)" type="official" href="http://europa.eu/rapid/pressReleasesAction.do?reference=PRES/05/350&language=EN&format=DOC#LOCATION"/>
<document lang="fr" label="Français (fr)" type="official" href="http://europa.eu/rapid/pressReleasesAction.do?reference=PRES/05/350&language=FR&format=DOC#LOCATION"/>

<document lang="ar" label="Arabic (ar)" type="non-official" href="http://europa.eu/rapid/pressReleasesAction.do?reference=PRES/05/350&language=AR&format=DOC#LOCATION"/>
</language_coverage>

 

Make it available for the CWCMS

Once you have implemented your own webservice, please send an email to COMM EUROPA MANAGEMENT asking us to "intercept" all links in the CWCMS pointing to your documents in order to "make a call" to your LACO service.

 
 

More information

Generic web service proposal

Table of contents

  • Proposal
  • Context
  • Purpose of this document
  • Short description of the LACO Service
  • Access to the LACO Service
  • LACO Service general description
  • Additional parameters
  • Responses from the LACO Service
  • Case 1: the linguistic coverage of the specified document has been found
  • Case 2: The specified document is not available in any languages