users@jersey.java.net

Re: [Jersey] Not valid WADL

From: Martin Grotzke <martin.grotzke_at_freiheit.com>
Date: Fri, 14 Nov 2008 12:55:27 +0100

Hi Paul,

I'm just having a look at this, AFAICS there are two issues:

1) The mapping of the jersey Parameter to the WADL Param (in
WadlGeneratorImpl.createParam).

2) The mapping of the jersey Parameter.Source to param annotations in
ResourceDocAccessor.ParameterAnnotationMapping

Regarding 1) I wonder how to map a param like FormParam or CookieParam
to a WADL param, as WADL defines plain, query, matrix, header and
template ([1]). Do you have a clue regarding this, or should I ask this
on the wadl mailing list?

Regarding 2) I noticed that Parameter.Source does not define FORM.
AFAICS the FormParam is mapped to the UNKNOWN source in this case. Is
this correct and intended? In this case I would also create such a
mapping.

As we have the mapping of Param annotation classes to the
Parameter.Source equivalent both in the IntrospectionModeller and the
ResourceDocAccessor.ParameterAnnotationMapping, I think that it's worth
creating a single mapping enum and use it in both cases. Or just make
the IntrospectionModeller.ANOT_HELPER_MAP public.
The latter sounds like a hack, the former needs some thoughts where to
put this mapping, so I'd go for the former solution.
And perhaps it would be nice to also define the WADL param style in this
mapping...

What do you think?

Cheers,
Martin


[1] https://wadl.dev.java.net/wadl20061109.xsd


On Thu, 2008-11-13 at 17:50 +0100, Paul Sandoz wrote:
> Hi Luigi,
>
> Thanks for reporting this. Could you log an issue?
>
> Paul.
>
> On Nov 13, 2008, at 5:49 PM, Quattrocchi Luigi wrote:
>
> > Hi,
> > I'm using ver. 1.0 of Jersey and I've noticed that in the
> > automatically generated WADL the style attribute is missing for
> > parameters annotated with @FormParam. Actually, according to the
> > WADL schema, such attribute should be present (<xs:attribute
> > name="style" type="tns:ParamStyle" use="required"/>). This can be a
> > problem using some tools (e.g. soapUI ver. 2.5b2) that need to read
> > the WADL.
> > Kind regards,
> >
> > Luigi
> >
> >
> > CONFIDENTIALITY NOTICE
> >
> > This message and its attachments are addressed solely to the persons
> > above and may contain confidential information. If you have received
> > the message in error, be informed that any use of the content hereof
> > is prohibited. Please return it immediately to the sender and delete
> > the message. Should you have any questions, please contact us by
> > replying to webmaster_at_telecomitalia.it.
> >
> > Thank you
> >
> > www.telecomitalia.it
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> > For additional commands, e-mail: users-help_at_jersey.dev.java.net
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net

-- 
Martin Grotzke
http://www.javakaffee.de/blog/