users@wadl.java.net

Converting JAX-RS resources to WADL

From: Sergey Beryozkin <sberyozk_at_progress.com>
Date: Mon, 29 Jun 2009 12:33:06 +0100

Hi,

I have few questions about converting JAX-RS resources to WADL.

1. How to represent recursive relationships ?
For ex :

@Path("/bar")
public RootResource() {

    @GET
    public State get() {}


   @Path("/sub")
   public RootResource asSubresource() {
       return this;
   }
}

I was rthinking about something like :
<application><resources>
<resource id="root">
   <resource path="/bar">
    <method name="GET">...</method>
   </resource>
   <resource path="/bar/sub" idref="root"/>
</resources></application>

what is the right way to do it ?

2. Multiple consumes/produces types on a given method :

@GET Produces("application/xml, application/json") public State get() {}

does it translate to two GET methods with the one representation element in each one or a single GET element with 2 representations elements ?

that's it so far
thanks, Sergey