移动设备中的RESTful Web服务实现 [英] RESTful Web Services Implementations in Mobile Devices

查看:117
本文介绍了移动设备中的RESTful Web服务实现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对移动设备中RESTful Web服务的实现有几个疑问:

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

  1. 作为RESTful Web服务使用者的移动客户端:如何构建RESTful移动Web服务客户端和/或从移动设备使用远程RESTful Web服务?

  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 device?

我可以使用JSR311(又名JAX-RS)吗? 直接实现RESTful Web 移动设备中的服务?或者是 那里有任何类似JSR172或类似KSOAP的东西 用于移动中的RESTful Web服务 设备?

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?

任何详细的解释/讨论都将不胜感激!

Any detailed explanation/discussion is GREATLY appreciated!

推荐答案

我认为您是从SOAP背景来的REST WS.如果这是真的,那么您要做的第一件事就是忘记如何在SOAP中完成所有操作并简化所有操作.

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.

首先要记住的是,您不像在SOAP中那样消耗任何Web服务协定.因此,您没有WSDL.这意味着您无需使用任何WSDL或合同即可构建客户端代码.您只需手动创建对Web服务器的HTTP请求.每种语言都有自己的创建HTTP请求的方式,因此您必须咨询选择的平台以了解如何处理HTTP请求.

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.

这篇关于移动设备中的RESTful Web服务实现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