users@jersey.java.net

RE: [Jersey] Extending WADL Questions

From: Martin Grotzke <martin.grotzke_at_freiheit.com>
Date: Tue, 18 Aug 2009 22:09:17 +0200

Hi Tim,

sorry for coming back to you so late. I'll see if I can implement this
the next days.

Cheers,
Martin


On Wed, 2009-08-12 at 07:52 -0600, Wright, Timothy M CTR USAF AFMC
AFRL/RDS wrote:
> Hi Martin,
>
> I expected the input parameter documentation to show up in the <doc/> tag in the request element. The comment "The input data" is in the extended resourcedoc.xml. I tried using the @request.representation.* tags with no luck. I set the request type to "text/plain" but is stays as */*. I thought there might be a @request.representation.doc or @request.representation.example, but no luck there either.
>
> I am using Jersey 1.0.3.
>
> I have used the @response.* tags, and they work fine. Part of the problem is that I am not using JAXB objects. I have requirements that I need to return more than just XML.
>
>
> Thanks for your time,
>
> Tim
>
>
> -----Original Message-----
> From: Martin Grotzke [mailto:martin.grotzke_at_freiheit.com]
> Sent: Tuesday, August 11, 2009 2:35 PM
> To: users_at_jersey.dev.java.net
> Subject: Re: [Jersey] Extending WADL Questions
>
> Hi Tim,
>
> I can reproduce this with the generate-wadl sample of jersey: the ItemsResource contains a createItem method with a parameter item of type Item and a corresponding @param javadoc comment. The javadoc stuff shows up in the resourcedoc.xml but not in the wadl file. This sample instead shows how to use @request.representation.qname tag (and friends), as they are described in [1]. These tags are used for the request representation in the wadl.
>
> What's the wadl that you'd expect for your input parameter?
>
> Cheers,
> Martin
>
> [1] http://wikis.sun.com/display/Jersey/SupportedJavadocTagsForExtendedWADL
>
>
> On Tue, 2009-08-11 at 10:50 -0600, Wright, Timothy M CTR USAF AFMC AFRL/RDS wrote:
> > I have followed the example online to extend the WADL with comments
> > from my source code. I can not get any comments for the POST Input.
> >
> >
> >
> > Here is my example code:
> >
> >
> >
> > /**
> >
> > @param in The input data
> >
> > */
> >
> > @POST
> >
> > Public void uploadData( InputStream in ) { … }
> >
> >
> >
> > The comment, “The input data”, ends up in the resourcedoc.xml file I
> > generate with ANT. However, it is missing in the WADL file. All the
> > other comments I am adding, such as query parameters, class comments,
> > and method comments, are included in the WADL. Is there something
> > special I need to do to get this so show up?
> >
> >
> >
> > Thanks for your time,
> >
> >
> >
> > Tim Wright
> >
> >
> >