RPC-oriented Methods versus Document-oriented Methods

Previous Next

See Also

A web service is described by a WSDL (Web Services Description Language) document. A WSDL document describes how the web service is bound to a messaging protocol, in this case the SOAP protocol.

A WSDL SOAP binding can be either an RPC-oriented binding or a document-oriented binding.

NOTE:

USoft supports both both SOAP 1.1 and SOAP 1.2 protocols for web service providers. Note, however, that SOAP 1.2 is only supported for document oriented methods.

A SOAP binding can have an encoded use or a literal use. This gives us four possible style/use models:

1. RPC/encoded
2. RPC/literal
3. document/encoded
4. document/literal

In USoft, all methods of a web service belong to the same binding, so this distinction is made at method level. USoft implementation of web services supports two of those style/use models:

· RPC/encoded

 

· Document/literal

RPC-oriented style

Web services that use the Remote Procedure Call (RPC)-oriented style are interface-driven: client applications invoke a web service method ('call a remote procedure') by sending parameter values and receiving parameter values.

If the operation style of a method is set to RPC-oriented, the body of the SOAP request includes a wrapper XML element for this method. The parameters of this method are embedded as child elements inside this wrapper element.

Likewise, the body of the SOAP response includes a wrapper XML element that mirrors the SOAP request message. Returning parameter are embedded as child elements inside this wrapper element.

Document-oriented style

Web services that use the Document-oriented style are (XML) document-driven: client applications send parameters to the Web Service as XML document, instead of as a discrete set of parameter values.

If the operation style of a method is set to Document-oriented, the body of the SOAP request and response messages just contains one or more XML documents. The document-oriented style is flatter than the RPC-oriented style and does not require the use of wrapper elements.

The protocol places no constraint on how XML documents need to be structured. The handling and interpretation of the XML document is completely done at the application level.

Related Topics

Differences Between RPC-oriented methods and Document-oriented methods