开发者

RESTful Web Services Implementations in Mobile Devices

I have several questions around the implementations of RESTful web services in mobile devices:

  1. Mobile client as a RESTful web service consumer: How can I build a RESTful mobile web service client and/or consume a remote RESTful web service from a mobile dev开发者_如何学JAVAice?

  2. Can I use the JSR311 (aka JAX-RS) directly to implement RESTful web services in mobile device? or is there any JSR172-like or KSOAP-like for RESTful web service in mobile devices?

  3. Mobile host as a RESTful web service provider: is there any way I can host RESTful web services in a mobile device; can I use any of the existing RESTful frameworks (ie. Jersey, RESTlet, RESTeasy and/or Apache Wink) to do so; if not what would be the suitable light-weight HTTP servlet containers and light-weight parsers that I use for providing RESTful web services from a mobile device.

Any detailed explanation/discussion is GREATLY appreciated!


I would reckon you are coming to REST WS from a SOAP background. If that is true then the first thing you have to do is forget how you did everything in SOAP and simplify everything.

First thing to keep in mind is that you don't consume any web services contract like you do in SOAP. So you don't have a WSDL. That means you do not consume any WSDL or contract to build client code. You simply have to create HTTP requests to the web server by hand. Every language has it's own way to create HTTP requests, so you have to consult your platform of choice on how to craft HTTP requests.

Not as detailed as you hopped I guess but should trigger a discussion.


Providing a web-service from a mobile device is not a good idea because it will drain battery very fast. You can check this if it helps

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