RE: Response from POST

2011-03-08 Thread Vincent Fazio
Nevermind - it looks as if the getResponse().setEntity() will accept my FileRepresentation and accomplish what I'd like to. -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2710256

Restlet speed

2011-02-14 Thread Paul Vincent Craven
Restlet does not seem to run as fast as I would expect. I was hoping someone could point me how to get it running faster. Looking at the examples, I've created a simple server: import org.restlet.Server; import org.restlet.data.Protocol; import org.restlet.resource.Get; import

Re: Removal of extensions for upcoming versions

2010-11-02 Thread Vincent Nonnenmacher
Second attempt without the typos J --- Hi all, While preparing for the release of Restlet Framework 2.1 M1 (due tomorrow), I’ve done some clean-up and removed modules that we won’t develop or support anymore. The goal is to focus our energy on the modules adding the most value to

reconstructing an HttpServletRequest from a Restlet request ?

2010-09-20 Thread Vincent Nonnenmacher
I'm wondering how to integrate the Google Visualization Tookit Datasource Librairie inside a Restlet container (standalone version). The Google Visualization Toolkit allow allows to graph a lot of data in several graphs format and widgets (gallery here :

Re: reconstructing an HttpServletRequest from a Restlet request ?

2010-09-20 Thread Vincent Nonnenmacher
On 20/09/10 17:35, Vincent Nonnenmacher wrote: I'm wondering how to integrate the Google Visualization Tookit Datasource Librairie inside a Restlet container (standalone version). The Google Visualization Toolkit allow allows to graph a lot of data in several graphs format and widgets

Re: Prudence 1.0 RC1

2010-09-13 Thread Vincent Nonnenmacher
On 12/09/10 02:39, Tal Liron wrote: I'm very happy to announce the first public release candidate of Prudence, an open source web development platform based on Restlet 2.0. http://threecrickets.com/prudence/ Prudence comes with a comprehensive 100-page manual, a complete example application

Re: Using a REST layer for UI and services

2010-09-13 Thread Vincent Nonnenmacher
, this is possible to use FreeMarker or Velocity templates in Restlet like you would do with JSP, but as Vincent pointed out, this require manual work for each REST resource you want to expose as HTML, in addition to JSON/XML. Good news, is that we are planning to simplify this binding in version 2.1

Re: Using a REST layer for UI and services

2010-09-13 Thread Vincent Nonnenmacher
On 10/09/10 09:15, Marc Portier wrote: you might want to give http://kauriproject.org a try it has restlet and all its goodies underneath, but adds - a java and rest-service-wiring (based on spring and then some) - some templating, routing, and client-side ajax/js support (including a

Re: restlet and comet

2010-09-13 Thread Vincent Nonnenmacher
On 09/09/10 15:18, Maxime Bégnis wrote: Thanks Vincent for your tips. I'm looking forward to this implementation of NIO. Regards, Maxime Bégnis On 09/09/10 15:18, Maxime Bégnis wrote: Thanks Vincent for your tips. I'm looking forward to this implementation of NIO. there is also the work

Re: restlet and comet

2010-09-13 Thread Vincent Nonnenmacher
On 09/09/10 15:18, Maxime Bégnis wrote: Thanks Vincent for your tips. I'm looking forward to this implementation of NIO. Regards, Maxime Bégnis I looked at your Calenco projet and see that you are using Dojo so it's true that you can favor comet instead of websocket as dojo is far more

Re: Using a REST layer for UI and services

2010-09-09 Thread Vincent Nonnenmacher
On 06/09/10 13:26, webp...@tigris.org wrote: Hi everyone, I have a web app who is divided into a web services and a ui front end. Actually the ui is made from servlets who call a business services layers and my web services use the same business layer. But I wonder if it is a way to write a

Re: Using a REST layer for UI and services

2010-09-09 Thread Vincent Nonnenmacher
On 06/09/10 13:26, webp...@tigris.org wrote: Hi everyone, I have a web app who is divided into a web services and a ui front end. Actually the ui is made from servlets who call a business services layers and my web services use the same business layer. But I wonder if it is a way to write a

Re: JMS

2010-09-09 Thread Vincent Nonnenmacher
On 06/09/10 18:56, Fraser Goffin wrote: Are there any plans in the near term to support JMS. Those of us using Restlet in Enterprise environments often require asynchronous and highly reliable protocols offered by one of the popular messaging backbones (MQ) ?? Fraser.

Re: restlet and comet

2010-09-09 Thread Vincent Nonnenmacher
On 07/09/10 15:08, Maxime Bégnis wrote: Hi list, I would like to include in a Restlet application some resources to be used with the CometD(Ajax Push) framework. I didn't find any documentation or examples of use cases with Restlet on the internet. Can someone point me to a starting point,

Re: JMS

