Hi David,

On Mar 6, 2009, at 4:10 PM, David Bordoley wrote:

> On Fri, Mar 6, 2009 at 11:32 AM, Rhett Sutphin
> <rh...@detailedbalance.net> wrote:
>
>> This would be an RFE (at least, I'm not aware of any way to get it to
>> work currently).  I'm curious about how you would tie the resources  
>> in
>> your application context to the WADL.  Would you add a custom
>> attribute for the spring bean id?  Is there a WADL feature which  
>> would
>> help with this?  I'm not that familiar with it.
>>
>> Rhett
>
> Hi,
>
> The current way WADL works in Restlet is to require implementors to
> specify the class of the resource you want to map a WADL resource to
> using the resource's id attribute. You then pass the the WADL xml as a
> constructor argument to a WadlComponent or WadlApplication. You can
> see an example of this in org.restlet.test.YahooSearch.wadl (omitting
> the details in the example below):
>
> <application>
>  <resources base="http://api.search.yahoo.com/NewsSearchService/V1/";>
>    <resource id="org.restlet.test.NewsSearchResource"  
> path="newsSearch">
>    </resource>
>  </resources>
> </application>
>
> It would be cool if you could do something similar but instead of
> passing a Resource class (and be stuck using the default constructor
> etc.), instead use a Spring Bean id as the resource id in WADL, and
> have restlet use spring to wire all the resources together, thus
> getting all the benefits of IOC, while also being able to more
> explicitly state your resource interface in a standard method.
>
> Anyway i can open an RFE if necessary, but I wanted to ask on the  
> list first.

This is a good idea.  I think the implementation might be more generic  
than just spring support, so I went ahead and entered the RFE against  
the WADL component:  http://restlet.tigris.org/issues/show_bug.cgi?id=756

Thanks,
Rhett

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1286420

Reply via email to