Re: WADL howto?

2008-09-11 Thread Thierry Boileau

Mail sent on the 08/22 and apparently lost.
---

Hello John,

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?


oops, you're right, the javadocs reflected a former state of the
implemented behaviour. I've updated it.
Thanks for your report.


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]

  


Best regards,
Thierry Boileau
--
Restlet ~ Core developer ~ http://www.restlet.org http://www.restlet.org/
Noelios Technologies ~ Co-founder ~ http://www.noelios.com
http://www.noelios.com/



Re: WADL howto?

2008-08-22 Thread Ralf Bommersbach
Thanks alot. I'm able to retrieve descriptions of individual resources 
now, when I do a OPTIONS request on the resources URI. The *-targetUri 
however doesn't work. I get an empty response. But its okay for me now.



Greetings Ralf

Vincent Ricard schrieb:

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.

Regards,


Re: WADL howto?

2008-08-21 Thread Vincent Ricard
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.

Regards,
-- 
Vincent Ricard



Re: WADL howto?

2008-08-21 Thread john . wismar
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]