2010-09-08 Thread Vincent Nonnenmacher
On 06/09/10 18:56, Fraser Goffin wrote: Are there any plans in the near term to support JMS. Those of us using Restlet in Enterprise environments often require asynchronous and highly reliable protocols offered by one of the popular messaging backbones (MQ) ?? Fraser. you could consider

Re: Using a REST layer for UI and services

2010-09-08 Thread Vincent Nonnenmacher
On 06/09/10 13:26, webp...@tigris.org wrote: Hi everyone, I have a web app who is divided into a web services and a ui front end. Actually the ui is made from servlets who call a business services layers and my web services use the same business layer. But I wonder if it is a way to write a

Advice on libraries/solutions available to implement REST services on microsoft .NET framework

2009-04-20 Thread Vincent Nonnenmacher
Hi gentlmen, I need to hook a restlet based server to a client that will be integrated on window .NET based products. I want to hook my restlet server to this client, by implementing on the latter a small REST server that will subscribe to the restlet server for events and having then the

Re: 1.1.0 maven

2008-10-29 Thread Vincent
time you update maven? Are there 2 trees? -Vincent.

Re: 1.1.0 maven

2008-10-29 Thread Vincent
Hi Thierry, okay I see the tag now. Question: shouldn't you update buil/build.xml: It still refers to a snapshot version: #release-type: . #release-type-full: . #release-number: 0 release-type: snapshot release-type-full: Snapshot release-number: -Vincent.

Re: 1.1.0 maven

2008-10-29 Thread Vincent
Question: shouldn't you update buil/build.xml: Imeant build.properties. -Vincent.

Re: Restlet 1.1.0 released!

2008-10-28 Thread Vincent
we have just pushed Restlet 1.1.0 out of the door!! Darn, there goes our excuse for postponing the update from 1.0.7! Congrats to the team. I'm looking forward to playing with the new features. -vincent.

1.1.0 maven

2008-10-28 Thread Vincent
Hello, I don't see the 1.1.0 version in the maven repository. Should we be using the SNAPSHOR version? Also, why are the poms no longer part of the distribution? Thanks, -Vincent.

Re: setting up Server (Jetty) with SSL

2008-10-22 Thread Vincent
/gmane.comp.java.restlet/2312 -vincent

Re: Best practices for read-only fields?

2008-10-21 Thread Vincent
=1m=evar=1tidx=1) So, yes, #3 is the only RESTful option, but as Jerome suggested, you could create new resources: PUT /itinerary/123/startDate -vincent.

Re: Best practices when Implementing acceptingRepresentations?

2008-10-14 Thread Vincent Ricard
to generate the actual Java exceptions and their REST envelope (JAXB does not like the Exception ;-). Hope this help. -- Vincent Ricard

Re: Best practices when Implementing acceptingRepresentations?

2008-10-14 Thread Vincent Nonnenmacher
Erik Beeson a écrit : [...] We use XStream to do all of our serialization, so we get to switch between XML and JSON for free, which is really nice. Our containers end up really cluttered with a lot of XStream related annotations (mainly @XStreamAlias and @XStreamImplicit), so separating them

Re: advice needed for using glassfish as intermediation server to implement Restlet comet/bayeux style architecture

2008-10-10 Thread Vincent Nonnenmacher
John D. Mitchell a écrit : On Thursday 2008.10.02, at 23:00 , Vincent Nonnenmacher wrote: [...] I'm confused... What are your dashboard clients doing that need to sustain 3 RPS (requests per second)? I.e., why do you need fast updating for a dashboard app? It's not like this is some sort

Re: advice needed for using glassfish as intermediation server to implement Restlet comet/bayeux style architecture

2008-10-10 Thread Vincent Nonnenmacher
Rob Heittman a écrit : Meant to post this last night, but am on travel with intermittent connectivity. Jerome's reply makes it a bit ad hoc ... My love of REST and the Web doesn't quite extend to the use case of a large N of concurrent clients monitoring a single source of near-realtime

advice needed for using glassfish as intermediation server to implement Restlet comet/bayeux style architecture

2008-10-02 Thread Vincent Nonnenmacher
Hi gentlemen, I'm architecturing a new opensource project around asterisk PBX and Restlet to offer a RESTFull view of an asterisk server (or cluster of *). I've got a working server and already use it in production servers for monitoring, clustering and call distribution purposes for our

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

2008-09-30 Thread Vincent Ricard
, -- Vincent Ricard

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

2008-09-23 Thread Vincent Ricard
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; import java.util.ArrayList; import

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

2008-09-22 Thread Vincent Ricard
of data (such as described in the WADL: template, query, etc) could be seen as a Form (or an other common interface). Cheers, -- Vincent Ricard

Convention and booleans

2008-09-09 Thread Vincent Ricard
; - 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

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

2008-08-28 Thread Vincent Ricard
) { value = parameterInfo.getDefaultValue(); } return value; } --- snip --- -- 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

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

