Home » Difference between RPC and Document

Difference between RPC and Document

by Online Tutorials Library

Difference between RPC and Document web services

There are many differences between RPC and Document web services. The important differences between RPC and Document are given below:

RPC Style

1) RPC style web services use method name and parameters to generate XML structure.

2) The generated WSDL is difficult to be validated against schema.

3) In RPC style, SOAP message is sent as many elements.

4) RPC style message is tightly coupled.

5) In RPC style, SOAP message keeps the operation name.

6) In RPC style, parameters are sent as discrete values.

Let’s see the RPC style generated WSDL file.

WSDL file:

In WSDL file, it doesn’t specify the types details.

For message part, it defines name and type attributes.

For soap:body, it defines use and namespace attributes.


Document Style

1) Document style web services can be validated against predefined schema.

2) In document style, SOAP message is sent as a single document.

3) Document style message is loosely coupled.

4) In Document style, SOAP message loses the operation name.

5) In Document style, parameters are sent in XML format.

Let’s see the Document style generated WSDL file.

WSDL file:

In WSDL file, it specifies types details having namespace and schemaLocation.

For message part, it defines name and element attributes.

For soap:body, it defines use attribute only not namespace.

You may also like