简体   繁体   中英

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

您还需要在客户端添加Jackson扩展

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM