"Vincent Ricard" <[EMAIL PROTECTED]> wrote on 08/21/2008 09:12:09 AM:

> Hi Ralf,
> 
> > Does the WADL extension support this (from my understanding it does) 
and
> > are there any tutorials for it? It haven't found anything yet, besides
> > the API, and to figure it out with from API alone is a litte tiresome 
;)
> 
> I used the wadl component in the other way (specify the wadl file, and 
let
> WadlComponent load my Resource subclasses); but in your case, i think 
you
> "just" have to inherit WadlApplication to register your WadlResource
> subclasses (with createRoot), and for each resource override the
> 'describe' method.
> Excerpt from the javadoc:
> This description can be customized by overriding the #describe() and
> #describeMethod(Method, MethodInfo) methods.
> 
> Hope this help.

I can't speak for Ralf, but I found that it does help, a lot.  I thought 
I'd try this, too, but I'm still getting some odd results.  Here are some 
of my observations, so far.

1) I tried deriving my Application from WadlApplication, called 
setAutoDescribed(true), and tested.  I can get the WADL, but not using my 
"/v1/*" URI.  If I use the "/v1/*" URI, I get a 404; I have to use just 
the "/v1/" URI, I get a version of a WADL response, which includes all of 
my various Resources.  This seems to contradict the documentation?

2) Next, I think there may be an interaction between WADL auto-generation 
and having a resource available at the root URI.  I tried changing my 
"root" resource to derive from WadlResource, and my generated WADL became 
ONLY the description of the root resource itself, not the whole resource 
hierarchy as was the case previously.  (This makes a certain amount of 
sense, because with a resource at my URI root, it's using the same URI 
that the WADL request is using.  Probably ought to be document, though.) I 
changed my "root" resource so that it's subordinate, and it seems like 
that works.


--------------------------------
John Wismar
[EMAIL PROTECTED]


Reply via email to