RPC vs Document
RPC and document style Web Services Description Language are the two most widely used terms in reference to Web services and SOAP protocol. The web services are often described using Web Services Description Language (WSDL) documents. The WSDL outlines the supported Web service operations and messages and binds them to a concrete network protocol and message format. The abstract definitions are defined using “type,” “message,” and “portType” elements. The concrete specifications are described using “binding” and “service” elements. Each of these elements are placed inside a “definitions” element.
RPC and document style differ in their binding styles which are also referred to as SOAP binding styles.The WSDL specifies the binding style as RPC or document depending on the SOAP payload or the structure of the element contents. The document style is always the default choice as the SOAP message is sent as a single “document” in the element. The RPC style element has to follow the rules described by the SOAP specification. As per the rules, the may consist of only one element which is named after the operation, and the parameters are interpreted as sub-elements of the main element. Both RPC and document styles are accepted versions by most of the SOAP clients; however, the use of one over the other is mainly one’s personal choice.
The use attribute also helps to distinguish between RPC and document styles. The use attribute describes how both the styles are represented in XML. The use attribute describes whether the message parts are encoded or the message follows an XML schema definition. Based on choices, there are four possible combinations of both RPC and document styles; viz RPC/encoded, RPC literal, Document/Encoded or Document/Literal. Not all of the four combinations are in use, and the preference of one combination over the other is more of a personal interest.
The main difference between document and RPC styles is that, in the document style, the client always sends the service parameters to the server in a simple XML document format rather than a discrete set of parameter values. The document style is loosely coupled as compared to the RPC style.
In the Document/Literal style, the message can always be validated using any XML validator. The content within the SOAP body is clearly defined in the schema. In the RPC/literal style, the transferred data is difficult to validate by the SOAP message.The Document/Literal style loses the operation name in the SOAP message whereas in the RPC/literal style the operation name still exists in the SOAP message.Out of four different combinations, the styles that are widely used are RPC/literal and Document/Literal.
Summary:
1. In document style, the SOAP message is sent as a single document whereas in the RPC style, the SOAP body may contain several elements.
2. The document style is loosely coupled whereas the RPC is tightly coupled.
3. In the document style, the client sends the service parameters in simple XML format whereas in the RPC style the parameters are sent as discrete of values.
4. The Document/Literal style loses the operation name in the SOAP message whereas the RPC/literal style keeps the operation name in the SOAP message.
5. In the Document/Literal style, messages can always be validated using any XML validator whereas in the RPC/literal style, the transferred data is difficult to validate by the SOAP message.
分享到:
相关推荐
市场营销与销售是商业活动中两个密切相关的但又有所区别的领域。它们之间的差异可以从多个角度进行阐述: 1. 目标与期限:市场营销关注长期的竞争优势和未来市场趋势,旨在解决问题并创造需求;...
在IT领域,数据库的选择对于系统设计至关重要。本文将深入探讨两种截然不同的数据库类型:HBase和RDBMS(关系型数据库管理系统)之间的差异,以及为什么在某些情况下选择HBase可能更为合适。 HBase,全称为Hadoop ...
EZ-USB FX2系列和EZ-USB FX2LP系列是Cypress公司生产的USB 2.0高速控制器。从FX2迁移到FX2LP的过程中,设计人员需要注意两者之间存在的功能差异,并对现有设计进行必要的修改以适应新系列的特点。...
java and C++ difference
- IE和Firefox对DOM(文档对象模型)的理解和操作方式不同,比如IE的`document.all`与Firefox的`document.getElementsByTagName`。 - 在事件处理上,IE使用attachEvent,Firefox使用addEventListener,需要编写...
透明应用故障切换(TAF)和快速连接故障切换(FCF)是两种在高可用性环境中用于处理数据库连接故障的机制。它们都是Oracle数据库提供的功能,以确保在系统出现故障时,应用程序能够继续运行,而不会中断服务。...
### SAP Notes 176337: 关于 TYPE 和 LIKE 的区别 #### 概述 在 SAP 的 ABAP 编程环境中,了解数据类型 (`Datatypes`) 和数据对象 (`Data Objects`) 之间的区别至关重要。这不仅关系到编程时如何正确声明变量,还...
在虚拟化领域,VMware 是一个非常知名的提供商,其产品线包括了 ESX 和 ESXi 服务器。这两款产品都是为了帮助企业构建、管理和扩展虚拟化环境而设计的,但它们之间存在显著的区别。以下是 VMware ESX 服务器和 ESXi ...
易趣网买家和卖家解决在线争端的不同方式,董宝田,李玮,有关在线争端解决的研究开始于二十世纪末期,现如今,随着电子商务爆发式的发展,怎样解决在线争端变得尤为重要。作为全球最大的网上
### PLMN与PSTN的区别详解 #### 一、概述 本文旨在清晰地阐述公共陆地移动网络(PLMN)与公共交换电话网络(PSTN)之间的主要区别。随着通信技术的发展,这两种网络系统各自承担着不同的角色,并在各自的领域内...
N-磷酰化多肽的质子加合峰与钠离子加合峰的多级质谱裂解规律的差异性研究,刘艳,陈培燕,利用三种不同的磷酰化试剂,分别对胸腺肽的肌动蛋白结合域进行N-磷酰化修饰,并通过ESI-MS/MS对其进行序列测定。...
### 气动、液压与电动执行器的区别 在工业自动化领域中,执行器作为将能量转换为运动或力的关键部件,在控制机械系统的线性移动方面发挥着至关重要的的作用。根据动力源的不同,执行器主要可以分为气动、液压和电动...
通信网是信息技术领域中的核心部分,它连接了世界各地的人们,使得信息的传输变得迅速而高效。《通信网基本概念及其主体结构》第二版是一本深入探讨这一主题的专业书籍,其课后练习答案则为学习者提供了理解通信网...
《有限差分方法在常微分方程与偏微分方程中的应用》一书,由Randall J. LeVeque撰写,是关于数值分析领域内处理微分方程的一部重要著作。该书深入探讨了有限差分方法在解决普通微分方程(ODE)和偏微分方程(PDE)中...
随着计算机视觉技术的发展及其在众多领域中的应用不断扩展,如增强现实(Augmented Reality, AR)、即时定位与地图构建(Simultaneous Localization and Mapping, SLAM)以及图像检索等,高效且高质量的特征描述符...
本文探讨了纳米材料与传统微米级粉体材料在尺寸小于临界尺寸dc时,界面能的差异性。文章主要从纳米材料的比表面能入手,介绍了传统表面能定义的局限性,即表面积与体积的相对表面能,主要量化了表面形成时分子间键的...