users@jersey.java.net

Re: Generated WADL response elements missing "element" attribute

From: Tim McCune <tim_at_mccune.name>
Date: Thu, 21 Aug 2008 14:05:57 -0700

On 21 Aug 2008 20:51:17 -0000, users-digest-help_at_jersey.dev.java.net <
users-digest-help_at_jersey.dev.java.net> wrote:
>
> From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
> To: users_at_jersey.dev.java.net
> Date: Thu, 21 Aug 2008 09:49:07 +0200
> Subject: Re: [Jersey] Generated WADL response elements missing "element"
> attribute
> Hi Tim,
>
> Martin has recently done some work on improving WADL integration with JAXB.
> I am sure he would know, but he is away on holiday at the moment. I need to
> familiarize myself with the exact details to understand if this is possible,
> and if so, how it is enabled.
>
> There is an sample in the source code (see samples/generate-wadl) that
> presents what can be done. If you look at the source code for the resource
> classes you will notice additional java doc elements.
>
> Paul.


Thanks Paul. I took a look at the sample code, but I'm a bit confused. For
instance, I see this:
@response.representation.200.qname {http://www.example.com}item
@response.representation.200.mediaType application/xml

The 2nd one seems like it duplicates the
@Produces({ "application/xml" })
annotation just below it, and the 1st one should be able to be inferred from
the JAXB bindings on the return type, right?