How to generate/catch a 404 error correctly?

2012-03-22 Thread Richard Berger
Designing some Junit tests and in one of those tests, a create a Commitment, then delete, then get it to make sure I get a 404. On the server side, the following code executes: public Representation get() { ... setStatus(Status.CLIENT_ERROR_NOT_FOUND, There is no record with id +

Re: How to generate/catch a 404 error correctly?

2012-03-22 Thread Richard Berger
[Solved] public Representation get(MediaType mediaType) throws ResourceException So I need to catch the ResourceException and examine the status (and that works just fine). -- View this message in context:

RE: Re: ConverterService behavior differs on GET and PUT

2012-03-22 Thread Jerome Louvel
Hi Michael, Is your conversion problem occurring for the request entity, or for the response one? In the former case, we have fixed a bug post-RC3 on this front. Could you try again with this snapshot and confirm? http://www.restlet.org/downloads/2.1/restlet-jee-2.1snapshot.zip Best regards,

RE: Expected application/x-java-serialized-object+gwt on redirect

2012-03-22 Thread Jerome Louvel
Hi Gabriel, This should work... Could you try this snapshot as it might have a fix? http://www.restlet.org/downloads/2.1/restlet-jee-2.1snapshot.zip http://www.restlet.org/downloads/2.1/restlet-gwt-2.1snapshot.zip Otherwise, we'll test your project and fix any remaining bug next week before 2.1

RE: Re: ConverterService behavior differs on GET and PUT

2012-03-22 Thread Michael Henderson
Jerome, I attempted to make use of this version without my customization to the JaxbConverter at it was unsuccessful. It returns to the previous error behavior attempting to parse the JSON submitted on Request as XML. Hi Michael, Is your conversion problem occurring for the request

Restlet client support (browser)

2012-03-22 Thread felipe
Hi, We have implemented our service API using RESTlet-JSON. Now we are building a website for mobiles and we are investigating different approaches to integration the client with the back-end services. I found http://wiki.restlet.org/developers/172-restlet/267-restlet/368-restlet.html And I

Re: Restlet client support (browser)

2012-03-22 Thread Thierry Templier
Hi Felipe, The JavaScript edition development is in progress but active and can be used. All core and main processing (Request/Response, ClientResource, content negotiation, header management) are implemented. However, if you find a feature you need, I'll be pleased to implement it in

Re: Restlet client support (browser)

2012-03-22 Thread Richard Berger
Felipe: I have used the Restlet-Javascript edition, although only in a test environment - and my use is probably pretty basic. Thierry has been very responsive in answering questions that I had (mostly my issues were about how representations were being negotiated). Good luck, RB -- View

Is there a way to get the response code from the annotated ClientResource?

2012-03-22 Thread Richard Berger
Given code like the following... ClientResource commentClient = new ClientResource(...); CommentsResource commentsResource = commentClient.wrap(CommentsResource.class); commentsResource.postCommentForm(form); is there a way to get the response code from the commentsResource? Currently I am