Search code examples
javagoogle-app-enginerestlet

Google App Engine And Restlet


I've been tinkering with this sample trying to determine if restlet will work with Google app engine to meet my needs. It seems fairly straight forward so far but I've been stuck on something for a couple of hours now and would appreciate some help...

Client code

 ClientResource cr = new ClientResource("my_gae_url");
 ContactResource resource = cr.wrap(ContactResource.class);

This returns a null

 Contact contact = resource.retrieve()

but this returns the expected json string

 String s = cr.get(MediaType.APPLICATION_JSON).getText();

It won't return the object but it will return the json. I don't know if I'm missing a jar or I haven't implemented something or what

 I'm using Google Plugin 3.7 and app engine 1.7.2
 I'm using restlet app engine edition 2.0.15 
 The server includes the following jars org.restlet.jar, org.restlet.ext.gwt.jar,           
 org.restlet.ext.servlet.jar, org.restlet.ext.jackson.jar,
 org.codehaus.jackson.core.jar, org.codehaus.jackson.mapper.jar

If it matters the client i'm using to test things out is jsf with the following jars included

 org.restlet.jar, org.restlet.ext.net.jar

Solution

  • You need to add Jackson extension on the client side as well