Disable DTD validation doesn't seem to work (DomRepresentation)

2010-06-28 Thread Carles Barrobés
I'm parsing an XHTML response with DomRepresentation, and it generates an exception: Exception in thread "main" java.lang.RuntimeException: java.io.IOException: Server returned HTTP response code: 503 for URL: http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd at org.restlet.ext.xml.XmlRep

Re: Disable DTD validation doesn't seem to work (DomRepresentation)

2010-06-28 Thread Carles Barrobés
Forgot to mention, this is the DOCTYPE declaration in my XHTML: http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";> -- View this message in context: http://restlet-discuss.1400322.n2.nabble.com/Disable-DTD-validation-doesn-t-seem-to-work-DomRepresentation-tp5230305p5230316.html Sent from the Re

Re: Disable DTD validation doesn't seem to work (DomRepresentation)

2010-06-28 Thread Alex Milowski
On Mon, Jun 28, 2010 at 11:54 AM, Carles Barrobés wrote: > I'm parsing an XHTML response with DomRepresentation, and it generates an > exception: > > > Exception in thread "main" java.lang.RuntimeException: java.io.IOException: > Server returned HTTP response code: 503 for URL: > http://www.w3.org

Re: Disable DTD validation doesn't seem to work (DomRepresentation)

2010-06-28 Thread Carles Barrobés
OK thanks, I solved it with: doc.setEntityResolver(new EntityResolver() { @Override public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException { if (systemId.contains("www.w3.org")) { retu

Chaining an authorization filter after a router

2010-06-28 Thread Carles Barrobés
I'm trying to do the following: for URLs matching a pattern "/user/{username}/resource...", where username designates the resource's owner, I want to grant access only if the authenticated user matches the owner of the resource. I created a custom authorizer that looks like: import org.restlet.R

Re: JAXRS, Transactional Resources managed by Spring

2010-06-28 Thread Sriram C
Stephan, Thanks for your reply. Whats the best way to resolve this issue? I have a decent sized app running on JAXRS, Spring, Restlet stack on Tomcat that needs to be restarted every other day or so to get past this issue. I am very willing to help develop the solution and validating test-cases. An

RE: authentication error with jetty on browser

2010-06-28 Thread Laurent Garrigues
Hi Bruno, thanks for your answer I have no idea if it's a basic/digest authentication or a SSL/certificate. When I use the browser, it does not open the login pop-up. If I remove "jettyServer.start();" it works fine, but not in jetty: "22 juin 2010 16:26:46 org.restlet.ext.simple.SimpleServerHelp

RE: Re: JAX-RS and charsets in posts

2010-06-28 Thread Alistair Dutton
Hi Stephan, Thanks for the swift reply. I'm unable to prepare a patch right now but I will do so in the next few days. Once I have a patch I will update this thread and create the issue report. (By the way, I think that one could get around the issue simply by changing the content parameter to

Data persistence in Android using Restlet

2010-06-28 Thread webpost
Hi, I'm writting an android app, and I am considering using Restlet for the REST part. But I was wondering about data persistence. Does Restlet use the sqlite db of android to cache data already retrieved from server ? How is it handled by this framework ? I couldn't find the corresponding chapt

Content-type negotiation and user-agent tunnel

2010-06-28 Thread Bruno Harbulot
Hi, I'm trying to understand why Chrome and MSIE get a different content type via the tunnel than Opera, although the settings seem to be the same. I'm using 2.0-RC4, and accept.properties [1] seems to have the same settings for all the browsers. User-agent tunnelling is enabled in the applic

Re: authentication error with jetty on browser

2010-06-28 Thread Bruno Harbulot
On 28/06/10 14:36, Laurent Garrigues wrote: > Hi Bruno, thanks for your answer > > I have no idea if it's a basic/digest authentication or a SSL/certificate. > When I use the browser, it does not open the login pop-up. > > If I remove "jettyServer.start();" it works fine, but not in jetty: > "22 ju

Re: Chaining an authorization filter after a router

2010-06-28 Thread Bruno Harbulot
On 28/06/10 16:27, Carles Barrobés wrote: > I'm trying to do the following: for URLs matching a pattern > "/user/{username}/resource...", where username designates the resource's > owner, I want to grant access only if the authenticated user matches the > owner of the resource. > I created a custo

Re: JAX-RS and charsets in posts

2010-06-28 Thread Jeroen Goubert
Hello Alistair, Stephan and list, > Hi Stephan, > > Thanks for the swift reply. I'm unable to prepare a patch right now but I > will do so in the next few days. Once I have a patch I will update this > thread and create the issue report. > I was actually about to report this issue too. Let

JAX-RS problem selecting best method when multiple resource methods match

2010-06-28 Thread Jeroen Goubert
Hello, I noticed that the restlet jax-rs implementation has difficulties selecting the best resource method when multiple methods (in the same resource) match a given URI. An example will clarify: @Path("foo") public class FooResource { @GET @Path(value = "{id}") public String