RE: Re: Problems with hanging client calls
Hello Rickard, to my mind, this should be fixed by using the httpclient connector (or net also). Adding a connector to your application is explained here: http://wiki.restlet.org/docs_2.0/13-restlet/27-restlet/325-restlet/37-restlet.html In your case, just complete the classpath of your application with the archive org.restlet.ext.httpclient.jar, then add the archives of its dependencies (the jars are part of the Restlet delivery, in sub directory libraries): - apache commons codec - apache commons httpclient - apache commons httpcore - apache commons httpmime - jcip-annotations - apache commons logging - apache james mime4j Best regards, Thierry Boileau -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2650763
Use of ClientResource inside a server resource
Hello, I would like to know if we can use a ClientResource call inside a server resource, and if not, how to do this properly? regards Xavier -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2650619
Re: Problems with hanging client calls
We had the same issue when upgrading to restlet 2.0.0. Some links about the (I think) same issue: http://restlet.tigris.org/issues/show_bug.cgi?id=1053 andhttp://comments.gmane.org/gmane.comp.java.restlet/12273 It all boils down to calling the exhaust() method on the response representation (in a finally-block), which solves the problem. For some reason calling the release() method is not enough, and this 'exhaust' solves the problem. We asked a similar question on the list some days ago. We tried adding exhaust calls, but still see hangs. Btw, it should be enough to either fully read using BioUtils.copy *or* exhaust(), right? Also, only on response, not request, correct? That the way we understand it (and could solve our hanging client calls), yes. -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2650600
Wrong @Get method is called after negotiation
In my ServerResource impl (on official restlet 2.0.0 GAE edition) I've got two annotated methods: @Get(json) public Representation getJson() { ... and @Get(html) public Representation getHtml() { ... When testing the resource with: curl -v -H 'Accept: application/json' the result is that getHtml is called returning text/plain So it seems the annotaion/negotiation isn't working... what could be causing this? -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2650559