preferred variant

2010-02-21 Thread Zsolt Czinkos
Hello I'm sure I'm missing something trivial, but I can't figure it out. I have this simple interface: public interface EntryResource { @Get(html) public Representation asHtml(); @Get(json|xml) public Entry retrieve(); @Put public void store(Entry

XStream

2010-02-21 Thread webpost
Hi, I want to map the following xml to a Java list with Post objects, where Post should be an XStream annotated POJO: posts post name=foo/ post name=bar/ /posts Any hints how to do it? Thanks. --

If-None-Match: * not handled correctly

2010-02-21 Thread webpost
I am trying to send a conditional PUT to a Restlet resource using the 'If-None-Match: *' header, basically I need the PUT to succeed if no entity exists and to fail if it does exist (see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.26). The current behavior of Restlet appears

OpenID support

2010-02-21 Thread Juan Carlos Gonzalez
Hi I'm trying to develop an application in GAE and I'd like to use Restlet framework. We have a hosted domain in Google and I was wondering if Restlet will support OpenId in a near future. It seems a natural option for authentication for developments over GAE. Best regards, Juan Carlos

RE: Re: URI Pattern matching based on regular expressions

2010-02-21 Thread Jerome Louvel
Hi Kirk, I'm not clear on your actual requirements and wonder if there wouldn't be alternative ways to implement it that would require less customization. If URI templates provided by Restlet really can't fit your use case (even though the default matching regex can be customized), the easiest

RE: DirectoryServerResource doesn't correctly handle file names with more than one .

2010-02-21 Thread Jerome Louvel
If there, I've done a simple test on my machine and it works. See the attached file. Could you send a reproducible test case? Best regards, Jerome Louvel -- Restlet ~ Founder and Technical Lead ~ http://www.restlet.org Noelios Technologies ~ http://www.noelios.com -Message

RE: Atom validation

2010-02-21 Thread Jerome Louvel
Hi there, Which version of Restlet are you using? The date format issue has already been fixed for example in latest Restlet 1.1 and 2.0 versions. Regarding the namespace, I've done a test with Restlet 2.0 and it now uses the default namespace for Atom. See attached example. BTW, I've just

RE: Bug in MediaType Parameter handling

2010-02-21 Thread Jerome Louvel
Hi guys, After double checking, there was a bug. Parameters are actually part of the media type name, so toString() shouldn’t add those parameters again. I’ve fixed the issue in SVN trunk and also improved the behavior of getParent() to return an instance of MediaType without parameters if

RE: RIAP protocol and local Representions

2010-02-21 Thread Jerome Louvel
Hi Valdis, It does work out of the box. If you specify that you prefer MediaType.APPLICATION_JAVA_OBJECT as a RIAP client, then the converter service with return an ObjectRepresentation instance wrapping your local object as indicated by Thierry. Then you can directly retrieve the local

RE: Object serialization with GWT

2010-02-21 Thread Jerome Louvel
Hi Xavier, Have you been able to solve your issues using 2.0 M7 or more recent snapshots? This tutorial should illustrate how object serialization works in 2.0 M7 using GWT deferred binding: http://wiki.restlet.org/docs_2.0/13-restlet/181-restlet/303-restlet.html Best regards, Jerome

RE: How to page

2010-02-21 Thread Jerome Louvel
Xavier, You are quite right and we have been working this week with Thierry on a new structure that would consolidate more documentation into the wiki (User Guide), adding a “how to” section as well. Stay tuned! Best regards, Jerome Louvel -- Restlet ~ Founder and Technical Lead ~

RE: XML mapper for GWT

2010-02-21 Thread Harald Pehl
Hi Jerome, when designing Piriti I was inspired by JAXB, but I wanted a clean and lean API. So I decided to implement only a subset of features (no support for namespaces, schema, ...). Also Piriti is based on XPath expressions to map XML. Baiscally Piriti originates from a few projects where