PUT method without body entity

2008-08-22 Thread Vincent Ricard
as the 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
by overriding the #describe() and #describeMethod(Method, MethodInfo) methods. Hope this help. 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

[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

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

NPE with Wadl and ServerServlet

2008-08-12 Thread Vincent Ricard
(Bootstrap.java:433) Best regards, -- Vincent Ricard?xml version=1.0? component xmlns=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; client protocols=CLAP / server protocols

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

2008-08-12 Thread Vincent Ricard
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

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

ClassCastException with a custom application

2008-08-12 Thread Vincent Ricard
) at 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

Re: Restlet and Velocity template location.

2008-02-27 Thread Vincent
(...); r.getEngine().setProperty(VelocityEngine.FILE_RESOURCE_LOADER_PATH, /path/to/resources); -vincent.

Re: Congratulation!“Restlet: Official Developer’s Guide to RESTful Web Applications in Java” will be out!

2008-02-21 Thread Vincent
Title:Restlet: Official Developer's Guide to RESTful Web Applications in Java Great news! Any idea when the book will be available? I'll buy a copy for sure. -vincent.

Re: Unchecked exceptions in Resource constructors

2007-09-21 Thread Vincent
RuntimeExceptions: catch(InvocationTargetException e){ if (e.getCause() instanceof Error || e.getCause() instanceof RuntimeException) { throw (Error) e.getCause(); } getLogger() } -Vincent.

Re: Unchecked exceptions in Resource constructors

2007-09-21 Thread Vincent
; } In short: we make sure we let all unchecked exceptions (errors runtime) flow through the method, while all checked ones (Exceptions that are not runtime) are trapped and logged. We should also document the fact that Resource constructors should never throw checked exceptions. -Vincent.

Re: Unchecked exceptions in Resource constructors

2007-09-19 Thread Vincent
Hi Jerome, Your suggestion seems reasonable. I've applied this changed to SVN trunk (only). It is slightly different from your patch. Let me know if it works for you: Thanks. It's exactly what I needed. -Vincent.

Sending a resource URI as a form parameter

2007-08-27 Thread Vincent
sure there is a simple and elegant solution. Any suggestions? Thanks, -Vincent.

Re: Maven support

2007-04-24 Thread Vincent
that the framework is being used for new projects, which should use maven 2. -vincent http://gmane.org/word.php?id=76346

Re: Maven support

2007-04-24 Thread Vincent
Jerome, Instead of relying on a public Maven repository such as Ibiblio, we would prefer to host our own Maven repository at maven.noelios.com and control its freshness and service quality. what prevents you from controlling ibiblio's freshness? -Vincent.

Re: Question to all about visual webapps and Restlet

2007-04-13 Thread Vincent
, or are these associations established at a higher level? A's representation contains a link to B and C, which means the client has to GET and C, and pass their representation to the template in order to generate the page. So, do B and C's representations contain links to A? -vincent.

Re: Question to all about visual webapps and Restlet

2007-04-12 Thread Vincent
resources? The ForumView resource would just retrieve the object it needs from the DB (profile and post in Jeff's example), inject them in the template and return the template's result. -vincent.

Re: Question to all about visual webapps and Restlet

2007-04-12 Thread Vincent
it the Orange info? -vincent.

Re: Response Headers

2007-02-13 Thread Vincent
think this is a good candidate for a FAQ entry, as most people will instinctively look for a Response.setHeader(String name, String value) method. I struggle with this too when I first started with Restlet. -vincent.

Re: Response Headers

2007-02-11 Thread Vincent
() + uri); -Vincent.

PatternSyntaxException when a variable is used more than once in a template

2007-01-24 Thread Vincent
--] +\,\;\=]|\:|\@)+)/\0/foo ^ Apparently, util.regex doesn't like the '\0' you're adding to the regexp when a variable is reused. -Vincent.

Re: Getting confused

2007-01-23 Thread Vincent
[...] Variant v = factory.getPreferredVariant(clientInfo, image.getVariant); return image.getRepresentation(v); } It is my understanding that you'd have to follow this pattern every time you create a resource by POSTing to a collection. -Vincent.

Guard.authenticate gets executed twice

2007-01-23 Thread Vincent
by authorize() in the case statement. -Vincent.

regexps in uri patterns

2007-01-19 Thread Vincent
a resource to /foo/[0-9]*, and a different one to /foo/[a-z]*. This is no longer possible. -Vincent.

Re: Getting confused

2007-01-19 Thread Vincent
from obvious when you start working with the framework (you really have to read the code and spot the downcast to see how the pieces fit together). -Vincent.

Script to install a Restlet distribution into a maven2 repository

