users@jersey.java.net

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

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Thu, 21 Aug 2008 09:49:07 +0200

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.

On Aug 21, 2008, at 12:11 AM, Tim McCune wrote:

> In the WADL that Jersey is generating for my resources, it seems to
> be leaving off the "element" attribute. For example, for the
> resource:
>
> @GET
> public HelloWorld sayHello() {...
>
> where the returned class is annotated as an @XmlRootElement, I
> would expect the WADL to contain
>
> <representation mediaType="application/xml" element="helloWorld"/>
>
> but instead I'm just getting
>
> <representation mediaType="application/xml"/>
>
> Is there any way to get the element to show up in the generated WADL?