Hello Sebastian,
what version of GAE are you using?
As a side question, I wonder why you don't let the client specify it's
preferred kind of representation.
On the server side :
@Get
public SomeJsonObject get(){
return someJsonObject;
}
If your aplication contains at least, the jackson extension
(org.restlet.ext.jackson.jar + its "jackson" dependencies that are shipped
with the restlet distribution), the server is able to convert the object
using its converter.
If you add the gwt extension (not the *edition*) of any of these editions
(jse, jee, gae), your server is able to generate and deserialize
representations coming from the GWT client.
Did you have a look at this sample code?
http://wiki.restlet.org/docs_2.1/13-restlet/303-restlet.html
Having said that, I really don't understand why the server does not send the
Representation back.
What archives are located in the classpath?
Best regards,
Thierry Boileau
Hi Sebastian:
>
> I am using JsonRepresentation and it works just fine.
>
> Did you enable JSON by addding the variant in the constructor of your
> resource?
> getVariants().add(new Variant(MediaType.APPLICATION_JSON));
>
> And maybe your annotation should be @Get("json") as well.
>
> Hope that helps,
> Jason
>
> On Fri, Jun 3, 2011 at 6:24 AM, Sebastian Wenninger
> <[email protected]> wrote:
> > Hello Thierry,
> >
> > Thanks, i haven't tried it yet but im sure it will work now.
> >
> > However, since i added the new Snapshot to my Project, i don't get any
> > JsonObjects back with an JsonRepresentation...
> > My methods all look like this:
> >
> > @Get
> > public Representation get(){
> > JsonRepresentation response = new JsonRepresentation(SomeJsonObject);
> > getResponse().setStatus(Status.SUCCESS_OK);
> > return response;
> > }
> >
> > When called, all i get is an Empty page in my browser, not even empty
> curly
> > brackets.
> > Curl doesn't give me anything either.
> > The Status is correctly set, as well as the JsonRepresentation as the
> > Response's Entity though.
> > Any ideas?
> >
> > Best Regards,
> > Sebastian
> >
> > --
> > View this message in context:
> http://restlet-discuss.1400322.n2.nabble.com/IncompatibleClassChangeError-with-ConcurrentMap-tp6393712p6435505.html
> > Sent from the Restlet Discuss mailing list archive at Nabble.com.
> >
> > ------------------------------------------------------
> >
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2756740
> >
>
>
>
> --
> 907-360-1405
>
> ------------------------------------------------------
>
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2759614
>
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2759646