Wiki

Imprimir Propiedades
Importation of Services from WADL

WADL (Web Application Description Language) WADLURL is an XML-based format language that provides a machine-readable description of HTTP-based web services, (usually REST Services). This is a sample of WADL, it is the definition for the Google Translator Service. The WADL has to be published online to be imported in MyCocktail.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<application xmlns="[http://research.sun.com/wadl/2006/10">]
    <resources base="[http://ajax.googleapis.com/ajax/services/">]
        <resource path="language/translate">
            <method name="GET" id="translate">
                <request>
                    <param type="xs:string" style="template" name="v" fixed="1.0" />
                    <param type="xs:string" style="query" name="q"/>
                    <param type="xs:string" style="query" name="langpair"/>
                </request>
                <response>
                    <representation mediaType="application/json"/>
                </response>
            </method>
        </resource>
    </resources>
</application>

MyCocktail is able to read a subset of WADL, does not allow all the WADL possibilities because it is focused in the most common format of REST Services like Google, Yahoo or Flickr ones. The option for the WADL importation is available in the top left of MyCocktail window.
Import Service from WADL menu

The next dialogue appears when the user selects the “Import Service from WADL” in the menu. Filling the field with the URL where is the WADL file, MyCocktail will retrieve it and transform into a MyCocktail service.

Dialog to import a WADL Service

Once the WADL is processed, a new service appears in the Services panel, the number of services generated by MyCocktail depends of the services defined into the WADL.

The generated service in the Services panel

This is the panel generated automatically from the WADL, and the response retrieved from the service. This panel appears when the service is dragged and droppd from the Services Panel to the Action Panel.

Panel for the service generated from WADL

1494 Accesos, 0 Ficheros adjuntos 0 Ficheros adjuntos

  • Comentarios