什么是web service

A Web service (also Webservice ) is defined by the W3C as "a software system designed to support interoperable machine-to-machine interaction over a network . It has an interface described in a machine-processable format (specifically WSDL ). Other systems interact with the Web service in a manner prescribed by its description using SOAP-messages, typically conveyed using HTTP with an XML serialization in conjunction with other Web-related standards."

简单的说就是通过接口技术来支持机器与机器之间的基于网络环境下的互操作。像CORBA,DCOM和EMI也可以实现类似的功能。

要理解Web service 还需要理解下列概念:

  • SOAP
  • WSDL
  • XML
  • XML schema language, like XML Schema(XSD), DTD
  • REST
  • SOA

实现Web service 有3中主流方式:RPC, SOA, REST。RPC因为不是loose coupling,现在用的不多。后两者都是loose coupling,采用HTTP作为传输层。SOA采用SOAP/WSDL组合,很多时候也用SOAP来称呼这种方;而REST将操作(operation)绑定HTTP标准操作上,如GET, POST, PUT, DELETE for HTTP),目前大有取代SOA的趋势。

 

那么就主要比较一下后两者的:

REST web services are:

  • Lightweight - not a lot of extra xml markup
  • Human Readable Results
  • Easy to build - no toolkits required

SOAP also has some advantages:

  • Easy to consume - sometimes
  • Rigid - type checking, adheres to a contract
  • Development tools

目前美国大的网络服务商都提供Web service ,如Amazon, Google, Yahoo!, Bing, eBay, Bestbuy等。

 

参考:

【1】http://en.wikipedia.org/wiki/Web_service

【2】http://en.wikipedia.org/wiki/SOAP_(protocol)

【3】http://en.wikipedia.org/wiki/Web_Services_Description_Language

【4】http://en.wikipedia.org/wiki/XML

【5】http://en.wikipedia.org/wiki/Xml_schema

【6】http://en.wikipedia.org/wiki/Representational_State_Transfer

【7】http://en.wikipedia.org/wiki/Service-oriented_architecture

【8】http://www.petefreitag.com/item/431.cfm

【9】http://www.ajaxonomy.com/2008/xml/web-services-part-1-soap-vs-rest

【10】http://www.prescod.net/rest/rest_vs_soap_overview/

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值