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.

时间: 2024-10-01 03:04:28

Web service standards: SOAP, REST, OData, and more的相关文章

使用TcpTrace小工具截获Web Service的SOAP报文

Web Service客户端对服务端进行调用时,请求和响应都使用SOAP报文进行通讯.在开发和测试时,常常查看SOAP报文的内容,以便进行分析和调试.TcpTrace是一款比较小巧的工具,可以让我们截获TCP/IP协议上的报文,因为HTTP.JMS.STMP等协议都构建在TCP/IP基础上,所以可以很容易地截获Web Service的SOAP请求和响应报文.    我们实例中的Web Service运行于8080端口,可以让TcpTrace在8088端口上监听,并将8088端口监听的报文转发到8

建立自己的Web service(SOAP篇)

1.简介 这篇文章主要介绍采用SOAP来建立以及访问Web service接口. Web service是一个平台独立的,低耦合的,自包含的.基于可编程的web的应用程序,可使用开放的XML(标准通用标记语言下的一个子集)标准来描述.发布.发现.协调和配置这些应用程序,用于开发分布式的互操作的应用程序. Web Service技术, 能使得运行在不同机器上的不同应用无须借助附加的.专门的第三方软件或硬件, 就可相互交换数据或集成.依据Web Service规范实施的应用之间, 无论它们所使用的语

Web Service之Soap请求响应内容中文编码解密

java模拟Soap请求测试Web Service接口,发现Web Service响应内容中的中文竟然是编码格式.比如: 中文:退保成功 Soap中文编码:退保成功 我仔细分析后发现,退编码实际上就是Unicode编码的Soap版,正规的Unicode编码是\u9000,Soap改成自己的格式&#x[4位内容];格式. 还有其他的比如: 换行,Soap编码: 单引号,Soap为转换为html编码:' 与号,Soap为转换为html编码:& 小于号,Soap为转换为html

ASP.NET Web Service 标准SOAP开发案例代码(自定义验证安全头SOAPHeader)

using System.Xml;using System.Xml.Serialization;using System.Web.Services.Protocols;using System.Configuration;using Service.Common.Constant; namespace Service.Common.Core.Head.Safe{    /// <summary>    /// 为了安全,自定义的Soap头    /// </summary>   

译-Web Service剖析: 使用XML, SOAP 和WSDL 进行独立于平台的数据交换

Most applications are developed to interact with users; the user enters or searches for data through an interface and the application then responds to the user's input. A Web service does more or less the same thing except that a Web service applicat

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 SOAP UI (Doc ID 1314946.1) Modified: 10-Nov-2013 Type: PROBLEM   In this Document   Symptoms   Cause   Solution   References Applies to: Oracle E-Bus

.NET基础拾遗(7)Web Service的开发与应用基础

Index : (1)类型语法.内存管理和垃圾回收基础 (2)面向对象的实现和异常的处理 (3)字符串.集合与流 (4)委托.事件.反射与特性 (5)多线程开发基础 (6)ADO.NET与数据库开发基础 (7)WebService的开发与应用基础 一.SOAP和Web Service的基本概念 Web Service基于SOAP协议,而SOAP本身符合XML语法规范.虽然.NET为Web Service提供了强大的支持,但了解其基本机制对于程序员来说仍然是必需的. 1.1 神马是SOAP协议?

怎样创建.NET Web Service http://blog.csdn.net/xiaoxiaohai123/article/details/1546941

为什么需要Web Service 在通过internet网购买商品后,你可能对配送方式感到迷惑不解.经常的情况是因配送问题找配送公司而消耗你的大量时间,对于配送公司而言这也不是一项增值服务. 为了解决这种问题,配送公司需要在不降低安全级别的情况下了解更多的递送信息,然而安全公司设计的安全系统却非常复杂.那么我们能不能只使用80端口(web服务器端口)并且只通过web服务器提供信息呢?所以,我们建立了一个全新的web应用程序以便从核心商业应用程序中获得数据.配送公司将为些东西付money,所有的公

WCF - Versus Web Service

There are some major differences that exist between WCF and a Web service which are listed below. 这里总结了WCF和网络服务之间主要的不同之处 Attributes - WCF service is defined by ServiceContract and OperationContract attributes, whereas a web service is defined by WebS