RE: POST method not working (Error 405)

2010-11-15 Thread Thierry Boileau
hello, it should work as described in your second mail... I send you two simple files (an Application and a ServerResource) that work for me with Restlet 2.0.3 and current 2.1 trunk. Best regards, Thierry Boileau --

POST method not working (Error 405)

2010-11-12 Thread webpost
I'm trying to submit a post request and have the current @Post annotation set in my handler class on the server. I'm getting an error 405 returned though stating that this method isn't allowed. Is the annotation the only thing I have to set or am I missing something? I'm using the post

RE: POST method not working (Error 405)

2010-11-12 Thread Thierry Boileau
Hello, could you give a little bit more details? What kind of client are you using, do you use some extensions of the Restlet framework? Best regards, Thierry Boileau --

RE: POST method not working (Error 405)

2010-11-12 Thread webpost
Here is a snippet of the client code: ... final Representation rep = form.getWebRepresentation(); ClientResource householdResource = new ClientResource(http://localhost:8080/REST/household;); final Representation representation = householdResource.post(rep); ... The code on the server looks

RE: POST method not working (Error 405)

2010-11-12 Thread webpost
FIXED the error by doing this: It seems my annotations aren't being picked for some reason so in the constructor for my resource handler I have added this code. // Declare the kind of representations supported by this resource. final SetMethod allowedMethods = new HashSetMethod();