Hi,

I have a problem concerning wrong resource paths in the WADL output of a 
WadlApplication.

I have a WADL application to which I attach several restlets.

When an OPTIONS request is received, it reaches the router of the WADL 
application. If there is a matching route to a restlet, the request resource 
baseRef gets adapted to the URI of the resource itself (in 
Route.beforeHandle()).
Then in the target restlet "handle()" method I set the allowed methods and do a 
"return".

The further processing is done in WadlApplication.handle(). There, the request 
resource baseRef is still the restlet ressource URI and *not* the base URI of 
the WadlApplication.

This results in wrong ressource URIs in the generated WADL.


When I submit an OPTIONS request that reaches the WadlApplication, but which is 
not routed to any restlet after that (like 
"http:[applicationBasePath]/nonExistingPath?method=OPTIONS"), the generated 
WADL has the correct URIs.

Any ideas how to fix this?

I thought about adapting the request resource baseRef in the restlet handle() 
method (setting it back to the application baseRef), but that does not seem to 
be a clean solution.

TIA,
Carsten

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

Reply via email to