Issue with custom statusservice or status service in general

2012-05-15 Thread qns.java
Hi

I have an intermittent issue with a restful webservice where  the throwable
object is null on  the status object  albeit the status is 500 , this issue
is quite random and I have not managed to reproduce it , What are the
scenarios where the throwable is null for an internal server exception, any
pointers on how i should proceed with the investigation of this  problem
are appreciated.

Thankyou

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

RE: Is it possible to (easily) have authenticated/non-authenticated versions...

2012-05-15 Thread Ioannis Mavroukakis
I haven't tested this so please accept my apologies if it doesn't work. You 
could use the following form of attach()

public Route attach(String pathTemplate,
Class? targetClass,
int matchingMode)

and attach your guard with a Template.MODE_STARTS_WITH matchingMode.

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


RE: Is it possible to (easily) have authenticated/non-authenticated versions...

2012-05-15 Thread Richard Berger
Thank you for the response...

My simplified test code is now:

public final Restlet createInboundRoot() {
 Router router = new Router(getContext());
 router.attach(/v1/, RootServerResource.class);
 router.attach(/v2/, RootServerResource.class);
 GaeAuthenticator guard = new GaeAuthenticator(getContext()); 
 router.attach(/v1/, guard, Template.MODE_STARTS_WITH);
 guard.setNext(router); 
 return guard;
}

But in the browser, both the paths /v1/ and /v2/ bring up the guard.  I am not 
sure why that happens, but that is what seems to be the result.  

Thanks for the suggestion (it definitely met the easy part of the 
qualification)!

RB

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