Businesses and enterprises, for their web apps and other digital identities, use HTTP-based resources to gain streamlined access for viewing the internal data and carrying out the operations on (or using) it. These HTTP-based resources/applications deploy text-based documents to data representation.
WADL acts as a means between the data and end-users to make sense out of HTTP-based app data. Read this article to understand what it is and what’s its significance in an elaborated manner.
WADL is the language instructed for explaining the traits or segments of HTTP web solutions/applications. Description of the app’s all HTTP resources alongside their correlations and dependencies can be provided using it.
The language intends to make HTTP web services simplified up to such an extent that understanding the core architecture and processing is not complex for end-users and other machines while promoting application reuse. Unlike other languages, WADL is yet to be standardized by the World Wide Web Consortium.
The distinguishers of WADL scope are provided below -
The key WADL defining elements are listed as under:
With this component, WADL explains the URI-identified resources.
This element features an xsd:anyURI typed base attribute and operates or behaves like a container for all the application-offered resources. The base attribute of this element proffers the fundamental URI for every included child resource identifier.
Here are the key attributes of this element:
Other than all the above-mentioned attributes, ‘resource’ also has many other child elements like any number of doc and param elements, template, matrix, header, and query.
This WADL description element refers to the input provided and output received via HTTP, implemented to a given resource. Its key child elements are -
Method attribute exists in two forms: method definition and method reference. At a time, only one form exists.
Method Reference
It is an offspring of href attributing resource element with a type value of xsd:anyURI. Here, the href attribute value acts out as the method definition element’s cross-reference.
Any other WADL-based attribute or child elements shouldn’t be included in the method reference. Speaking of the utility, method reference is used to prevent method duplication when it’s applied to multiple resources at a time.
Method Definition
A child of the application or resource element, this second type has attributes as enlisted below:
name refers to the deployed HTTP method. Various child method elements can feature similar name values. Such child elements are known as siblings and will inherit the different variations of one identical HTTP method. Siblings will have distinct input values.
id is the method identifier essential for defining widely adopted defined methods. Locally embedded methods don’t feature an id. The id is XML id and indicates URI reference usage.
With the help of this element, WADL explains the input used for the HTTP method. It contains no attributes, but a few child elements such as doc, representation, and param elements.
All these child elements could feature zero or more value.
Response’s param will feature a query or header value. It will be added to the style attribute.
A part of various attributes that define WADL, response signifies the output received for an HTTP request sent. In return, it receives just 1 attribute’s value, i.e. Status. Status is non-compulsory and offers the HTTP status codes that are linked with a specific response.
Its children elements are as listed below:
Parameter or param element can be a parameter definition or a reference and indicates the parent element’s parameterized value.
Parameter Reference
This type of param element features href attribute with xsd:anyURI type value.
href is the cross-reference for the param definition element. It is a standard practice to exclude WADL-defined attributes or child elements from it, considering its cruciality. It’s most commonly used for trimming the duplicates in scenarios where a parameter is applied to multiple parents.
Parameter Definition
It explains the parameterized value of elements, like a parent element or a resource child. Other than this, param definition is also used for representation, application, response, and request elements.
This element features:
The key attributes of these elements are id, name, style, type, default, path, required, repeating, and fixed.
Other than id, name, and style, the rest are optional attributes.
WADL Example
As both WADL and WSDL are the contracts/interfaces for web services and are used in almost similar situations, it’s crucial to figure out the differences between these two for effective usage.
Before delving deep to figure out the differences, understand one key similarity that is both acts as a bridge between the server and the clients and are responsible for data transfer.
In simple words, it is the XML description comprising the details of the app's structure, media extensions, and resources alongside the HTTP requesting methods. To understand it better, try doing this for a REST solution:
this way, you will be able to view opened RESTful app’s description and take its reference.
Employed widely to illustrate the utilities and characteristics of HTTP-driven web services, WADL is assisting web applications like Flickr, Google, and Yahoo greatly. Knowing about WADL in detail will help you reuse these apps and services better. You can even convert this file to WADL JSON format and use it more conveniently.
Subscribe for the latest news