users@jersey.java.net

Re: [Jersey] Re: Generated WADL response elements missing "element" attribute

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Fri, 22 Aug 2008 09:48:14 +0200

Hi Tim,

Yes, you are correct in some cases information can be inferred for a
200 status code from the method signature. However, not in call
cases, for example if a Response instance was returned, or more than
one representation is possible to be returned.

Paul.

On Aug 21, 2008, at 11:05 PM, Tim McCune wrote:

> 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?