Hi,
I seem to have stumbled across a problem with Client. I am using the
following code to talk to my restlet application
Client client = new Client(Protocol.HTTP);
Response response = client.post(url, objrep);
logger.info(The response from the post is +
This is much cleaner than what I have done, which was simply to create
an instance of an Application class in the
FrameworkServletinitFrameworkServlet method and then to set the
application as the target of the converter in the doService method.
init
=
application = new MyApplication(
Adam,
I came across the same problem and I believe the problem is more around
not setting the response status code on failure.
cheers
/jima
Adam Taft wrote:
Here's a test case to look at...
public class TestClass {
public static void main(String[] args) {
try {
Irfan/Thierry,
I was just wondering whether you could explain why start() is always
called in the RestApplication.handle method, which is shown below.
try {
start();
} catch (Exception ee) {
ee.printStackTrace();
}
super.handle(request, response);
cheers
/jima
Jim Alateras wrote:
This
Jim,
This has to do with what I noticed about the Client eating exceptions.
Basically, what's happening is that some of the Client methods, like
handle(), wrap certain exceptions in order to log them. However, they
don't rethrow the exceptions.
So, if you pass in a dud URL like you
The biggest concern for me is that IOException is being eaten in the
client. So, for example, an illegal url or a host not found error is
being trapped, logged and then no other error is being thrown. Yuck.
There's no appropriate status code which can model a host not found
exception,
Adam Taft wrote:
The biggest concern for me is that IOException is being eaten in the
client. So, for example, an illegal url or a host not found error is
being trapped, logged and then no other error is being thrown. Yuck.
There's no appropriate status code which can model a host not
7 matches
Mail list logo