Re: Best practices when Implementing acceptingRepresentations?

2008-10-13 Thread Vincent Ricard
some objects (mainly the exceptions), we used XSD+XSLT to generate the actual Java exceptions and their REST envelope (JAXB does not like the Exception ;-). Hope this help. -- Vincent Ricard

RE: [RFC] WadlResource, get a param value according to the description

2008-09-30 Thread Vincent Ricard
parator is not part of the standard URI grammar... that's just an idea :) Best regards, -- Vincent Ricard

RE: [RFC] WadlResource, get a param value according to the description

2008-09-23 Thread Vincent Ricard
hi hihi foo Knowing the route is "/service/{service}", this means the "hihi" value is returned via the matrix form, _but_ the template value also contains it. Is it normal? Regards, -- Vincent Ricard sample.tgz Description: GNU Unix tar archive package com.mycompany.app;

RE: [RFC] WadlResource, get a param value according to the description

2008-09-22 Thread Vincent Ricard
an other common interface). Cheers, -- Vincent Ricard

Convention and booleans

2008-09-09 Thread Vincent Ricard
resentation to false; - if the query string contains my param, i set my reprensentation to true. Should i parse the value too? Any comments (and pointers) are welcome (and appreciate ;-) Cheers -- Vincent Ricard

[WADL] NPE in WadlResource.describe(Variant)

2008-09-01 Thread Vincent Ricard
pe.APPLICATION_WADL_XML.equals(variant.getMediaType())) I dont know what you prefer to do: returns null or handles the right http status (or both :)) Cheers, -- Vincent Ricard

[RFC] WadlResource, get a param value according to the description

2008-08-28 Thread Vincent Ricard
// not yet implemented } if (value == null) { value = parameterInfo.getDefaultValue(); } return value; } --- snip --- -- Vincent Ricard

Re: Handler has no getMatrixAsForm method

2008-08-27 Thread Vincent Ricard
Oops, sorry, i meant: why Handler has no getMatrix() method (which could call getRequest().getResourceRef().getMatrixAsForm()). Regards -- Vincent Ricard

Handler has no getMatrixAsForm method

2008-08-27 Thread Vincent Ricard
Hi, I wonder why Handler has no getMatrixAsForm method? I mean, for consistency and convenience, i think it'd be fine to have this method. It could be have the same behavior (charset and decode values) than getQueryAsForm(). Best regards, -- Vincent Ricard

PUT method without body entity

2008-08-22 Thread Vincent Ricard
handlePost() method: a log trace, then a call to storeRepresentation with a 'null' param. So, is it a bug of an HTTP "feature"? Regards, -- Vincent Ricard

Re: WADL howto?

2008-08-21 Thread Vincent Ricard
This description can be customized by overriding the #describe() and #describeMethod(Method, MethodInfo) methods. Hope this help. Regards, -- Vincent Ricard

[RFE] Engine.loadClass() should give the class name

2008-08-20 Thread Vincent Ricard
Hi, It would be nice if Engine.loadClass() fill in the class name when it throws the ClassNotFoundException. Here, my configuration was wrong and i spent a lot of time to find the typo :-/ Is it possible? Best regards, -- Vincent Ricard

[RFE] LogFilter.afterHandle

2008-08-20 Thread Vincent Ricard
Hi, I read LogFilter.afterHanfle() and wondered if these 2 modifications would be better (from a performance point of view): - put the whole block into a "if (this.logLogger.isLoggable(Level.INFO)) {...}" - compute the duration only if needed. Regards, -- Vincent Ricard

Re: Wadl components

2008-08-14 Thread Vincent Ricard
ed the servlet extension and added a restlet.xml: http://www.restlet.org/schemas/1.1/Component"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://www.restlet.org/schemas/1.1/Component";> -- Vincent Ricard

Re: URI templates and URI pattern matching in restlet

2008-08-13 Thread Vincent Ricard
Hi Prashant > I can extract request path from request object there but how will I match > that > REST URI with URI template(which I have hardcoded in my Restlet class) in > my restlet. I'm not sure to understand your need, but the Template.match() method is not enough? Regards, -- Vincent

ClassCastException with a custom application

2008-08-12 Thread Vincent Ricard
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433) It seems ServletContextAdapter is not an instance of ChildContext. Regards -- Vincent Ricard sample.tgz Description: GNU Unix tar archive

Wadl and servlet container

2008-08-12 Thread Vincent Ricard
) PS: could it make sense doing this in createComponent()? component.setContext( new ServletContextAdapter(this, componentcontext)); -- Vincent Ricard

Re: Wadl is never parsed (was: NPE with Wadl and ServerServlet)

2008-08-12 Thread Vincent Ricard
Ok, i found my problem. I'm sorry for the useless noise. My wadl namespace was out of date ("http://research.sun.com/wadl/2006/07"; instead of "http://research.sun.com/wadl/2006/10";). Regards, -- Vincent Ricard

Wadl is never parsed (was: NPE with Wadl and ServerServlet)

2008-08-12 Thread Vincent Ricard
he project with WTP, or mvn package to build the war). I guess something is wrong, but i dont find what :-) Regards, -- Vincent Ricard sample.tgz Description: GNU Unix tar archive

NPE with Wadl and ServerServlet

2008-08-12 Thread Vincent Ricard
na.startup.Bootstrap.main(Bootstrap.java:433) Best regards, -- Vincent Ricard http://www.restlet.org/schemas/1.1/Component"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://www.restlet.org/schemas/1.1/Component";>