WebService与使用风格RPC/SOA/REST
WebService与使用风格RPC/SOA/REST? 一 webservice Web Services 可使您的应用程序成为 Web 应用程序。Web Services 通过 Web 进行发布、查找和使用。通过使用 Web Services,您的应用程序可以向全世界发布信息,或提供某项功能。 1) 什么是Web Services? ? 2)它如何工作? HTTP 协议是最常用的因特网协议。XML 提供了一种可用于不同的平台和编程语言之间的语言。 Web services 平台的元素: ? 3)工作过程,如图: ? 二 SOAP SOAP 是指简单对象访问协议(simple object access protocal)。 SOAP是基于 XML 的简易协议,可使应用程序在 HTTP 之上进行信息交换。或者更简单地说:SOAP 是用于访问网络服务的协议。 ? 1) 什么是 SOAP? ? 2)Why SOAP? 目前的应用程序通过使用远程过程调用(RPC)在诸如 DCOM 与 CORBA 等对象之间进行通信,但是 HTTP 不是为此设计的。RPC 会产生兼容性以及安全问题;防火墙和代理服务器通常会阻止此类流量。 通过 HTTP 在应用程序间通信是更好的方法,因为 HTTP 得到了所有的因特网浏览器及服务器的支持。SOAP 就是被创造出来完成这个任务的。 SOAP 提供了一种标准的方法,使得运行在不同的操作系统并使用不同的技术和编程语言的应用程序可以互相进行通信。 ? 三 WSDL WSDL 指网络服务描述语言 (Web Services Description Language)。 WSDL 是一种使用 XML 编写的文档。这种文档可描述某个 Web service。它可规定服务的位置,以及此服务提供的操作(或方法)。 ? 1) 什么是 WSDL? ? 四 UUDI UDDI 是一种目录服务,企业可以使用它对 Web services 进行注册和搜索。 UDDI,英文为 "Universal Description,Discovery and Integration",可译为“通用描述、发现与集成服务”。
?UDDI 指的是通用描述、发现与集成服务 UDDI 使用 WSDL 来描述到达 web services 的界面 ? 2)UDDI 的好处 在 UDDI 之前,还不存在一种 Internet 标准,可以供企业为它们的企业和伙伴提供有关其产品和服务的信息。也不存在一种方法,来集成到彼此的系统和进程中。 UDDI 规范帮助我们解决的问题: ?使得在成百万当前在线的企业中发现正确的企业成为可能
? 五?WebService的使用方式RPC/SOA/Rest ? 1) Remote Procedure Call( RPC ) (based on operation,by calling function or method) ? RPC Web services present a distributed function (or method) call interface that is familiar with many developers. Typically,the basic unit of RPC Web services is the WSDL operation. The first Web services tools were focused on RPC,and as a result this style is widely deployed and supported. However,it is sometimes criticized for not being loosely coupled,because it was often implemented by mapping services directly to language-specific functions or method calls. Many vendors felt this approach to be a dead end,and pushed for RPC to be disallowed in the WS-I Basic Profile. Other approaches with nearly the same functionality as RPC are Object Management Group's (OMG) Common Object Request Broker Architecture (CORBA),Microsoft's Distributed Component Object Model (DCOM) or Sun Microsystems's Java/Remote Method Invocation (RMI). ? 2) Service-oriented architecture(SOA) (based on message,by calling contract or interface) ? Web services can also be used to implement an architecture according to Service-oriented architecture (SOA) concepts,where the basic unit of communication is a message,rather than an operation. This is often referred to as "message-oriented" services. SOA Web services are supported by most major software vendors and industry analysts. Unlike RPC Web services,loose coupling is more likely,because the focus is on the "contract" that WSDL provides,rather than the underlying implementation details. Middleware Analysts use Enterprise Service Buses which combine message-oriented processing and Web Services to create an Event-driven SOA. One example of an open-source ESB is Mule,another one is Open ESB. ? 2)Representational State Transfer (REST)。(based on stateful resources) ? Representational State Transfer (REST) attempts to describe architectures which use HTTP or similar protocols by constraining the interface to a set of well-known,standard operations (like GET,POST,PUT,DELETE for HTTP). Here,the focus is on interacting with stateful resources,rather than messages or operations. An architecture based on REST (one that is 'RESTful') can use WSDL to describe SOAP messaging over HTTP,can be implemented as an abstraction purely on top of SOAP (e.g.,WS-Transfer),or can be created without using SOAP at all. WSDL version 2.0 offers support for binding to all the HTTP request methods (not only GET and POST as in version 1.1) so it enables a better implementation of RESTful Web services.[6] However,support for this specification is still poor in software development kits,which often offer tools only for WSDL 1.1. ? 六 参考 http://en.wikipedia.org/wiki/Web_service http://www.w3school.com.cn/webservices/index.asp http://en.wikipedia.org/wiki/Representational_State_Transfer? ? 完! (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- 从ensime运行sbt时scala – java.io.IOException?
- regex – 如何在bash脚本中使用正则表达式?
- webservice简单的编写,发布,掉用
- bootstrap 中关于 HTML5 aria-* and role的用法
- Angular不同版本对应的Bootstrap组件
- 2 counts of IllegalAnnotationExceptions
- 如何实现一个简单易用且可靠的消息队列框架?
- Angular 2中是否存在ngRepeat?
- webservices——cxf!!!
- angularjs – CreateProcess error = 193,%1不是有效的Win