RE: Trouble Setting Jetty Parameters with Restlet 1.0

2009-10-02 Thread Jerome Louvel
Hi Avi, This looks like a bug to me. It was actually fixed in Restlet 2.0 trunk, so I have just ported it back to Restlet 1.1. Thanks for the report! Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologie

RE: PROBLEM WITH org.restlet.representation.InputRepresentation IN 1.2-M2

2009-10-02 Thread Jerome Louvel
Hi Rickard, Sorry about that, the metadata file hasn't been updated as it should... I have updated the related issue with details: "Fix Maven POM issues" http://restlet.tigris.org/issues/show_bug.cgi?id=884 Thierry will only be able to work on this next week, so as a workaround, please hardcore

RE: Restlet 2 Snapshot for POST with JSON

2009-10-02 Thread Jerome Louvel
Hi Rahul, I would need a complete application to test and explain why it isn't working. However, I suggest that you simplify your resource this way: @Post("json") public JSONObject post(JSONObject jsonobject) throws ResourceException { JSONObject json = jsonobject

RE: automated conversion from java object to json

2009-10-02 Thread Jerome Louvel
Hi Laurent, In order to have this automatic conversion to XML or JSON happen, you need to add the "org.restlet.ext.xstream.jar" and *all* its dependencies in your classpath, including Jettison. The Restlet engine should detect it and leverage it to convert your Profile objects in both directions,

RE: Re: Comprehensive Instructions for all things WADL

2009-10-02 Thread Jerome Louvel
Hi Alex, It is probably a Servlet configuration issue. Do you still have it? If so, could you send us a complete project source reproducing it? Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com

RE: Is Protocol.ALL being used?

2009-10-02 Thread Jerome Louvel
Hi Dustin, The Client wasn't intended to be used this way. You should instead leverage the Component class which has a way (via Context#clientDispatcher) to work with all protocols uniformly and to register several connectors via the Component#clients property. When you pass a list of protocols t

RE: spring context - webapplication context in restlet 2

2009-10-02 Thread Jerome Louvel
Hi Rahul, In Restlet 2.0, the ServletContext is copied into an "org.restlet.ext.servlet.ServletContext" attribute of the Restlet application attached to the ServerServlet. You should be able to retrieve it this way: ServletContext sc = (ServletContext) getContext().getAttributes().get(“org.

RE: Restlet 2, milestone 4. Handling variants.

2009-10-02 Thread Jerome Louvel
Hi Rodion, Assuming that you have now migrated to Restlet 2.0 M5 (it should work in 2.0 M4 though), I would write my resource this way: @Get("xml") public Representation representAsXml(){ ... } @Get("json") public JSONObject representAsJson(){ return XML.toJSONObject("…"); } Best regard

RE: Restlet 1.1 and Restlet 2.0 coexistence

2009-10-02 Thread Jerome Louvel
Hi Sanjay, The Restlet API has changed between 1.1 and 2.0 in way that make the manual upgrade relatively easy (except for class movings) but they are not binary compatible. In your case, I suggest that you isolate your 1.1 and 2.0 applications. To do this, it depends on the way you deploy

RE: Extracting XML from Representation from POST

2009-10-02 Thread Jerome Louvel
Hi Matt, I suggest that you have a look at this RFE: "Add JDOM representation" http://restlet.tigris.org/issues/show_bug.cgi?id=332 There is a code sample attached that might help. Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies

RE: Base 64 encoding

2009-10-02 Thread Jerome Louvel
Hi anonymous poster :) Have a look at the Base64 class in the Restlet engine packages: http://www.restlet.org/documentation/snapshot/jse/engine/org/restlet/engine/ util/Base64.html Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~

RE: SpringBeanFinder: No target class was defined for this finder

2009-10-02 Thread Jerome Louvel
Hi Norton, Looking at your next message in the list, you still have an issue? http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=24012 47 Can you send us some simple code reproducing your problem? It would help us fix any remaining issue *quickly*. Best regards, Jerome Louve

RE: Questions about Security Model

2009-10-02 Thread Jerome Louvel
Hi Schley, The tutorial you mentionned hasn't been updated yet to take into account the new security API introduced in Restlet 2.0. Instead of using a Guard, in most case you will use an Authenticator. Verifier and Enroler has used by ChallengeAuthenticator to check the credentials and assign rol

