使用Google AppEngine创建Java Web服务
我试图创建一个简单的Web服务应用程序,我可以检索字符串集合并将它们存储到AppEngine服务器上的数据存储中。
I'm trying to create a simple web service application where I can retrieve a collection of strings and store them into a data store on the AppEngine server.
I在Java中有知识,几乎没有任何有关Java Servlets及其WAR标准的知识。
I have knowledge in Java and barely any knowledge of Java Servlets and its WAR standards.
我想至少对如何使用Java创建Web服务有一些指导技术AppEngine提供。我已经搜索过,但文章稀疏而且太冗长,而没有提供任何简单的解决方案。
I would like to at least have some direction on how to create a web service using the Java technology AppEngine provides. I've searched but the articles are sparse and too lengthy while not providing any simple solutions.
如果我可以使用Java的注释创建Web服务,就像你可以在.NET中使用属性一样。
I'd love it if I can create a web service using Java's annotations just like you can do in .NET with attributes.
我很感谢文章和指南的链接,不需要完整的源代码,但是我们将不胜感激。
I'd appreciate links to articles and guidance a full source answer is not required but would be appreciated.
没有基于python的答案。
No python based answers please.
使用Java在GAE上构建Web服务。
IMO, there is no simple solution to build a Web Service on GAE with Java.
但是,它仍然可以实现。让我们从我们想要构建的 Web服务开始。
But, it's still achievable. Let's start with the Web Services we want to build.
通常使用的术语是指
客户端和服务器,它们通过Web上使用的超文本传输协议
(HTTP)协议传达
。这些
服务倾向于分为两个
阵营中的一个: Big Web Services 和
REST风格的Web服务。 b $ b
Big Web Services使用SOAP / RPC格式,而RESTful Web Services使用REST风格。您可以阅读有关SOAP与REST的更多信息。
"Big Web Services" use SOAP/RPC format and RESTful Web Services use REST style one. You can read more about SOAP vs REST.
有很多 Java开源Web服务框架。它们中的大多数通常基于Java Web服务的Java API(JAX-WS),它是Java EE平台的一部分。
列表中指定的不受支持 /将它发挥在应用程序引擎rel =noreferrer>它会在App Engine中发挥作用吗?因此,忘掉酷Java的注释。
There are lots of Java open source Web Services frameworks out there. Most of them are generally based on the Java API for XML Web Services (JAX-WS), part of the Java EE platform. JAX-WS is not supported by Google App Engine as specified in the list Will it play in App Engine. So forget about the "cool Java's annotations".
但是,Restlet似乎与GAE兼容。因此,如果您认为REST可以成为您的选择,我会继续前进并查看 Hello Restlet世界教程。然后,我会继续阅读关于如何整合Restlet和GAE 。
But, Restlet seems compatible with GAE. So if you think REST could be an option for you, I would go ahead and take a look at the Hello World tutorial of Restlet. Then, I'd go ahead and read the article on how to integrate Restlet with GAE.