RE: Re: multiple application sharing the same basePath

2010-02-21 Thread Jerome Louvel
Hi John, I suggest that each application has a distinct URI prefix to attach it to the virtual host. Otherwise things will get complicated, especially when you add more resources. component.getDefaultHost().attach(/main, new MainApplication()); component.getDefaultHost().attach(/stats, new

Re: RIAP protocol and local Representions

2010-02-21 Thread Valdis Rigdon
Is doing something like this possible when using the annotated client-side interfaces? I've had to put this work to the side, but I'm planning on getting back to it in a few weeks. If I remember correctly, I ended up registering a RIAP ConverterService which detected if the request was made

RE: XML mapper for GWT

2010-02-21 Thread Jerome Louvel
Hi Harald, Excellent! What I would like to have is the equivalent of Restlet 2.0's ConverterService, but at deferred binding time for GWT, in the org.restlet.rebind package. We could then have an org.restlet.ext.piriti extension with a PiritiConverter based on your library that could be called

RE: Using WADL classes with filters - use WadlWrapper? -- solved, but with open questions

2010-02-21 Thread Jerome Louvel
Hi John, Thanks for the report. I’ve just fixed the bug regarding default route in WadlApplication. Checked in SVN trunk and 1.1 branch. Best regards, Jerome Louvel -- Restlet ~ Founder and Technical Lead ~ http://www.restlet.org/ http://www.restlet.org Noelios Technologies ~

RE: Welcome to discussion discuss.

2010-02-21 Thread Jerome Louvel
Hi Leonardo, Thanks for the feed-back on how you are using Restlet and apologizes for the delay in getting back to you. The Restlet Framework was designed from the first version (1.0) for concurrent client usage, so there is no intrinsic reason why it would serialize the processing of

Re: Object serialization with GWT

2010-02-21 Thread Xavier Mehaut
i haven't tried again with the new version because we had to go on our project ; we found a workaround by combining rpc gwt and restlets ; we'll update our code later i think best regards xavier Envoyé de mon iPhone Le 21 févr. 2010 à 15:25, Jerome Louvel jerome.lou...@noelios.com a écrit

Re: How to page

2010-02-21 Thread Xavier Mehaut
thanks a lot both of you; i'm eager to read the new wiki regards xavier Envoyé de mon iPhone Le 21 févr. 2010 à 15:28, Jerome Louvel jerome.lou...@noelios.com a écrit : Xavier, You are quite right and we have been working this week with Thierry on a new structure that would

RE: Jackson extension replaces XStream extension?

2010-02-21 Thread Jerome Louvel
Hi Juan Carlos, I've just done a test with Jackson on Java SE and it automatically serializes the beans to JSON based on the Accept header. Are you sure you deployed the following JARs to GAE? - org.restlet.ext.jackson.jar - org.codehaus.jackson.core.jar - org.codehaus.jackson.mapper.jar

RE: XStream

2010-02-21 Thread Jerome Louvel
Hi there, You will need to create two Java classes: - Post class with a name String property - Posts class with a ListPost property Then, add the org.restlet.ext.xstream extension to your classpath and that should be it. For the Restlet resources, use annotations and ServerResource subclasses

Re: Redirect to the original URL after login?

2010-02-21 Thread Yuan-Fang Li
Hi Doug, Thanks for the idea. Unfortunately this would not work in my situation as my authorization logic is not part of the spring security filter chain. It only kicks in after spring has granted access to the resource. At the time this seemed to be a simpler approach, but now it seems defining

RE: Jackson extension replaces XStream extension?

2010-02-21 Thread Juan Carlos Gonzalez
Hi Jerome, Thanks for your response. The problem was due to not including Jackson jar. Sorry, I'm a new comer to Restlet and Java (in that order) Anyway, I'd like to handle JSON and XML formats for my representations. Xstream integration with Restlet was promising, but Xtream has been