Re: including restlet in a maven project

2010-01-19 Thread Ben R Vesco
Also that referenced page might not reflect the new structure. You won't find anything newer than M5 in the old groupId of org.restlet. Instead, use the group id for the edition you are using such as org.restlet.jse or org.restlet.j2e and so on. Then you can get the M6 and newer releases. On

Re: slf4j extension posted?

2009-12-29 Thread Ben R Vesco
Did you also import one of the slf4j implementations? Try simple just to make sure it is working. On Mon, Dec 28, 2009 at 10:21 AM, Jeff Ramsdale jeff.ramsd...@gmail.com wrote: Hmmm... That's quite confusing since 2.0-SNAPSHOT still exists under the old groupId. Makes it look like both are

Re: Redirection?

2009-12-28 Thread Ben R Vesco
you will be redirected in x seconds type pages are a javascript thing unless you have kept a socket open. On Sun, Dec 27, 2009 at 2:18 AM, Sopasakis Pantelis ch...@mail.ntua.gr wrote: Hi all,  I need to support redirection for a resource but first return the message You will be redirected to

Re: When to use POST??

2009-12-24 Thread Ben R Vesco
The client using a GET request to find an id to use for a PUT would have all the problems of non-atomic operations (since it can't possibly be atomic). What if two clients both call GET at the same time to get the *next* id to insert? What if N clients call GET to get the next id to insert but

Re: Resources cannot be found anymore after upgrading from 2.0M5 to 2.0M6

2009-12-12 Thread Ben R Vesco
Maybe it's the trailing slash? M5 defaulted to allowing the slash, M6 defaults to not allowing the trailing slash. Try removing it and see if that helps. This is in reference to the url requested by the client. On Sat, Dec 12, 2009 at 1:19 PM, Fabian Mandelbaum fmandelb...@gmail.com wrote:

Re: BUG?: JsonRepresentation does not inherit size from wrapped StringRep

2009-12-08 Thread Ben R Vesco
I'm not sure I'm convinced. When using the constructor that takes (String jsonString) the passed arg is put into a StringRepresentation which is then stored in this.jsonRepresentation of the JsonRepresentation object. The private getJsonText method then will not use the first if case (because

Re: BUG?: JsonRepresentation does not inherit size from wrapped StringRep

2009-12-08 Thread Ben R Vesco
In the case of the wrapped jsonRepresentation object it might be sufficient to pass the call to getSize through to jsonRepresentation.getSize without doing the full calculation. In this case you gain the benefit of knowing the size when the wrapped representation knows its own size but don't

Re: Re: Restlet ClientResource Post Chunked Encoding - WCF Unsuported

2009-12-07 Thread Ben R Vesco
In my case my response with JsonRepresentation was being chunked due to what I believe was a bug with JsonRepresentation (reported on this list, but I think it must be stuck in moderation as there has been no response). My approach to find out why I was getting the chunked header was to step

BUG?: JsonRepresentation does not inherit size from wrapped StringRep

2009-12-07 Thread Ben R Vesco
JsonRepresentation has the member variable jsonRepresentation for using a wrapped Representation object in some cases. The bug I'm seeing is that getSize() on the JsonRepresentation object always returns -1 in those cases where it is backed by this other underlying representation. I believe a

Re: Restlet ClientResource Post Chunked Encoding - WCF Unsuported

2009-12-06 Thread Ben R Vesco
Did you try sending a StringRepresentation instead of some other type? On Thu, Dec 3, 2009 at 2:01 PM, Luiz Alberto luiz...@gmail.com wrote: Hello All, I'm developing a product that will use extensively of Restlet for consume WCF Rest Services. I had created a method to post a XML of a class

Re: Obtaining ServletContext in 2.0-M5

2009-12-02 Thread Ben R Vesco
I'm also interested to know if there's a better way, but you can also shorten that a bit to: ServletContext sc = (ServletContext) getContext().getAttributes().get(org.restlet.ext.servlet.ServletContext); On Wed, Dec 2, 2009 at 8:57 AM, BenT ben.tomas...@gmail.com wrote: In restlet 2.0-M5,

BUG?: JsonRepresentation does not inherit size from wrapped StringRep

2009-11-25 Thread Ben R Vesco
JsonRepresentation has the member variable jsonRepresentation for using a wrapped Representation object in some cases. The bug I'm seeing is that getSize() on the JsonRepresentation object always returns -1 in those cases where it is backed by this other underlying representation. I believe a

Re: Restlet 2.0 Best Practices

2009-11-23 Thread Ben R Vesco
1) What connector are you using with Restlet in production? Tomcat due to ops guys' familiarity with it. 2) How are you dealing with Caching on the server side? Hibernate managed cache. 3)  Are you finding that the Services / Data Access Layers in Standard Web Apps don’t apply in the

Examples of org.restlet.routing.Validator?

2009-11-16 Thread Ben R Vesco
Are there any examples or instructions showing use of the new-ish Validator filter? -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2418636

Re: Default routing mode change

2009-11-11 Thread Ben R Vesco
Regarding the enums, we did consider them in several places but they prevent addition of new constants by the framework or by the developer, especially without breaking existing code. They also produce extra artifacts in the Javadocs cluttering them. Regarding enums and extensibility, this

Re: Xstream naming convension

2009-10-31 Thread Ben R Vesco
To throw in my $0.02, also which would you rather type? I think it is much easier to type strict camel case as opposed to all cap acronyms. Sometimes hitting caps lock is just too much trouble (especially if there are only two letters capped) and it gets way more painful when those two consecutive

Re: Enforcing HTTP accept header

2009-10-29 Thread Ben R Vesco
As in, enforce a particular value in it? Check here: http://wiki.restlet.org/docs_2.0/13-restlet/27-restlet/130-restlet.html which shows us we can get the value from the header by querying the ClientInfo object like this: request.getClientInfo().getAcceptedMediaTypes() Which will return a list

Re: RestletFrameworkServlet missing from M5 and snapshot builds

2009-10-28 Thread Ben R Vesco
Related to this issue? http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2411788 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2412204

Re: Re: velocity representation

2009-10-11 Thread Ben R Vesco
Here is the simple one I coded up to test with. -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2406027 items.vtl Description: Binary data

Maven-Jetty dependencies broken in 2.0-M5?

2009-10-10 Thread Ben R Vesco
I'm having some trouble with the jetty connector in 2.0-M5 when managing my build with maven. I'm including these dependencies in my project: org.restlet.jse:org.restlet:jar:2.0-M5 org.restlet.jse:org.restlet.ext.jetty:jar:2.0-M5 The errors maven is generating say it can't find four jetty