Re: DomRepresentation problem

2007-05-30 Thread Thierry Boileau
Hello Lee, This problem has been fixed (see http://restlet.tigris.org/issues/show_bug.cgi?id=316) and is available in the svn repository. best regards, Thierry Boileau I'm not sure if this is a bug or a feature but... In the org.restlet.resource.DomRepresentation class, the write method is

Re: Content type via URL parameters?

2007-05-30 Thread Thierry Boileau
Hello Jim, I couldn't really explain. :) The "handle" method of the Application class already detect if the Appplication is started or not. As Irfan provides this sample code from a real application, he may have forgotten to remove this method that can be usefull for some initializations stuff

Re: How to use TunnelFilter

2007-05-30 Thread Thierry Boileau
Hi sync, an application has its own tunnelfilter ready to work. If you want to use it, there is nothing to do at all. Could you explain us what you want to do? The behaviour of the Tunnel Service is specified in the Restlet API (see [1]) and implemented in the reference implementation (the No

Re: URI matching question

2007-05-30 Thread Thierry Boileau
Hi Jim, as a workaround, you can define 2 routes like this : //Serves only http://localhost:6080/appcontext/version route = [...]attach("/version", <...>); route.getTemplate().setMatchingMode(Template.MODE_EQUALS) //Serves only http://localhost:6080/appcontext/version? // andhttp://

Re: Please Don't Eat Exceptions

2007-05-30 Thread Thierry Boileau
Adam, I just want to explain why this behaviour happens, not to plainly justify it. As you point, it has been decided to show the failures by the way of the status code and not by the way of the exceptions. One reason is that for example, the connectors are based on other externals projects th

Re: DomRepresentation problem

2007-05-30 Thread Lee Saferite
Thanks for the quick fix!

Re: 2-way SSL authentication

2007-05-30 Thread Toby Thain
On 21-May-07, at 6:43 AM, Jerome Louvel wrote: Hi all, I've added support for client authentication in the SVN trunk (upcoming 1.1). Only Simple connector has support to retrieve the client certificates, These two features are working well for me in 1.1b1. More specifically, as expected

Re: Please Don't Eat Exceptions

2007-05-30 Thread Adam Taft
I made some comments to the bug, by the way. One thing that came to mind, about handling different 3rd party client apis, is to deal with it like Spring deals with JDBC exceptions. In essence, they wrap and catch the various jdbc/driver exceptions and then map it to a set of common spring de

Re: URI matching question

2007-05-30 Thread Jim Alateras
cool, i'll give it a go today. cheers Thierry Boileau wrote: Hi Jim, as a workaround, you can define 2 routes like this : //Serves only http://localhost:6080/appcontext/version route = [...]attach("/version", <...>); route.getTemplate().setMatchingMode(Template.MODE_EQUALS) //Serves only htt

Re: Please Don't Eat Exceptions

2007-05-30 Thread Jim Alateras
Thierry, I'm fine with the design choice. I stumbled across a place where this wasn't happening [1] but it was hard to associate a HTTP status code with the failure since the request failed to leave the client. Currently I have patched it to set the following status code response.setStatus(S

Can I call my Restlet classes without a Web container?

2007-05-30 Thread Bryan Loofbourrow
I'm interested in adding a unit test for certain aspects of the behavior of my REST service, one that can execute outside the confines of a Web server. It would be sufficient if there were merely a way for me to call the Restlet classes directly, then examine the response. What's not obvious to me

Re: Can I call my Restlet classes without a Web container?

2007-05-30 Thread Adam Taft
Bryan, I know this isn't directly answering your question, but how we do testing is by integrating with the Spring Framework. With Spring, you get various DAO and service layer support classes which are easily testable. Essentially, if you make your Restlets as "dumb" as possible by transfe