简体   繁体   English

Google App Engine和Restlet

[英]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. 我一直在尝试修改此示例,以确定Restlet是否可以与Google App Engine配合使用以满足我的需求。 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 这将返回null

 Contact contact = resource.retrieve()

but this returns the expected json string 但这会返回预期的json字符串

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

It won't return the object but it will return the json. 它不会返回对象,但是会返回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 如果很重要,我用来测试的客户端是jsf,其中包含以下jar

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

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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