Re: Testing strategies

2007-11-20 Thread Sean Landis
I'm not trying to talk you out of the current Restlet design, but I would rather have it described as the result of some tough design decisions on trade-offs concerning evolvability and implementation inheritance, not as classes are better than interfaces in APIs. This is a

Re: [newbie] Start using 1.1 SNAPSHOT - Maven Repo ?

2007-11-06 Thread Sean Landis
Jerome Louvel contact at noelios.com writes: Hi all, Maybe should also publish snapshots in the Maven repository? If we do so, we should follow the Maven naming conventions for version numbers. Note: we don't internally use Maven to build Restlet code base, but we know how to publish

Re: JSON represenation based on json-lib from http://json-lib.sourceforge.net/

2007-10-31 Thread Sean Landis
Jerome Louvel contact at noelios.com writes: Hi Evgeny, I've updated the related RFE Improve support for JSON http://restlet.tigris.org/issues/show_bug.cgi?id=131 I'm a bit reluctant to upgrade due to the fact that it requires two additional dependencies (jakarta commons-beanutils

Re: [docs] Poll for participation and input.

2007-10-19 Thread Sean Landis
Sean Landis sean.landis at gmail.com writes: IMO, it is not intended to be read in one shot like a book but more feature by feature depending on the user needs (beside the first introductory chapters). I agree with this as long as the feature descriptions are very detailed. I think

Re: [docs] Poll for participation and input.

2007-10-19 Thread Sean Landis
Jerome Louvel contact at noelios.com writes: Hi all, I agree that the reference manual shouldn't be a repeating of the Javadocs but go beyond and around them: - explain design choices - describe usage contexts - show sample code to copy and paste IMO, it is not intended to be

Re: HEAD not well supported?

2007-10-18 Thread Sean Landis
Jerome Louvel contact at noelios.com writes: Hi all, Thanks for the quality of the feed-back. I feel like I'm now grasping all aspects of the problem and can propose a solution: 1) Split the Resource class into an abstract Handler class and a Resource subclass Hi Jerome, What is the

Another MediaType surprise

2007-10-17 Thread Sean Landis
In my resource, I fully expected the following to work: if (entity.getMediaType().equals(MediaType.APPLICATION_JSON)) { but I was surprised to discover that it did not because a parameter had been set for character encoding on the request and the MediaType.equals() is implemented to look at

Re: HEAD not well supported?

2007-10-12 Thread Sean Landis
Tim Peierls tim at peierls.net writes: There's a false parallel here that I don't think should be encouraged by providing parallel names. getRepresentation takes a Variant argument, handleGet does not; post takes a Representation argument, handlePost does not. If anything, I'd argue for names

Re: HEAD not well supported?

2007-10-11 Thread Sean Landis
Jerome Louvel contact at noelios.com writes: ... It could also clarify things by renaming post(Rep.) to postRepresentation(Rep.) to be more consistent with getRepresentation(Variant) namine and to reduce the confusion with lower-level Uniform handle* methods. What do you think? What is

Re: HEAD not well supported?

2007-10-10 Thread Sean Landis
Erik Hetzner erik.hetzner at ucop.edu writes: At Mon, 8 Oct 2007 17:35:00 + (UTC), Sean Landis sean.landis at gmail.com wrote: [...deleted...] I'd say that Restlet meets the requirements of the spec and that's good. Although I still think it would be better to leverage Uniform

Determining preferred media type from browsers

2007-10-10 Thread Sean Landis
When a request from a browser to a Restlet application is processed, the request will have many accepted media types. It appears that Restlet scores the accepted media types to prefer APPLICATION_XML and TEXT_XML over TEXT_HTML. This makes it difficult to have a resource support TEXT_HTML and

Re: HEAD not well supported?

2007-10-08 Thread Sean Landis
Jerome Louvel contact at noelios.com writes: Hi all, I'm a bit late in the discussion it seems :) Let me try to explain how the support for HEAD was designed in Restlet. Following the definition of HEAD from the HTTP spec [1], I got convinced that HEAD was only a special GET and

Re: [docs] Poll for participation and input.

2007-10-08 Thread Sean Landis
Marc Portier mpo at outerthought.org writes: Some of my TOC additions embedded, feel free to comment... (incorporated the suggestions from issue 21 and those made in this thread already) I also added a big section on doing reslet based development as I think there is a big difference

Re: Thread-safety in Guard

2007-10-08 Thread Sean Landis
Funny you should ask! I can highly recommend Java Concurrency in Practice by Brian Goetz, Josh Bloch, Joe Bowbeer, David Holmes, Doug Lea, and me (Tim Peierls). My recommendation is probably biased by the fact that I helped write it, but we've had a lot of good feedback. --tim It is a great

Re: HEAD not well supported?

2007-10-05 Thread Sean Landis
In Summary... It sounds like folks are in agreement that HEAD is not properly supported but I haven't heard from Jerome or Thierry, etc. What do you guys think?

Re: [docs] Poll for participation and input.

2007-10-05 Thread Sean Landis
Jerome Louvel contact at noelios.com writes: Hi Sean, Thanks for proposing to give a hand. Also, I'd like to share again the links in Marc's email as they didn't get recognized in my email client: [1] http://restlet.tigris.org/servlets/ReadMsg?listName=discussmsgNo=3063 [2]

Re: HEAD not well supported?

2007-10-03 Thread Sean Landis
So is HEAD too obscure to garner any interest? Sean

Re: HEAD not well supported?

2007-10-03 Thread Sean Landis
John D. Mitchell jdmitchell at gmail.com writes: On 10/3/07, Sean Landis sean.landis at gmail.com wrote: So is HEAD too obscure to garner any interest? I think it's probably a good default to have allowHead == true and default to having handleHead() call handleGet() but head should

Re: HEAD not well supported?

2007-10-03 Thread Sean Landis
Erik Hetzner erik.hetzner at ucop.edu writes: I don’t understand what the issue is here? Can you not override handleHead? Yes you could but there's already a programming model for dealing with HTTP methods. One could argue handle*() methods could be final for example. Why exclude HEAD from

Re: HEAD not well supported?

2007-10-03 Thread Sean Landis
Erik Hetzner erik.hetzner at ucop.edu writes: Are you saying there's some place in Restlet where the entity is striped out in the case of HEAD? You might be right, although I didn't see it. Regardless, that makes unreasonable assumptions about the intent for HEAD. I don’t know; it just

HEAD not well supported?

2007-10-01 Thread Sean Landis
I was implementing HEAD on a resource and couldn't figure out how to do it so I looked at the source for Resource.handleHead() and was surprised to see it calls handleGet(). My understanding of HEAD is that it provides all but the entity. That seems to imply that that getRepresentation() needs to

Re: issue with org.restlet.Client

2007-09-05 Thread Sean Landis
Nicolas ncapdevila at overstock.com writes: [...all deleted...] Does anyone have any ideas on this? This seems like a serious bug but we are not able to figure it out. Any help appreciated. Sean

1.1 milestone confusion

2007-08-31 Thread Sean Landis
I followed the link recently posted to the roadmap. I was surprised to find that the 1.1m1 milestone page does not include issue 289 for JaxbRepresentation. Examining the issue though, shows it is targeted for 1.1m1. Not sure why the discrepancy but I thought someone would like to know.

Re: Problem building Restlet source

2007-08-29 Thread Sean Landis
Thierry Boileau thboileau at gmail.com writes: Hello, Thanks Sean and Alex for reporting and contributing. I've integrated the patch and fixed another compilation pb with the wadl extension. After some tests, the entire build script seems ok. best regards, Thierry Boileau Hi

Re: Problem building Restlet source

2007-08-29 Thread Sean Landis
Thierry Boileau thboileau at gmail.com writes: Hi Sean, actually, I think I have to read your post... best regards, Thierry Boileau To clarify, this is related to my last entry in issue 289 about throwing exceptions. Sean

JaxbRepresentation.getObject swallows exceptions

2007-08-24 Thread Sean Landis
In 1.1 beta, the implementation of JaxbRepresentation.getObject swallows exceptions. This is a critical error because callers have no way of responding to errors in the XML passed in, even if an ValidationEventHandler is used. The caller will go along assuming there's no problem until it tries to

Re: Problem building Restlet source

2007-08-24 Thread Sean Landis
Alex, Thanks for the patch. Unfortunately the build appears to be in a very bad state. A unit test fails, so I had to run the rest of the targets by hand. The resulting distro doesn't work at all.

POST w/o an entity not allowed?

2007-08-01 Thread Sean Landis
We are creating a web service as follows: http://host/inventoryManager/{product_id}?adjust={n} This will adjust inventory for a particular product. RESTfully, this should be a POST. We have all the scoping info in the URI in a form recommended by RESTful Web Services in the case of an

Re: POST w/o an entity not allowed?

2007-08-01 Thread Sean Landis
Adam Taft adam at adamtaft.com writes: [... deleted ...] I'm assuming you're using a web browser client, because an adjustment to an existing resource would imply PUT, right? But, as we know, PUT/DELETE sucks on web browsers. The operation is not idempotent so it cannot be PUT.

Re: POST w/o an entity not allowed?

2007-08-01 Thread Sean Landis
Jerome Louvel contact at noelios.com writes: This is indeed an edge case, but there isn't anything in HTTP spec that prevents you from POSTing without an entity. I've changed the Resource class to accept those requests, just logging a trace (FINE level) for debugging purpose. As it is an

Re: Passing Objects

2007-07-06 Thread Sean Landis
Caroline Grima carolineg at ccbilleu.com writes: Is there a way to pass complex objects and ints from the client to a restlet? Thanks. Caroline Hi Caroline, The typical way in web services is to marshal objects into an XML structure and then unmarshal them on the server. There are many

Re: Proposal for ResourceFactory

2007-07-06 Thread Sean Landis
Hi Jon, Jon Lachelt jon.lachelt at hp.com writes: I would like to propose an enhancement to the Router class. I’ll start by admitting that I am fairly new to the RESTlets API and to this forum. A proposal similar to this may have been discussed already, or I may be missing something in

Re: Proposal for ResourceFactory

2007-07-06 Thread Sean Landis
BTW, the seach field is in the lower left corner of he Gmane page. Regards, -Jon Boy, do I feel silly :-) Really, thanks. Sean

Restlet developers wanted

2007-07-06 Thread Sean Landis
With permission from Jerome, I am posting a job opportunity. Overstock.com is looking for people with strong Restlet experience. We have several Senior Developer positions and one Architect position open. This is your chance to leverage your special ability in Restlet to build sophisticated

Re: Second 1.1 beta 1 snapshot

2007-07-02 Thread Sean Landis
- Added JAXB 2.0 and StAX 1.0 libraries. Hi Jerome, Is there a reason that JAXB 2.1.3 wasn't used? Thanks, Sean

Re: Commons Logging

2007-05-25 Thread Sean Landis
... Sean Landis, if you're reading this, could you possibly give more details about your JdkLoggingToLog4jBridge solution?? Maybe this information could be appended to the RFE? Oh no, I've been discovered! Our legal has loosened up a bit lately. I've posted JdkLoggingToLog4jBridge.java

Re: Passing data on requests

2007-05-10 Thread Sean Landis
What kind of identifiers..? Credentials? Unique client ID and unique call id. Sean

Passing data on requests

2007-05-02 Thread Sean Landis
I have a need to pass a couple of identifiers along with requests of every method type (GET, PUT, DELETE, POST). Is there a recommended way to do this? Thanks, Sean

Re: Passing data on requests

2007-05-02 Thread Sean Landis
Sean Landis sean.landis at gmail.com writes: I have a need to pass a couple of identifiers along with requests of every method type (GET, PUT, DELETE, POST). Is there a recommended way to do this? I should add these requirements. The service needs to be called from both Java and C/C++. So

WADL Restlet

2007-04-27 Thread Sean Landis
I'm posting for two reasons. First, can people share what good (or bad) they see in WADL; what it is good for. Second, what, if any, relationship would make sense for Restlet and WADL? Thanks, Sean

Re: Example using XmlRepresentation?

2007-04-18 Thread Sean Landis
Jared Nedzel jnedzel at broad.mit.edu writes: Sean: I've been meaning to take a closer look at JAXB. Is your code open-source by any chance? Jared, I'm afraid not, but it is pretty straightforward. The JaxbRepresentation does just what the DOM rep does. If given an xmlRep in construction,

Re: Defining Methods

2007-04-12 Thread Sean Landis
-Message d'origine- De : news [mailto:news at sea.gmane.org] De la part de Sean Landis Envoyé : jeudi 12 avril 2007 00:55 À : discuss at restlet.tigris.org Objet : Defining Methods Restlet has the ability to define our own Methods, say MOVE, or CANCEL. I'm in a debate

Re: Bug in bookmark example

2007-03-15 Thread Sean Landis
Hi Thierry, Thierry Boileau thboileau at gmail.com writes: Hello Sean, the example code has been updated in the SVN repository. Thanks for reporting this issue. I think there is still a bug. Try adding a user and two bookmarks. Shutdown the server and then restart it. One of the

VirtualHost JavaDoc

2007-03-08 Thread Sean Landis
I noticed the javadoc for the VirtualHost class talk about regular expression matching. Isn't URI Template matching done now? It would also be helpful to explain what hostRef, resourceRef, and serverInfo are. Sean

Re: Newbie question on the Resource changes in RC3

2007-01-26 Thread Sean Landis
Hi Jerome, Jerome Louvel contact at noelios.com writes: Hi again, To facilitate the creation of Finder subclasses, I've exposed the resourceClass property with a getter. I've also extracted the Resource creation logic from Finder.findTarget() into a Finder.createResource() method. By

Re: Newbie question on the Resource changes in RC3

2007-01-26 Thread Sean Landis
Hi Jerome, Hi Jerome, Jerome Louvel contact at noelios.com writes: Hi again, To facilitate the creation of Finder subclasses, I've exposed the resourceClass property with a getter. I've also extracted the Resource creation logic from Finder.findTarget() into a Finder.createResource()

Re: Newbie question on the Resource changes in RC3

2007-01-26 Thread Sean Landis
Why does Router insist on instantiating a Finder anyway? Finders aren't instantiated on a per call basis. Why not just allow to set the Finder instance in the router? Sean

RC4 bug in create*

2007-01-26 Thread Sean Landis
I think there is a bug in Finder.createResource() and Router.createFinder(). Both have some code like this: try { constructor = getTargetClass().getConstructor(Context.class, Request.class, Response.class); if (constructor !=

Re: Newbie question on the Resource changes in RC3

2007-01-25 Thread Sean Landis
Hi Jerome, Jerome Louvel contact at noelios.com writes: Hi all, Thanks for exploring this recurring issue. I realize that the current approach isn't flexible enough in many case. So, I have restored the default constructor and added a new 'init(Context, Request, Response) method that

Re: Newbie question on the Resource changes in RC3

2007-01-25 Thread Sean Landis
Hi Jerome, Jerome Louvel contact at noelios.com writes: Thanks for detailing your requirements with concrete code. I think you can already cover your need for application level state (shared by all Resources and Restlets) by leveraging Context's attributes: I considered that and looked for a

Re: Newbie question on the Resource changes in RC3

2007-01-25 Thread Sean Landis
A couple other notes about the idea of a Application-defined ResourceFactory. It must be thread-safe. It provides inversion of control. It allows me to decide policy regarding Resource allocation (one-per-call, thread-safe stateless, singleton, pooling, etc). The more I think about it, the more

Re: Problem with multiple virtual hosts

2007-01-24 Thread Sean Landis
constructor that accepts a File because File construction will fail fast and in the application code. Sean public static final String JAR_URI = //home/slandis/restlet-1.0rc3/lib/org.restlet.jar; Best regards, Thierry Sean Landis a écrit : Pardon, It did sort of work... When I selected

Problem with multiple virtual hosts

2007-01-23 Thread Sean Landis
I wanted to set up something like is shown in the tutorial component diagram where there are VirtualHost A and B and Application 1, 2, and 3. I'm using RC3 and my code looks like this: public class ComponentServer { public static final String DOC_URI

Re: Problem with multiple virtual hosts

2007-01-23 Thread Sean Landis
Thierry Boileau thboileau at gmail.com writes: Hello Sean, did you try to set the status after setting the entity of the response? Best regards Thierry Hi Thierry, I just tried that without success. I added: response.setStatus(Status.SUCCESS_OK); after setting the entity.

Re: Problem with multiple virtual hosts

2007-01-23 Thread Sean Landis
Pardon, It did sort of work... When I selected http://wasatch:8182/jar I got a download dialog but: 1) the name of the file was jar, not org.restlet.jar, 2) The file that gets 'downloaded' is empty. Sean

Re: Struggling with recent changes

2007-01-18 Thread Sean Landis
Thanks Vincent, Your explanations helped. I like the expansion of the role of Resource. Sean

Struggling with recent changes

2007-01-17 Thread Sean Landis
I seem to have missed something fundamental regarding the recent changes. It now appears one must create a Resource to handle the dispatching of post, etc. We have several web services that previously dispatched to a Handler that implemented handlePost. I am unclear what to do with this

Re: Using Virtual Hosts

2006-12-28 Thread Sean Landis
Jerome Louvel contact at noelios.com writes: Hi Jerome, Hi all, In addition to Thierry answer, I would like to indicate that a virtual host is defined along three properties: - request's hostRef (equivalent to HTTP's Host header) - request's resourceRef (equivalent to HTTP's resource

Bug in Directory handler

2006-12-28 Thread Sean Landis
I found a bug in the Directory handler. It generates correct XML for the top level items, but if you click on a directory in a browser, then next level links are unusable. Here's what's generated by clicking on the 'jmx' link: htmlbody h1Listing of directory /jmx/h1 a

Server warning

2006-12-05 Thread Sean Landis
I'm seeing a warnding from the server that I can't figure out how to get rid of: Dec 5, 2006 2:57:03 PM com.noelios.restlet.http.HttpServerCall parseHostWARNING: Couldn't find the mandatory Host HTTP header. I'm using ServerServlet if that matters. Thanks, Sean

Re: Connection reuse again

2006-11-28 Thread Sean Landis
Jerome Louvel contact at noelios.com writes: Hi Sean, No problem, the support of Apache HTTP Client was needed anyway. To test the other connector, you just need to replace the com.noelios.restlet.ext.httpclient_3.1.jar file by the com.noelios.restlet.ext.net.jar one in your

Connection reuse again

2006-11-27 Thread Sean Landis
I am using the new apache http client and I'm seeing strange behavior. I am sending 50 messages to the server in rapid succession. Using the 'ethereal' tool, I examined the TCP traffic. What I saw was that occasionally the connection would get reused once, that is, two calls would occur before

Re: Connection reuse again

2006-11-27 Thread Sean Landis
Sean Landis sean.landis at gmail.com writes: I am using the new apache http client and I'm seeing strange behavior. I am sending 50 messages to the server in rapid succession. Using the 'ethereal' tool, I examined the TCP traffic. What I saw was that occasionally the connection would get

Re: C++ clients?

2006-11-22 Thread Sean Landis
Jerome Louvel contact at noelios.com writes: Hi Sean, Maybe I'm not understanding your question correctly. A Restlet container communicates with other components using connectors (like HTTP servers). So, if your C++ clients can use a normal HTTP client library, it should work fine.

FAQ and examples error?

2006-11-16 Thread Sean Landis
It looks like an example might require updating. In the FAQ I see: 5. How can I get the raw HTTP headers if I really need to? Even though the org.restlet.data.Request and org.restlet.data.Response classes provide a convenient and protocol-neutral way to manipulate the information contained in

Re: Keeping a client connection open

2006-11-13 Thread Sean Landis
Hi Jerome, Jerome Louvel contact at noelios.com writes: Other thoughts? I think your suggestion is a good one. Thanks, Sean

Re: Keeping a client connection open

2006-11-10 Thread Sean Landis
Hi Jerome, Hi Sean, I would have expected the other behavior as the JDK keeps HTTP connections alive by default. There is a system property to change this behavior, you may want to play with it and see what happen: http.keepAlive (default: true)

Keeping a client connection open

2006-11-09 Thread Sean Landis
I noticed that using a Client, that the connection is opened and closed for every call. I have a web service client that would like to hold the connection open across a series of requests. I can't see how to do that. I'm using the ServerServlet, in case that matters. Thanks, Sean

Re: Handlers for search urls

2006-11-03 Thread Sean Landis
Hi Vincent, Vincent vincent.lari at yahoo.ca writes: Hi Piyush, /accounts/search/less_than/1 /accounts/search/greater_than/1 /accounts/search/between/1/2 The issue I have with this approach is that it doesn't allow to mix several search criteria

Address already in use (b19)

2006-10-25 Thread Sean Landis
I am having trouble transitioning to b19. I am using the ServerServlet to integrate with Tomcat. I have a class that extends Application and has the following: public JDomApplication(Context context) { super(context); } @Override public Restlet createRoot() { // Create our

Re: Beta 19 and fluent builders

2006-10-11 Thread Sean Landis
Dave Pawson dave.pawson at gmail.com writes: and maintainability are very important. We use the fluent style in other projects it has served us well. It seems to resonate here. May I suggest this is a personal preference too? Absolutely. After all, style is it's last name. ;-) Sean

Re: Breaking Call into Request and Response (Was: Allow Header)

2006-10-06 Thread Sean Landis
Hi Jerome, Jerome Louvel contact at noelios.com writes: Hi Sean, I've just checked in SVN the modification for Call split and Allow support. All unit tests pass but I haven't done thorough testing. Also Servlet adapter is still broken. My work depends on the Servlet adapter but I

Re: Breaking Call into Request and Response (Was: Allow Header)

2006-10-05 Thread Sean Landis
Jerome Louvel contact at noelios.com writes: Hi all, I share the same concern as Piyush. There are now about 34 methods in the Call class, corresponding to about 20 properties. ... If there is no major opposition, I will try to integrate this change to beta 19. Any comment? I'm

Re: Handling PUT, POST and DELETE

2006-10-04 Thread Sean Landis
I appreciate the fact that Resources can delete themselves and that makes sense when a resource isn't a participant in a containment hierarchy. Likewise, support for containment of resources is important because many resources are modeled that way. Locking into one or the other is too limiting.

Re: Surprising interaction between Call status and output

2006-10-03 Thread Sean Landis
-Message d'origine- De : news [mailto:news at sea.gmane.org] De la part de Sean Landis Envoyé : vendredi 29 septembre 2006 20:40 À : discuss at restlet.tigris.org Objet : Surprising interaction between Call status and output I have a web service (under Tomcat using

Converting a DomRepresentation to StringRepresentation

2006-08-28 Thread Sean Landis
I have an application that contains a filter that converts incoming XML into a DomRepresenation so that it can be manipulated later as a document. Then, on the return, a document comes to the afterHandler() and I want to transform that into XML to return to the client. How do I easily get the