users@jersey.java.net

Re: [Jersey] noob questions

From: Martin Grotzke <martin.grotzke_at_freiheit.com>
Date: Fri, 20 Feb 2009 10:36:29 +0100

Hi Greg,

On Thu, 2009-02-19 at 16:03 -0800, Meredith Gregory wrote:
> Jerseyans,
>
> i'm still wading through code and documentation for the Jersey
> offering. In particular, i'm looking at the generate-wadl sample and i
> would like to know what is the input to the generation process.
I asume you are referring to the generation of wadl (not generation of
jaxb-beans which are generated from xsd via xjc).

The generation process basically works like this:
1) the maven-javadoc-plugin is used to generate a resourcedoc.xml via a
   custom doclet (ResourceDoclet), the resourcedoc.xml contains the
   javadoc of resourceclasses in some xml-format
2) the maven-wadl-plugin is used to generate the application.wadl from
   the resource classes (by interpreting JAX-RS annotations). The
   resourcedoc.xml is used to extend the generated wadl with
   documentation from javadoc (this is done by the
   WadlGeneratorResourceDocSupport).

In step 2) you can also supply additional WadlGenerator implementations
like the WadlGeneratorApplicationDoc or WadlGeneratorGrammarsSupport
that allow you to extend the generated wadl by an additional <doc/> for
the application.wadl or a <grammars/> element.

You should have a look at the pom.xml, and at the wiki [1].

> Is it the schema, the java source, something else? What i would like
> to do is generate WADL from (unannotated java source that was
> generated by a reverse engineering process).
The wadl generated by jersey requires JAX-RS resource classes, which
uses annotations to specify paths, methods, params etc.

> Failing that, i would like to generate WADL from an xsd. Any help
> would be greatly appreciated.
Hmm, I'd say that this requires a custom implementation. Do you have an
example?

Cheers,
Martin


[1] http://wikis.sun.com/display/Jersey/WADL


>
> Best wishes,
>
> --greg
>
> --
> L.G. Meredith
> Managing Partner
> Biosimilarity LLC
> 806 55th St NE
> Seattle, WA 98105
>
> +1 206.650.3740
>
> http://biosimilarity.blogspot.com
-- 
Martin Grotzke
Dipl.-Inf.
freiheit.com technologies gmbh
Straßenbahnring 22 / 20251 Hamburg, Germany
fon       +49 (0)40 / 890584-0
fax       +49 (0)40 / 890584-20
HRB Hamburg 70814
eb0e 645c 9730 c8a3 ee2f  1b9a 5de5 21cb c259 fe34
Geschäftsführer: Claudia Dietze, Stefan Richter, Jörg Kirchhof