Re: Restlets in gwt with json

2012-10-26 Thread Xavier Méhaut
Hi Thierry I looked at your example, and actually the code differs from mine. Here is my code to mimic the client code : @Put(json) public void put(JsonRepresentation loginRep) throws JSONException { JSONObject loginElt = loginRep.getJsonObject();

Re: Restlets in gwt with json

2012-10-26 Thread Xavier Méhaut
and the current code is like this one : @Post() public void post(StringRepresentation loginRep) throws JSONException { Utilisateur user = (new Gson()).fromJson(loginRep.getText(), Utilisateur.class); } 2012/10/26 xavier.meh...@free.fr xavier.meh...@free.fr Hi

RE: Re: Restlets in gwt with json

2012-10-26 Thread Thierry Boileau
Hello Xavier, your code works for me also using the RC6 or 2.1.0 release. I've updated my sample project, with several ways to do the same thing. I hope this will help you. Best regards, Thierry Boileau --

Restlets in gwt with json

2012-10-22 Thread Xavier Méhaut
Hello, I usually transmit objects between client and server, but today I want to transmet json data :) I've no problem with a GET, but I've the following error *(org.restlet.client.data.Status) Unsupported Media Type (415) - Unsupported Media Type* when I try to do a PUT (or a POST)... Here