Re: ClientResource without error? (Restlet 2.0.5)

2011-02-16 Thread Leigh L. Klotz, Jr.
Thank you Thierry. I'm glad to know I'm on the right track and will use a workaround until 2.1. Leigh. On 02/16/2011 06:54 AM, Thierry Boileau wrote: Hello Leigh, you're right, these Java access modifiers moved from private to protected in the current trunk (2.1 release) on the 7th of

Re: ClientResource without error? (Restlet 2.0.5)

2011-02-16 Thread Leigh L. Klotz, Jr.
Thierry, In the 2.1 source link you provided, I see that I can make ClientResource not give an error by overriding doError, but I will not be able to get the response. The use case to get the representation from an error status response is to get additional information about the error. So

Re: Proxying with Redirector

2011-02-15 Thread Leigh L. Klotz, Jr.
, response); Reference resourceRef = request.getResourceRef(); request.setResourceRef(targetRef); application.handle(request, response); response.setEntity(response.getEntity()); request.setResourceRef(resourceRef); } } Leigh. On 02/11/2011 11:36 AM, Leigh L. Klotz, Jr. wrote

ClientResource without error? (Restlet 2.0.5)

2011-02-15 Thread Leigh L. Klotz, Jr.
I'd like to make a ClientResource.get call and get back the status, no matter what it is. The lowest level in ClientResource prohibits this: private Representation handle(Method method, Representation entity, ClientInfo clientInfo) { ... // Actually handle the call

Re: Proxying with Redirector

2011-02-11 Thread Leigh L. Klotz, Jr.
I just was about to send a similar message. I'd like to have a filter which does the following: 1. Versioned resources /path/to/resources/{thing}/a/b/c -- /path/to/resource/a/b/c but with {thing} available in a request attribute. 2. Resource aliases /path/to/resources/foo/{thing}/a/b/c --

Re: WADL and XML Representation namespaces in Restlet 2.0.1

2010-10-26 Thread Leigh L. Klotz, Jr.
On 10/24/2010 11:58 AM, Thierry Boileau wrote: Hello Leigh, I think the namespaces should be propagated from the ApplicationInfo instance. Could you try to call Application#getNamespaces().put(test, http://example.com;); Best regards, Thierry Boileau Thierry, Thank you for the

WADL and XML Representation namespaces in Restlet 2.0.1

2010-10-19 Thread Leigh L Klotz Jr
We're trying to use describeGet in Restlet 2.0.1 to provide WADL for a Resource whose response representation is an XML document starting with an element in a non-empty namespace. It fails because the namespace declaration does not appear in the resulting WADL. response representation

Restlet 2.0 Resolver and relative references: documentation change request

2010-10-04 Thread Leigh L. Klotz, Jr.
It would nice to have the known variables feature of Resolver from the message below mentioned in tutorial section 10. URI rewriting and redirection at http://www.restlet.org/documentation/2.0/tutorial#part10 and again in JavaDoc for org.restlet.routing.Redirector

StringRepresentation.getText throws NPE, claims isTransient()=false

2010-09-23 Thread Leigh L. Klotz, Jr.
Documentation [1] says that StringRepresentation.getStream() returns null if the text is gone, but in fact it throws NullPointerException. getReader properly checks and doesn't throw NPE. Also, StringRepresentation (even when text is null) claims .isTransient() is false. It appears

Reference.getQueryAsForm(char separator)

2010-03-19 Thread Leigh L. Klotz, Jr.
I would like to see a version of Resource.getQueryAsForm which takes the separator argument of the Form constructor. I don't care about character sets other than UTF-8. References: http://www.w3.org/TR/xforms11/#submit-submission-element (see separator) Leigh.

HTTP Expiration header design problem (304 doesn't contain Expires)

2010-03-11 Thread Leigh L. Klotz, Jr.
It appears to me that there's no effective way to communicate the HTTP 1.1 Expires header to the user agent. I don't think this is the same as the cache-API change discussed in http://restlet.tigris.org/issues/show_bug.cgi?id=25 This is purely an HTTP correctness issue. * The Problem If a

RE: Dependency injection in Restlet 2.0 with Guice

2009-11-23 Thread Leigh L. Klotz, Jr.
Sorry for joining in the middle and not paying attention. Do you mean a scope annotation on the Resource class itself? I have so far not seen a need for any scope other than the implicit request scope. We do make use of objects from other scopes from within Resources, but I believe you're not

WadlApplication and Guice in Restlet 1.1.1 problem with Finder.createTarget(Class? extends Handler...)

2009-02-03 Thread Leigh L. Klotz, Jr.
I am using Restlet Resource Dependency Injection in Guice/Restlet as described in http://tembrel.blogspot.com/2008/07/resource-dependency-injection-in.htm l http://tembrel.blogspot.com/2008/07/resource-dependency-injection-in.ht ml Much like the Spring integration

WadlApplication and non-public Resources in Restlet 1.1.1 give IllegalAccessException

2009-02-03 Thread Leigh L. Klotz, Jr.
As reported earlier, I'm using WadlApplication and WadlResource in Restlet 1.1.1 and Sun JDK 1.6. I've found that the non-public classes extending Resource cause WadlApplication to fail in Java reflection attempting to invoke method allowGet(), due to Sun bug