Web service standards: SOAP, REST, OData, and more
Web service standards: SOAP, REST, OData, and more
So far, we've covered the components of a web service, the messaging format and transport protocols. But in the eye of the developer, the development manager, and the IT professional,the real choice you end up making is in choosing a web service standard. The most common standards you might hear about are SOAP, Rest and Odata and you might hear a lot of debateabout which one is best. It can turn very quickly into an impassioned argument but it's best just to understand these terms and how they work as I previously described, SOAP is strictly speaking a message format.
An XML based markup language with a very specific set of tags, attributes and supported data types. The introduction of SOAP in the late 1990s Triggered the broad spread use of web services in all sorts of applications. And led to the new buzz phrase, Service Oriented Architecture or SOA. Microsoft led the charge in late 2000 with its SOAP Toolkit 1.0. And distinguised SOAP the message format From the underlying software, by giving it a cute name and acronym. Remote object proxy engine, meaning the developers were being asked to work with SOAP on a rope.
Developers who used SOAP based services, don't need to deal directly with the underlying XML messages. Instead they call functions, known as operations, that are defined by the service they're using. The resulting code in a client-side application can look almost exactly like a function they might call in their local client environment. The translation of outgoing requests and incoming responses is handled by the underlying SOAP library implementation.
Typically, you'll have one implementation on the client and one on the server. I'll dive into the technical details of SOAP in a later chapter of this course. But, its enough to say here, that in the early 2000s, SOAP was the dominant web services standard. Both client and server implementations were delivered for nearly all popular programming languages and application platforms, and web service repositories became commonplace.
You could easily look up a service use it freely, or sign up for a web service subscription and use it in your application. SOAP's major downside is in its verbocity. Its request and response messages are encoded in a plaint text XML with a lot of attributes and annotations and, as a result, its messages simply require more text than slimmer message formats, such as JSON.
Also, the engines that are required to do the creation and parsing of SOAP messages are of varying quality. And the developer has to trust the libraries to do the right thing, work efficiently and quickly and translate everything from XML to native data types and back again. For developers who like to know exactly what's happening at run-time this is all a little too high level. And so sometime in the mid 2000s much of the web services world started moving towhat are known as RESTful web services The term REST, which stands for Representational State Transfer, was defined around the same time as SOAP by a fellow named Roy Fielding, who was also one of the principal authors of the HTTP specification.
But REST took a bit longer to gain traction in the computing world. REST requirements are lighter weight than those of SOAP, and only require that such services use simple HTTP request response messaging. REST is an architecture, not a specific web service messaging format, and it's wrapped around the concept of HTTP methods or verbs. As I've previouslydescribed in HTTP not all requests are equal.
A get request is different from a post request. And put and delete requests can also have their own meaning. RESTful services can exploit these differences. Translating them into specific server side actions. All you need is a client that's capable of forming and sending the requests, which are typically in the form of URIs. Uniform Resource Identifiers. Unlike SOAP, RESTful services don't all use the same message format.
One service might return data in a XML based language such as RSS or Atom. Or in a custom XML language designed for a particular business process. Or for the sake of speed and efficient use of bandwidth. It might encode it's data in Java script object notation, JSON. There are other constraints and the REST standard. RESTful services are by definition stateless.Meaning that each request response conversation stands on its own.
Also for the sake of improving performance RESTful services can be cacheable. So if its server side resources don't have to be exercised on each and every request. Over the past half decade As developers have shifted their focus to building applications for mobile devices, such as cell phones and tablets, speed and message size have become critical factors in decided how to implement or select a web service. Mobile devices have less storage than desktop computers, and cell phone users pay by the megabyte for the bandwidth they consume.
Due to it's verbosity and resulting size, SOAP isn't well suited to the mobile world. Instead, web services using JSON message notation are increasingly popular in the mobile development world. But, SOAP's robust data typing and web service everything's deep set of standards relating to security. Interoperability and IT management continue to make it appealing for use in large scale computer environments. Where network bandwidth and storage aren't at so high a premium.
The third standard I'll cover in depth in this course, is named OData. OData is based on REST. And shares many of its characteristics. Just as with any RESTful architecture, you sendOData requests in the form of URIs, or Uniform Resource Identifiers. And get data back in a parsable form. But, like SOAP, OData has a strict set of formatting and element naming rules.As with SOAP based libraries, OData enabled software and libraries hide the nuts and bolts of serializing and de-serializing messages from the developer, making it, in many cases, easier to code.
And while the original OData specification Said that response messages would always be in the form of XML known as Atom. The more recent versions of OData allow developers to receive JSON formatted messages as well. While OData started as a Microsoft proprietary technology, its now open source and is supported by many languages and platforms. There are other standards and buzz words in the web services world that are worth knowing about.
These include XML-RPC for XML Remote Procedure Call. This is a standard that precedes itself which can encode fewer data type than SOAP. But it is also a little more slender than SOAP as well. There's UDDI, or U-D-D-I, Universal Description Discovery and Integration. And WSDL, or W-S-D-L, Web Service Description Language, which are used to describe SOAP-based services UDDI is used to make them discoverable.
And WSDL to make them usable. There's also WSDM. Web Services Distributed Management.A standard for managing and monitoring the status of other services. And there's the WS asterisk, or web services everything group of standards. There are literally dozens of these standards. They start with WS dash and then are followed by some words that describe what they do. These standards are managed by an organization named The Web Services Interoperability Organization.
Available at www.ws-i.org The web service standards describe XML based languages for managing business processes and transactions, security, reliability and management. In this course I'll focus on these three major standards, SOAP, REST and ODATA and mention some of the other standards along the way. And at the end of the course, I'll offer some resources for further investigation, so you can learn more about the standards that matter to you.
Web service standards: SOAP, REST, OData, and more的更多相关文章
- 使用TcpTrace小工具截获Web Service的SOAP报文
Web Service客户端对服务端进行调用时,请求和响应都使用SOAP报文进行通讯.在开发和测试时,常常查看SOAP报文的内容,以便进行分析和调试.TcpTrace是一款比较小巧的工具,可以让我们截 ...
- 建立自己的Web service(SOAP篇)
1.简介 这篇文章主要介绍采用SOAP来建立以及访问Web service接口. Web service是一个平台独立的,低耦合的,自包含的.基于可编程的web的应用程序,可使用开放的XML(标准通用 ...
- Web Service之Soap请求响应内容中文编码解密
java模拟Soap请求测试Web Service接口,发现Web Service响应内容中的中文竟然是编码格式.比如: 中文:退保成功 Soap中文编码:退保成功 我仔细分析后发现,退编码实际上 ...
- 几种远程调用接口协议简单比较和web service(SOAP)与HTTP接口的区别:
什么是web service? 答:soap请求是HTTP POST的一个专用版本,遵循一种特殊的xml消息格式Content-type设置为: text/xml任何数据都可以xml化. ...
- ASP.NET Web Service 标准SOAP开发案例代码(自定义验证安全头SOAPHeader)
using System.Xml;using System.Xml.Serialization;using System.Web.Services.Protocols;using System.Con ...
- wsse:InvalidSecurity Error When Testing FND_PROFILE Web Service in Oracle Applications R 12.1.2 from SOAP UI (Doc ID 1314946.1)
wsse:InvalidSecurity Error When Testing FND_PROFILE Web Service in Oracle Applications R 12.1.2 from ...
- 译-Web Service剖析: XML, SOAP 和WSDL 用于独立于平台的数据交换
本文是翻译内容,原文参见: Anatomy of a Web Service: XML, SOAP and WSDL for Platform-independent Data Exchange We ...
- .NET基础拾遗(7)Web Service的开发与应用基础
Index : (1)类型语法.内存管理和垃圾回收基础 (2)面向对象的实现和异常的处理 (3)字符串.集合与流 (4)委托.事件.反射与特性 (5)多线程开发基础 (6)ADO.NET与数据库开发基 ...
- 什么是web service
一.序言 大家或多或少都听过WebService(Web服务),有一段时间很多计算机期刊.书籍和网站都大肆的提及和宣传WebService技术,其中不乏很多吹嘘和做广告的成分.但是不得不承认的是Web ...
随机推荐
- springmvc controller junit 测试
第一次搭建SSM框架,整合SpringMVC完成后进行Controller测试,找资料并解决问题. 下图是我的完整目录: 1 建立UserController类 代码清单 1-1:UserContro ...
- 笔记:Hyper-V上Centos 6.5分辨率调整问题解决笔记
最近忙的没有心情写东西,果然博客就这么长草了.今天就稍微写一点点东西吧,反正这问题挺烦的. 背景如下:为准备做redis集群实验,特在笔记本上搭建CentOS6.5的Hyper-V虚拟机. 虚拟机创建 ...
- ubuntn下 nginx+phpstorm 中配置xdebug调试
xdebug安装和配置说明,主要用于个人学习记录. 一.echo phpinfo(); 搜素xdebug,若未搜素到,则标识未安装或安装失败. 二.拷贝步骤1中输出的所有结果.访问http://xde ...
- SQL Server 利用游标解决Tempdb究极竞争-DBA-程序员需知
SQL Server tempdb分配竞争算是DBA老生常谈的问题了,几乎现在所有的DBA都知道多建几个文件来解决/缓解问题.但是深层次的的竞争依旧不可避免.这里给大家剖析下游标在tempdb中的特点 ...
- 网络闪段致slave 出错分析
告警信息 check_ins_slave_io_running (err_cnt:1)critical- slaveio not run on ins:3014,3051,3060,3079,309 ...
- [计算机图形学] 基于C#窗口的Bresenham直线扫描算法、种子填充法、扫描线填充法模拟软件设计(二)
上一节链接:http://www.cnblogs.com/zjutlitao/p/4116783.html 前言: 在上一节中我们已经大致介绍了该软件的是什么.可以干什么以及界面的大致样子.此外还详细 ...
- ubuntu安装redis
1.下载安装root@21ebdf03a086:/# apt-cache search redisroot@21ebdf03a086:/# apt-get install redis-server a ...
- javax.persistence.PersistenceException: No Persistence provider for EntityManager named ...
控制台下输出信息 原因:persistence.xml必须放在src下META-INF里面. 若误放在其他路径,就会迷路.
- [python爬虫] Selenium定向爬取海量精美图片及搜索引擎杂谈
我自认为这是自己写过博客中一篇比较优秀的文章,同时也是在深夜凌晨2点满怀着激情和愉悦之心完成的.首先通过这篇文章,你能学到以下几点: 1.可以了解Python简单爬取图片的一些思路和方法 ...
- DOM操作(Window.document对象)
间隔与延迟: 间隔一段代码: window.setInterval("代码",间隔执行秒数) 延迟一段时间后执行一段代码: window.setTimeout("执行代码 ...