2007-01-18 Thread Vincent
Hi all, I use this bash script to upgrade my local maven2 repository each time a new version of Restlet comes up. Some of you might find it useful. -Vincent. #!/bin/bash # # This script installs a Restlet disrtribution into a local (filesystem) # maven2 repository. # # Usage: restlet2mvn.bsh

StringIndexOutOfBoundsException

2007-01-18 Thread Vincent
Steps to reproduce: - create a restlet app - GET http://localhost:8182// (note the two slashes). -Vincent SEVERE: Unhandled exception or error intercepted java.lang.StringIndexOutOfBoundsException: String index out of range: -11 at java.lang.String.substring(String.java:1768

Re: Getting confused

2007-01-17 Thread Vincent
) { result = (Representation) variant; } return result; } In other words, I'm not sure this hierarchy respects the Liskov substitution principle. Thanks, -Vincent.

Re: Maven support added

2007-01-16 Thread Vincent
the following definition: groupIdcom.noelios.restlet/groupId artifactIdcom.noelios.restlet/artifactId version1.0rc3/version I believe the artifact id should be 'restlet-impl', not 'com.noelios.restlet. -Vincent.

Getting confused

2007-01-16 Thread Vincent
created bean getResponse().setEntity(this.getRepresentation(???); } But, how do I have access to the client's preferred variant (application/xml in this case)? Any clarification is welcome. Thanks, -Vincent.

Re: Restlet 1.0 RC2 released

2007-01-11 Thread Vincent
Hi Jerome, Could you share this script or the generated POMs on this bug report? http://restlet.tigris.org/issues/show_bug.cgi?id=91 Done.Ideas to improve it are welcome. -Vincent.

Re: Handlers for search urls

2006-11-07 Thread Vincent
attach(/accounts/[0-9], new GetAccountHandler()) attach(/accounts, new SearchAccountHandler()) Yes, that's what I ended up doing. It's a good solution. Thanks. Vincent.

Re: toString shouldn't change the object's state

2006-11-05 Thread Vincent
? Piyush and John indicated that Request.getValue must be synchronized should we want to cache teh stringg, but I don't understand why. I must have missed something in Restlet's threading model. Thanks, -Vincent. The problem with cache invalidation for muttable objects in a multithreaded

Re: Handlers for search urls

2006-11-05 Thread Vincent
]+,..) and attach(/accounts[.]+,...) does the trick, but attach(/accounts?[.]+,...) would have been slightly more elegant. -Vincent.

Re: Handlers for search urls

2006-11-05 Thread Vincent
Just a thought: could it be because ? is a valid regexp meta- character ( No, it's not the issue. -Vincent.

Re: Handlers for search urls

2006-11-03 Thread Vincent
that class because they understand the URLs .. Well, it turns out restlets only understand the base of the URLs. -Vincent.

Re: Handlers for search urls

2006-11-03 Thread Vincent
the open cursor in the cache for a limited amount of time. You access it with: GET /accounts/cursor/121212?page=2 This is on the salesforcers.com search API works. -Vincent.

Re: toString shouldn't change the object's state

2006-11-03 Thread Vincent
. -Vincent.

Re: toString shouldn't change the object's state

2006-11-03 Thread Vincent
) { rte = new IllegalStateException(); } } if (rte != null) { throw rte; } return value; } Just think aloud here. -Vincent

Re: toString shouldn't change the object's state

2006-11-03 Thread Vincent
InputStream getStream() throws IOException { InputStream result = this.inputStream; this.inputStream = null; setAvailable(false); return result; } -Vincent

I have extended ApplicationHelper. Now what?

2006-10-31 Thread Vincent
How do I register it? Form reading the code, it looks like I have to override com.noelios.restlet.Factory.createHelper, but it seems wrong. Thank you. -Vincent.

Filter questions

2006-10-27 Thread Vincent
that filter2 does not score high enough? I must admit I don't get this scoring thing. If somebody could shed some light, that'd be great. 2- How do I subclass StatusFilter to change its behaviour? I.e how do I make ApplicationHelper.start instanciate my StatusHelper class? Thanks, -Vincent. PS: I'm

Re: How to compromise when designing a RESTful API?

2006-09-18 Thread Vincent
. -Vincent.

Re: How to compromise when designing a RESTful API?

2006-09-18 Thread Vincent
the account details in this tx. -Vincent.

Re: Re: How to compromise when designing a RESTful API?

2006-09-17 Thread Vincent
your point of view, but -at this point- I'm still unconvinced by this 'action as a resource' approach. -Vincent.

Re: How to compromise when designing a RESTful API?

2006-09-16 Thread Vincent
of RPC. Thanks, -Vincent.

How to compromise when designing a RESTful API?

2006-09-15 Thread Vincent
. a POST where you pas the operation's name parameters. That's -from what I saw- how the upcoming.org API is designed. What do you Restfarians think? Am I missing the boat on this one? Thanks, -Vincent.