RE: REST and Authentication

2009-10-02 Thread Jerome Louvel
Schley, No risk of fire here, this is a common workaround for authentication to use cookie. We are even planning a direct support for this in the Restlet Framework, see this RFE: "Support cookie based authentication" http://restlet.tigris.org/issues/show_bug.cgi?id=605 Best regards, Jerome Louve

RE: Client Timeout on ClientResource post method

2009-10-02 Thread Jerome Louvel
Hi Rahul, If your client resources are contained in a Restlet component, you could just configure the HTTP client connector as you were doing in 1.1. Otherwise, you need to provide the configured Client to your resource: Client client = new Client(Protocol.HTTP); client.setConnectTimeout(x

RE: trouble with client-side of Restlet Connector PUT'ing files in versions later than 1.1-M4

2009-10-02 Thread Jerome Louvel
Hi Eben, It looks that you could simplify your code significantly. Representation has "downloadName" and "mediaType" properties that you could use instead of manually playing with HTTP headers. See: "Mapping HTTP semantics" http://wiki.restlet.org/docs_2.0/13-restlet/27-restlet/130-restlet.html

Re: Trouble Setting Jetty Parameters with Restlet 1.0

2009-10-02 Thread Avi Flax
On Fri, Oct 2, 2009 at 04:22, Jerome Louvel wrote: > This looks like a bug to me. It was actually fixed in Restlet 2.0 trunk, so I > have just ported it back to Restlet 1.1. Ahh, that makes sense. Good news, thanks! > Thanks for the report! My pleasure! --

Re: Trouble Setting Jetty Parameters with Restlet 1.0

2009-10-02 Thread Avi Flax
On Fri, Oct 2, 2009 at 04:22, Jerome Louvel wrote: > This looks like a bug to me. It was actually fixed in Restlet 2.0 trunk, so > I have just ported it back to Restlet 1.1. Thanks for the report! One last thought… I don't know if I'm unique in this or not, but this seems to me like a fairly maj

Re: Restlet 1.1.6 released

2009-10-02 Thread Avi Flax
On Mon, Sep 28, 2009 at 11:42, Thierry Boileau wrote: > Restlet 1.1.6 has just been released. > 12 bugs have been fixed and some libraries have been upgraded. Thanks Thierry, it's good to see 1.1 get better and better. One thought: it would be helpful if these updates were announced on the blog

RE: Trouble Setting Jetty Parameters with Restlet 1.0

2009-10-02 Thread Jerome Louvel
Hi Avi, This only affect the Jetty connector, but this is annoying indeed. Note that we do fallback on the default (255) value in this case. I'm currently planning on releasing 1.1.7 in sync with Restlet 2.0 M6, in about one month. I'd like to fix a couple more bugs pending on 1.1 branch: http:

RE: Restlet 1.1.6 released

2009-10-02 Thread Jerome Louvel
Avi, Good idea. At least we'll try to give notice of 1.1 releases in the blog at least when it is released in sync with a 2.0 version (which is mostly always the case). Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~

Re: Restlet 1.1.6 released

2009-10-02 Thread Avi Flax
On Fri, Oct 2, 2009 at 09:54, Jerome Louvel wrote: > Good idea. At least we'll try to give notice of 1.1 releases in the blog at > least when it is released in sync with a 2.0 version (which is mostly always > the case). Great, thanks! A thought: I know the focus is 2.0 these days, but as I see

Re: Trouble Setting Jetty Parameters with Restlet 1.0

2009-10-02 Thread Avi Flax
On Fri, Oct 2, 2009 at 09:50, Jerome Louvel wrote: > This only affect the Jetty connector, but this is annoying indeed. Note that > we do fallback on the default (255) value in this case. Thanks for taking this seriously. I actually think it's more than annoying — 255 threads might be OK for an

Re: PROBLEM WITH org.restlet.representation.InputRepresentation IN 1.2-M2

2009-10-02 Thread Rickard Öberg
On 2009-10-02 16.49, Jerome Louvel wrote: > Hi Rickard, > > Sorry about that, the metadata file hasn't been updated as it should... I > have updated the related issue with details: > > "Fix Maven POM issues" > http://restlet.tigris.org/issues/show_bug.cgi?id=884 > > Thierry will only be able to wor