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
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
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
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
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
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
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
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
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
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
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
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
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
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
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?
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]
So is HEAD too obscure to garner any interest?
Sean
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
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
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
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
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
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.
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
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
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
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.
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
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.
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
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
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
BTW, the seach field is in the lower left corner of he Gmane page.
Regards,
-Jon
Boy, do I feel silly :-)
Really, thanks.
Sean
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
- 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
...
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
What kind of identifiers..? Credentials?
Unique client ID and unique call id.
Sean
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
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
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
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,
-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
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
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
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
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()
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
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 !=
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
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
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
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
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
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.
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
Thanks Vincent,
Your explanations helped. I like the expansion of the role of Resource.
Sean
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
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
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
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
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
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
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
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.
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
Hi Jerome,
Jerome Louvel contact at noelios.com writes:
Other thoughts?
I think your suggestion is a good one.
Thanks,
Sean
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)
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
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
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
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
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
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
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.
-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
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
76 matches
Mail list logo