forked from ipcsystems/wadl-stylesheet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample_wadl.xml
executable file
·221 lines (214 loc) · 12.8 KB
/
example_wadl.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="wadl.xsl"?>
<!--
example.wadl (06-May-2011)
Example Web Application Description Language (WADL) Web Service interface specification,
which demonstrates my WADL XSLT stylesheet, wadl.xsl.
Mark Sawers <[email protected]>
Copyright (c) 2011 IPC Systems, Inc.
This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 License.
To view a copy of this license, visit
http://creativecommons.org/licenses/by-sa/3.0/
or send a letter to
Creative Commons
543 Howard Street, 5th Floor
San Francisco, California, 94105, USA
-->
<wadl:application xmlns:wadl="http://wadl.dev.java.net/2009/02"
xmlns:jr="http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" xmlns:r="http://anydomain/schema/reports Report.xsd"
xmlns:n1="http://anydomain/MyTypes.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://wadl.dev.java.net/2009/02 wadl.xsd ">
<wadl:doc title="Report Service">
Generates reports with parameter data or template reference in requested
format. Additionally persists
custom report definitions.
</wadl:doc>
<wadl:grammars>
<wadl:include href="Report.xsd" />
<wadl:include href="http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" />
</wadl:grammars>
<wadl:resources base="http://anyhost">
<wadl:resource path="report">
<wadl:doc title="Description">Domain function methods</wadl:doc>
<wadl:resource path="standard/{reportName}">
<wadl:doc title="Description">Executes (generates) custom and standard reports. Persists standard
reports.
</wadl:doc>
<wadl:method name="GET" id="getReport">
<wadl:doc>Description: Executes (generates) custom or standard report.</wadl:doc>
<wadl:doc title="Example">standard/GroupedUsers</wadl:doc>
<wadl:request>
<wadl:param name="authorization" style="header" type="xsi:string" required="true">
<wadl:doc>HTTP Basic Authentication</wadl:doc>
</wadl:param>
<wadl:param name="limit" style="query" xmlns:xs="http://www.w3.org/2001/XMLSchema" type="xs:int" required="false">
<wadl:doc>record limit (page size)</wadl:doc>
</wadl:param>
<wadl:param name="offset" style="query" type="integer" required="false">
<wadl:doc>record offset (page number)</wadl:doc>
</wadl:param>
<wadl:param name="mode" style="query" type="string" fixed="compact">
<wadl:doc>Verbosity</wadl:doc>
</wadl:param>
<wadl:param name="format" style="query" xmlns:n2="http://anydomain/schmema/mytypes"
type="n2:query-enum">
<wadl:doc>Output format</wadl:doc>
<wadl:option value="xml" mediaType="application/xml"/>
<wadl:option value="pdf" mediaType="application/pdf"/>
</wadl:param>
<wadl:param name="style" style="query" type="n1:style-enum">
<wadl:doc>Report format</wadl:doc>
<wadl:option value="brief"/>
<wadl:option value="detailed"/>
</wadl:param>
<wadl:representation mediaType="application/xml" element="r:reportParameters"
href="Report.xsd">
<wadl:doc>Filter criteria for the report
<ns4:p xmlns:ns4="http://www.w3.org/1999/xhtml">
<ns4:h6>Example</ns4:h6>
<ns4:pre>
<ns4:code>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><br/>
<ns1:ReportParameters xmlns:ns1="http://anydomain/schema/reports Report.xsd"><br/>
<ns1:scope>enterprise</ns1:scope><br/>
<ns1:month>Feb</ns1:month><br/>
</ns1:ReportParameters> </ns4:code>
</ns4:pre>
</ns4:p>
</wadl:doc>
</wadl:representation>
</wadl:request>
<wadl:response status="200">
<wadl:doc title="OK" />
<wadl:representation mediaType="application/html">
<wadl:doc title="HTML"> Hypertext Markup Language (HTML) formatted report</wadl:doc>
</wadl:representation>
<wadl:representation mediaType="application/pdf">
<wadl:doc title="PDF"> Portable Document Format (PDF) formatted report</wadl:doc>
</wadl:representation>
<wadl:representation mediaType="text/csv" element="csv">
<wadl:doc title="CSV"> Comma Separated Values (CSV) formatted report</wadl:doc>
<wadl:doc title="Example">http://anyhost/docs/report/examples/ReportParameters.xml</wadl:doc>
</wadl:representation>
<wadl:representation mediaType="application/xml" xmlns:rc="Report.xsd" element="rc:reportContent">
<wadl:doc title="Report Content" />
<wadl:doc title="Example">standard/example/ReportContent.xml</wadl:doc>
</wadl:representation>
</wadl:response>
<wadl:response status="400">
<wadl:doc title="Bad request" />
</wadl:response>
<wadl:response status="403">
<wadl:doc title="Forbidden">User does not have privilege to read the resource</wadl:doc>
</wadl:response>
<wadl:response status="404">
<wadl:doc title="Not Found" />
</wadl:response>
</wadl:method>
<wadl:method name="PUT" id="putReport">
<wadl:doc title="Description">Creates or updates custom report.</wadl:doc>
<wadl:doc title="Example">/standard/QuarterlyReport</wadl:doc>
<wadl:request>
<wadl:param name="Authorization" style="header" type="xsi:string" required="true">
<wadl:doc>HTTP Basic Authentication</wadl:doc>
</wadl:param>
<wadl:representation mediaType="application/xml" element="jr:jasperReport">
<wadl:doc title="Jasper Report Definition" />
</wadl:representation>
</wadl:request>
<wadl:response status="200">
<wadl:doc title="OK">Resource was updated</wadl:doc>
</wadl:response>
<wadl:response status="201">
<wadl:doc title="Created">Resource was created</wadl:doc>
</wadl:response>
<wadl:response status="403">
<wadl:doc title="Forbidden">User does not have privilege to create or update the resource
</wadl:doc>
</wadl:response>
<wadl:response status="404">
<wadl:doc title="Not Found" />
</wadl:response>
</wadl:method>
</wadl:resource>
<wadl:resource path="custom/{reportName}">
<wadl:param type="xsi:string" style="template" required="true" name="reportName">
<wadl:doc>Report name</wadl:doc>
</wadl:param>
<wadl:method name="DELETE" id="deleteReport">
<wadl:doc>Description: Deletes custom report.</wadl:doc>
<wadl:doc>An example: http://anyhost/report/custom/deviceHealthTest</wadl:doc>
<wadl:request>
<wadl:param name="Authorization" style="header" type="xsi:string" required="true">
<wadl:doc>HTTP Basic Authentication</wadl:doc>
</wadl:param>
</wadl:request>
<wadl:response status="200">
<wadl:doc title="OK">Resource was deleted</wadl:doc>
<wadl:param type="xsi:string" style="header" name="date">
<wadl:doc>Deletion date</wadl:doc>
</wadl:param>
</wadl:response>
<wadl:response status="403">
<wadl:doc title="Forbidden">User does not have privilege to delete the resource</wadl:doc>
</wadl:response>
<wadl:response status="404">
<wadl:doc title="Not Found" />
</wadl:response>
</wadl:method>
</wadl:resource>
</wadl:resource>
<wadl:resource path="diag/{name}">
<wadl:param type="xsi:string" style="template" name="name">
<wadl:doc>Name of target</wadl:doc>
</wadl:param>
<wadl:param type="xsi:string" style="matrix" name="long">
<wadl:doc>Long style</wadl:doc>
</wadl:param>
<wadl:param style="query" name="length">
<wadl:doc>Length</wadl:doc>
</wadl:param>
<wadl:method name="GET" id="getDiagResults">
<wadl:doc>Returns most recent diagnostic execution results</wadl:doc>
<wadl:doc title="Example">/diag/selftest</wadl:doc>
<wadl:request>
<wadl:param style="query" name="format">
<wadl:doc>Format of response, use flat or hierarchical</wadl:doc>
</wadl:param>
<wadl:param style="header" name="verbosity" default="brief" type="xsi:string">
<wadl:doc>Detail level of response</wadl:doc>
</wadl:param>
</wadl:request>
<wadl:response>
<wadl:doc>Returns the state of the component</wadl:doc>
<wadl:representation mediaType="application/xml">
<wadl:doc title="Example">selftest_example.xml</wadl:doc>
</wadl:representation>
</wadl:response>
<wadl:response status="404">
<wadl:doc title="Not Found">If target doesn't exist</wadl:doc>
</wadl:response>
</wadl:method>
<wadl:method name="POST" id="executeDiag">
<wadl:doc>Executes diagnostic</wadl:doc>
<wadl:doc title="Example">diag/selftest</wadl:doc>
<wadl:request>
<wadl:param name="Authorization" style="header" type="xsi:string" required="true">
<wadl:doc>HTTP Basic Authentication</wadl:doc>
</wadl:param>
</wadl:request>
<wadl:response status="200">
<wadl:doc title="OK">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</wadl:doc>
<wadl:param type="xsi:string" style="header" name="date">
<wadl:doc>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</wadl:doc>
</wadl:param>
</wadl:response>
</wadl:method>
</wadl:resource>
<wadl:resource path="diag">
<wadl:method name="GET">
<wadl:doc>Get all diagnostic results</wadl:doc>
</wadl:method>
</wadl:resource>
</wadl:resources>
</wadl:application>