Hi,
thanks... Few more questions :
1. How to describe @Form parameters or MultivaluedMap parameters ?
should it be just <representation mediaType="application/x-www-form-urlencoded"/> ?
2. Can arbitrary HTTP methods like PATCH/etc be accepted ?
cheers, Sergey
> On Jun 29, 2009, at 7:33 AM, Sergey Beryozkin wrote:
>>
>> 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 ?
>>
> The idref isn't a WADL attribute. In Jersey we support partial WADLs
> so for subresource locators we just return an empty <resource
> path="..."/> and then the client can GET the partial WADL for the
> subpath later. I covered this in a blog entry:
>
> http://weblogs.java.net/blog/mhadley/archive/2007/12/wadling_in_jers.html
>
>> 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 ?
>>
>
> Either is valid but the canonical way is one get method with two
> sibling representations.
>
> Marc.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_wadl.dev.java.net
> For additional commands, e-mail: users-help_at_wadl.dev.java.net
>