On Nov 9, 2006, at 2:34 PM, Wilfred Springer wrote:
>
> One of the things that would be required to use WADL to describe
> WMS (Web Mapping Service) defined by the OGC (Open Geospatial
> Consortium) is having the oppurtunity to relate an input parameter
> refering to a mimetype to the mimetype of the response. Would this
> be something you would consider to include?
>
You can do something like that already if there is a fixed set of
supported mime types, e.g.:
<resource ...>
<method name="GET">
<request>
<param name="format" style="query" fixed="application/svg+xml"/>
...
</request>
<response>
<representation mediaType="application/svg+xml/>
</response>
</method>
<method name="GET">
<request>
<param name="format" style="query" fixed="image/jpg"/>
...
</request>
<response>
<representation mediaType="image/jpg"/>
</response>
<!-- etc -->
</method>
</resource>
If you run that through the wadl2java tool you'll get a stub class
with methods like:
getAsImage_Jpg()
getAsApplication_svg_xml()
etc.
The other alternative is to use the native HTTP Accept header
mechanism where you'd write your WADL like:
<resource ...>
<method name="GET">
<request>
...
</request>
<response>
<representation mediaType="application/svg+xml/>
<representation mediaType="image/jpg"/>
<!-- etc -->
</response>
</method>
</resource>
The wadl2java tool would generate the same methods as above and would
use the HTTP Accept header to request the right kind of output.
HTH,
Marc.
>
> -----Original Message-----
> From: Marc Hadley [mailto:Marc.Hadley_at_Sun.COM]
> Sent: Thu 11/9/2006 5:36 PM
> To: users_at_wadl.dev.java.net; dev_at_wadl.dev.java.net
> Subject: New version of the WADL specification
>
> I've just checked in a new version of the WADL specification and the
> wadl2java tool. See:
>
> https://wadl.dev.java.net/servlets/NewsItemView?newsItemID=4364
>
> for details on changes from the previous version.
>
> Regards,
> Marc.
>
> ---
> Marc Hadley <marc.hadley at sun.com>
> CTO Office, Sun Microsystems.
>
>
>
> <winmail.dat>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_wadl.dev.java.net
> For additional commands, e-mail: dev-help_at_wadl.dev.java.net
---
Marc Hadley <marc.hadley at sun.com>
CTO Office, Sun Microsystems.
- application/pkcs7-signature attachment: smime.p7s