服务器javaEE技术
我想构建一个与 Android 手机通信的服务器
基于请求/响应模型 起初我以为我会使用 Httpservlets 并与 android 通信
通过 Http 消息。但我需要能够访问一个相当大的对象与每个
请求所以我想我无法真正将对象传输到 servlet。
所以我知道这是一个相当新的问题,但我已经搜索了好几天
我应该使用哪种java EE技术(我想到了EJB,但据我了解它们无法与android通信)?
提前致谢
I want to build a server that communicates with an android phone
based on a request/response model
At first i thought i will use Httpservlets and communicate with the android
by Http messages. but i need to be able to access a pretty big object with every
request so i guess i cant really transfer the object to the servlet.
so i know this is a pretty newbish question but iv'e been searching for days
what kind of java EE tech should i use(i thought of EJB but as i understand they cant communicate with android)?
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为正确的问题是如何为您的 Android 应用程序实现服务层:
基本上有两个选项:基于 REST 的 Web 服务和 SOAP。 Android 对 SOAP 的支持不够充分,我个人更喜欢 REST 而不是 SOAP。如果您决定使用 REST,那么您在 Java 中的选择是 Jersey、RESTlets 或 Spring Rest 服务。我更喜欢 Jersey,但您也可以查看 Spring(尽管不严格抱怨 JSR)。
(注意:查看“SO”以比较 Java 中各种基于 Rest 的框架)
I think the right question is how to implement service layer for your android application:
Basically there are two options REST based web services and SOAP. Android's support for SOAP is inadequate and I personally prefer REST over soap any day. If you have decided to go with REST, your options in Java are Jersey, RESTlets or Spring Rest services. I will prefer Jersey, but you can also look in to Spring ( although not strictly complaint with the JSR).
(note: look in "SO" for comparison on various rest based frameworks in Java)