users@jersey.java.net

Re: [Jersey] Generating WADL's with references to XSD of JAXB schema

From: Arul Dhesiaseelan <arul_at_fluxcorp.com>
Date: Wed, 22 Apr 2009 17:32:22 -0600

Hi Mark,

I would suggest you to statically create your XSD from your JAXB beans.
You could do this by schemagen utility bundled with JAXB RI. I think it
is not a good idea to generate your schema at runtime just for the
purposes of documentation.

You could use the WadlGenerator: WadlGeneratorGrammarsSupport to use the
generated schema referenced from your WADL using
application-grammars.xml. You can look at the generate-wadl [1] example
in Jersey for more details.

Hope this helps.

-Arul

[1]
https://jersey.dev.java.net/source/browse/jersey/trunk/jersey/samples/generate-wadl/

Rabick, Mark A (IS) wrote:
>
> I posted this as a question on Paul's blog post:
> _http://blogs.sun.com/sandoz/entry/jersey_1_0_3_is_
>
> I asked:
>
> Regarding:
>
> >Developer defined WADL-based resource classes, inspired by
> James Strachan's use of WADL and Jersey MVC.
> Injecting WadlApplicationContext enables access to the WADL JAXB
> representation for the application.
>
> Is there a sample that demonstrates the generation of a WADL
> that includes the XSD of JAX-B annotated entities? Is it
> possible to generate a WADL outside of having to deploy the
> web-app and visit URI:
> _http://host:port/<resource-base>/application.wadl_
> <http://host:port/%3Cresource-base%3E/application.wadl> ??
>
> Arul responded with a blog post illustrating how to render the xml
> wadl formatted using XSLT. I would like to have included in the wadl
> in whatever format it is in to link to a generated XSD based on a set
> of JAXB annotated entities.
>
> Any ideaa?
>
> -mark
>
> *_______________________________________________*
> *Mark A. Rabick*
> *Em: mark.rabick_at_ngc.com*
>