Sun has submitted "Web Application Description Language" (WADL) spec to W3C.
It's a desription language analogous to WSDL, but for REST/API services. It's also supposed to describe relationships between the resources.
See http://www.w3.org/Submission/wadl/
Implementation: There is a current implementation of it as part of Jersey JAX-RS.
An Amazon service in WADL is represented as
1 <application xmlns="http://wadl.dev.java.net/2009/02"
2 xmlns:aws="http://webservices.amazon.com/AWSECommerceService/2005-07-26"
3 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
4 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5 xsi:schemaLocation="http://wadl.dev.java.net/2009/02 wadl.xsd">
6
7 <grammars>
8 <include href="AWSECommerceService.xsd"/>
9 </grammars>
10
11 <resources base="http://webservices.amazon.com/onca/">
12 <resource path="xml">
13 <method href="#ItemSearch"/>
14 </resource>
15 </resources>
16
17 <method name="GET" id="ItemSearch">
18 <request>
19 <param name="Service" style="query"
20 fixed="AWSECommerceService"> </param>
21 <param name="Version" style="query" fixed="2005-07-26"> </param>
22 <param name="Operation" style="query" fixed="ItemSearch"> </param>
23 <param name="SubscriptionId" style="query"
24 type="xsd:string" required="true"> </param>
25 <param name="SearchIndex" style="query"
26 type="aws:SearchIndexType" required="true"> </param>
27 <option value="Books"/>
28 <option value="DVD"/>
29 <option value="Music"/>
30
31 <param name="Keywords" style="query"
32 type="aws:KeywordList" required="true"> </param>
33 <param name="ResponseGroup" style="query"
34 type="aws:ResponseGroupType" repeating="true"> </param>
35 <option value="Small"/>
36 <option value="Medium"/>
37 <option value="Large"/>
38 <option value="Images"/>
39
40 </request>
41 <response>
42 <representation mediaType="text/xml"
43 element="aws:ItemSearchResponse"/>
44 </response>
45 </method>
46 </application>
Would like to hear your comments on whether you find this spec useful. Currently, it doesn't have a security profile. What would you like to see defined in such security profile?
|