Web Application Description Language

From Wikipedia, the free encyclopedia
Jump to: navigation, search

The Web Application Description Language (WADL) is a machine-readable XML description of HTTP-based web services.[1] WADL models the resources provided by a service and the relationships between them.[1] WADL is intended to simplify the reuse of web services that are based on the existing HTTP architecture of the Web.[1][2] It is platform and language independent and aims to promote reuse of applications beyond the basic use in a web browser.[1]

WADL was submitted to the World Wide Web Consortium by Sun Microsystems on 31 August 2009[1], but the consortium has no current plans to standardize it[2]. WADL is the REST equivalent of SOAP's Web Services Description Language (WSDL), which can also be used to describe REST web services.[3]


The service is described using a set of resource elements. Each resource contains param elements to describe the inputs, and method elements which describe the request and response of a resource. The request element specifies how to represent the input, what types are required and any specific HTTP headers that are required. The response describes the representation of the service's response, as well as any fault information, to deal with errors.


The following listing shows an example of a WADL description for the Yahoo News Search application.

 <application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://wadl.dev.java.net/2009/02 wadl.xsd" 
   <resources base="http://api.search.yahoo.com/NewsSearchService/V1/"> 
     <resource path="newsSearch"> 
       <method name="GET" id="search"> 
           <param name="appid" type="xsd:string" 
             style="query" required="true"/> 
           <param name="query" type="xsd:string" 
             style="query" required="true"/> 
           <param name="type" style="query" default="all"> 
             <option value="all"/> 
             <option value="any"/> 
             <option value="phrase"/> 
           <param name="results" style="query" type="xsd:int" default="10"/> 
           <param name="start" style="query" type="xsd:int" default="1"/> 
           <param name="sort" style="query" default="rank"> 
             <option value="rank"/> 
             <option value="date"/> 
           <param name="language" style="query" type="xsd:string"/> 
         <response status="200"> 
           <representation mediaType="application/xml" 
         <response status="400"> 
           <representation mediaType="application/xml" 

Generate WADL or generate code from WADL[edit]


There are multiple tools to generate java code from an existing WADL:[4][5]

See also[edit]


External links[edit]