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 ...
随机推荐
- Linux下好玩的命令
1.yes命令,输出很多个y,可以用来对付选择很多y/n的应用. 2.banner命令,打印字符标题,就是用字符拼出大字来: 3.ddate命令,把日历转换成其他的什么历: 4.fortune命令,随 ...
- spring-data-elasticsearch整合elasticsearch
花了一个晚上 整合最新版本的spring-data-elasticsearch与elasticsearch,遇到各种版本冲突 之类的问题,测试效果如图: facet搜索:
- 关于mysql占用CPU过高,问题解决
使用SHOW PROCESSLIST 查看 原因: 使用了 一个触发器 不断的去删除日志,保证每个用户的日志只有10条 去掉之后,CPU使用率从97% 降到了 %. 利用show columns fr ...
- 轻易实现基于linux或win运行的聊天服务端程序
对于不了解网络编程的开发人员来说,编写一个良好的服务端通讯程序是一件比较麻烦的事情.然而通过EC这个免费组件你可以非常简单地构建一个基于linux或win部署运行的网络服务程序.这种便利性完全得益于m ...
- 对.NET跨平台的随想
是在魅力 .NET:从 Mono..NET Core 说起这篇博文的评论中写的,在此记录一下: .NET Core CLR是技术含量最高,但却是最容易实现跨平台的.因为微软的CLR是C或C++写的,没 ...
- Django表单验证
从前端提交的各种数据可能存缺少必要字段以及包含非法数据等问题, 并且通常需要进行类型转换后才可以交由业务逻辑处理. 我们当然可以在控制器(Django的views函数)中完成这些工作, 但是这样会使控 ...
- [.NET 即时通信SignalR] 认识SignalR (一)
ASP .NET SignalR[1] 是一个ASP .NET 下的类库,可以在ASP .NET 的Web项目中实现实时通信.什么是实时通信的Web呢?就是让客户端(Web页面)和服务器端可以互相通知 ...
- 隐藏路由器的WIFI信号,防蹭网
进入路由器的管理界面 最后别忘了 现在信号隐藏了,现在说一下如何用手机连接隐藏的路由器
- paip. dsl 编程语言优点以及 常见的dsl
paip. dsl 编程语言优点以及 常见的dsl 作者Attilax 艾龙, EMAIL:1466519819@qq.com 来源:attilax的专栏 地址:http://blog.csdn. ...
- 文件上传小技巧/原生态【html篇】
引语:大家都知道,html中上传文件就一个input,type=file就搞定了.但是,这个标签的样式,实在不值得提点什么,要改动他的样式,恐怕也是较难的.但是其实挺简单,今天就来说说上传文件小技巧吧 ...