You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wink.apache.org by "Bryant Luk (JIRA)" <ji...@apache.org> on 2010/11/04 21:33:04 UTC

[jira] Resolved: (WINK-313) WADL support

     [ https://issues.apache.org/jira/browse/WINK-313?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryant Luk resolved WINK-313.
-----------------------------

       Resolution: Fixed
    Fix Version/s: 1.1.2

I think the basic requirements have been met here (some already discussed on the mailing list).  If anyone has any feedback, it would be appreciated.

If you want to return a basic WADL document, you can use the WADLGenerator in the org.apache.wink.common.model.wadl package and have a custom resource:

{code}
@Path("/service")
public ServiceResource {

    @Context
    javax.ws.rs.core.Application app;

   @GET
   @Produces("application/xml")
    public org.apache.wink.common.model.wadl.Application getServiceDoc() {
        String baseURI = // you can get it from @Context UriInfo;
        return new WADLGenerator().generate(baseURI, app.getClasses());
   }
}
{code}

You can document your resources, params, and request entities with @WADLDoc to add some description.

Also finished out the handler so you just need to set the wink(-default).properties file in wink-server to point to the org.apache.wink.server.internal.handlers.OptionsMethodWADLHandler and for any OPTIONS request, you'll get the resource class's WADL representation based on the JAX-RS metadata.

> WADL support
> ------------
>
>                 Key: WINK-313
>                 URL: https://issues.apache.org/jira/browse/WINK-313
>             Project: Wink
>          Issue Type: New Feature
>          Components: Server
>            Reporter: Nick Gallardo
>            Assignee: Bryant Luk
>             Fix For: 1.1.2
>
>
> This feature is for adding basic WADL support to the Wink runtime.
> Here's a stab at some initial requirements:
> - Serialization of the existing resource configuration 
> - Addition of a "description" field to the resource description where developers can include text about the resource
> - Access to the WADL via OPTIONS request
> - Access to the WADL via the AdminServlet (or some other way to get to it with a GET from a browser)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.