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.
分享到:
相关推荐
Difference between HBase and RDBMS
state 50 differences between marketing and sales
What's the difference between TAF and FCF
FX2 and FX2LP 系列的区别 cy7c68013A开发套餐
Difference Between VMWare ESX and VMWare ESXi
java and C++ difference
Summary: <br/>Symptom: This is an explanation of differences between TYPE and LIKE additions <br/>Additional key words: Data types, data objects, ABAP type concept, Dictionary ...
IE和Firefox下开发时会遇到的问题
What's the Difference between Pneumatic, Hydraulic, and Electrical Actuators.docx
1、Explain the difference between internal and external fragmentation. 2、Given five memory partitions of 100 KB, 500 KB, 200 KB, 300 KB, and 600KB (in order), how would each of the first-fit, best-...
等效采样示波器与实时采样示波器区别
易趣网买家和卖家解决在线争端的不同方式,董宝田,李玮,有关在线争端解决的研究开始于二十世纪末期,现如今,随着电子商务爆发式的发展,怎样解决在线争端变得尤为重要。作为全球最大的网上
很好的东西,简述PLMN和PSTN的区别,大家看看就知道了。
N-磷酰化多肽的质子加合峰与钠离子加合峰的多级质谱裂解规律的差异性研究,刘艳,陈培燕,利用三种不同的磷酰化试剂,分别对胸腺肽的肌动蛋白结合域进行N-磷酰化修饰,并通过ESI-MS/MS对其进行序列测定。...
Time Dependent Problems and Difference Methods addresses these various industrial considerations in a pragmatic and detailed manner, giving special attention to time dependent problems in its ...
The difference between the smaller, downloadable .Net Framework and the full desktop version is one of the major disparities between the two platforms. In addition, the fact that Silverlight is ...
Data collection at ultra high-frequency on ... Overall the difference in the coefficients is bigger between the dirty series and the clean series than among series filtered with different algorithms.
sva classical q&a Qi1)What is callback ? (Qi2)What is factory pattern ?...(Qi3)Explain the difference between data types logic and reg and wire . (Qi4)What is the need of clocking blocks ?
Finite Difference Schemes and Partial Differential Equations
《通信网基本概念及其主体结构》一书 (第二版)课后练习答案。主要是问答和简述以及设计题的解答。