RE: How to configure HttpClientHelper global parameters?

2010-09-01 Thread Richard Brewster
I figured out one thing that wasn't obvious to me. I needed to use the extension org.restlet.ext.httpclient. Now I have the httpclient working, but I still need to understand how to globally configure it. Richard -- View this message in context: http://restlet-discuss.1400322.n2.nabble.com/How

RE: How to configure HttpClientHelper global parameters?

2010-09-01 Thread Richard Brewster
To add more information, here is a stack trace from an exception when a client connector tries to write. I would expect to see an apache HttpClient class here, if indeed httpClient were being used. [INFO] [talledLocalContainer] Sep 1, 2010 1:39:39 PM org.restlet.engine.http.connector.Connection w

RE: How to configure HttpClientHelper global parameters?

2010-09-01 Thread Richard Brewster
I have read through the connectors page. But it shows no example of a global configuration. The example shows a per-client configuration. Client client = new Client(new Context(), Protocol.HTTP); client.getContext().getParameters().add("useForwardedForHeader", "false"); I

RE: GWT XMLHttpRequest How to set 'withCredentials'

2010-09-01 Thread Jerome Louvel
Hi all, I've entered a RFE to keep track of this need: http://restlet.tigris.org/issues/show_bug.cgi?id=1174 Best regards, Jerome -- Restlet ~ Founder and Technical Lead ~ http://www.restlet.o​rg Noelios Technologies ~ http://www.noelios.com -Message d'origine- De : Thierry Boileau [m

Re: Re: Re: PROPFIND doesn't work anymore after the switch from 2.0RC4 to 2.0.0

2010-09-01 Thread Fabian Mandelbaum
Bonsoir Thierry, no problem for answering late, I know it's holidays time over there (hope you enjoyed yours, if any). I tried with the proposed change and PROPFIND is properly handled now, it works. I've also added a debug log output like this (I had to use reqRep instead of rep as the param na

RE: AJAX Architecture

2010-09-01 Thread Thierry Boileau
Hello Martin, that looks fine for me. Instead of a pure filter, you can inherit from ChallengeAuthenticator or Authenticator and use the Verifier and Enroler. You can have a look here => http://wiki.restlet.org/docs_2.0/13-restlet/27-restlet/46-restlet.html (there is a sample code). Best rega

RE: Re: Restlet vs. Resource

2010-09-01 Thread Thierry Boileau
Hello Cameron, >Is the collection also best represented as a resource? Well, I think you should use in most cases a resource, because you are designing Rest resources which handle GET, PUT, DELETE, etc requests. Restlet sub-classes should be used for a few cases, mainly in transversal or technic

RE: GWT XMLHttpRequest How to set 'withCredentials'

2010-09-01 Thread Thierry Boileau
Hello, as far as I know, this is not supported by the restlet gwt client which relies on the requestBuilder. You can access other sites by using proxy technic. Best regards, Thierry Boileau -- http://restlet.tigris.org/ds/viewMessage.do?dsForu

RE: Simple GAE Hello World Problem

2010-09-01 Thread Thierry Boileau
Hello Gary, I'm so sorry for answering so late. Yes, you need to use Restlet 2.0. Regarding this issue, the last snaphot contains a fix this bug. It should work properly now. Best gregards, Thierry Boileau -- http://restlet.tigris.org/ds/viewM

Re: Custom Outbound Filter

2010-09-01 Thread Thierry Boileau
Hello, I forgot to say, that you will need to override the afterHandle method. Best regards, Thierry Boileau Hello Joey, > > you can add a filter in front of your application. That is to say, instead > of directly attaching your application, you can attach the filter, which > sets the applicat

Re: Custom Outbound Filter

2010-09-01 Thread Thierry Boileau
Hello Joey, you can add a filter in front of your application. That is to say, instead of directly attaching your application, you can attach the filter, which sets the application as its "next" attribute. Best regards, Thierry Boileau Hello community, > > I quite like the Restlet framework and

RE: Re: Re: PROPFIND doesn't work anymore after the switch from 2.0RC4 to 2.0.0

2010-09-01 Thread Thierry Boileau
Hello Fabian, I feel very sorry for answering so late... Can you try with this signature? public Representation propfind(Representation rep) throws ResourceException { [...] final DomRepresentation reqXML = new DomRepresentation(rep); [...] } Best regards, Thierry Boileau -

RE: Stream closed Exception

2010-09-01 Thread Thierry Boileau
Hello Sanjay, are you still having this issue with the last snapshot of the Restlet framework? Best regards, Thierry Boileau -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2654134

RE: How to configure HttpClientHelper global parameters?

2010-09-01 Thread Thierry Boileau
Hello Richard, the answer is located in the user guide, in the chapter called "connectors": http://wiki.restlet.org/docs_2.0/13-restlet/37-restlet.html. Regarding the configuration of the logging, you can have a look here: http://wiki.restlet.org/docs_2.0/13-restlet/101-restlet.html Best regar

How to configure HttpClientHelper global parameters?

2010-09-01 Thread Richard Brewster
I have read this: http://www.restlet.org/documentation/2.0/jse/ext/org/restlet/ext/httpclient/HttpClientHelper.html But, after a lot of searching, I have found no examples how this is actually configured. Secondly, I want to use the org.apache.httpcomponents httpclient for ClientResouce connecto

RE: Android client : how to add cookies ?

2010-09-01 Thread Thierry Boileau
Hello Pierre-Yves, >The JacksonRepresentation should not return null when not being able to parse >a JSON stream, it should throw an exception. Otherwise, how can we handle >errors ? I've entered an issue for that topic. http://restlet.tigris.org/issues/show_bug.cgi?id=1173 >I'll post a bug re

RE: Ideal restlet_GWT configuration ? how to retrieve json with the GWT edition of restlet ?

2010-09-01 Thread Thierry Boileau
Hello Ben, from the client side, you can specify the accepted media types, by setting the HTTP "accept" header. A Restlet client resource can do this as follow (explained in the wiki [1]) : cr.get(MediaType.APPLICATION_JSON).write(System.out); or by updating its client data: cr.getClientInfo().

RE: 405 on unsupported media type

2010-09-01 Thread Thierry Boileau
Hello, thansk Avi, I've completed the issue 1172 (http://restlet.tigris.org/issues/show_bug.cgi?id=1172). Best regards, Thierry Boileau -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2654055

RE: Hang when calling setStatus with CLIENT_ERROR_BAD_REQUEST

2010-09-01 Thread Thierry Boileau
Hello, Nothing special should happen, at first look. Could you provide a sample test case? Best regards, Thierry Boileau -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2654045

RE: Jackson Dependencies

2010-09-01 Thread Thierry Boileau
Hello Doug, >Why return 405 instead of 500 in a case like this, though? Well, this is a good question. 405 status may sound a little bit unappropriate because the resource is described as able to handle POST requests, but the lack of json converter make it unavailable to do so. I've entered an R

RE: Intermittent Errors

2010-09-01 Thread Olivier Monaco
Hi, You didn't use a Component. Maybe this can cause your problem. Can you post some stack trace of your NPEs? Olivier -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2653544

Detecting non-existant file/directory with Directory

2010-09-01 Thread Brian Anderson
I have a specialized Redirector that redirects to a URI based upon the language of the request. I have a URI template that I use to insert a language qualifier into a resource path (e.g. portal/content/foo -> portal/d/en/foo). This resource is attached to the "content" path using MODE_STARTS_W

Re: Bad handling of InputStream inside servlet container (ie: Tomcat)

2010-09-01 Thread Alois Cochard
Hello Jerome, Thanks a lot for the fast fixing ! You guys rocks, really :) Bonne continuation, Alois Cochard http://aloiscochard.blogspot.com http://www.twitter.com/aloiscochard On 28 August 2010 18:24, Jerome Louvel wrote: > Hi Alois, > > FYI, I've just fixed this in SVN trunk by wrapping b

Re: Re: Optional authentication and ClientInfo.getAuthenticated()

2010-09-01 Thread Thierry Boileau
Hello Esteban, you can check request.getClientInfo().isAuthenticated Best regards, Thierry Boileau > For now, I am checking if it is authenticated or not to my application with > this line of code. > >if (request.getClientInfo().getUser() == null) { > // Not authentica