There are additional design considerations when using SOAP web services. SOAP, as a specification created by committee, has several possible variations known as bindings. The two main variations are called RPC/encoded and Document/literal, with the latter being extended to Document/literal wrapped.
The Remote Procedure Call (RPC) pattern is used when the consumer views the web service as a single logical application or component with encapsulated data. The request and response messages map directly to the input and output parameters of the procedure call. Examples of this type the RPC pattern might include a payment service or a stock quote service.
The document-based pattern is used in situations where the consumer views the web service as a longer running business process where the request document represents a complete unit of information. This type of web service may involve human interaction for example as with a credit application request document with a response document containing bids from lending institutions. Because longer running business processes may not be able to return the requested document immediately, the document-based pattern is more commonly found in asynchronous communication architectures. The Document/literal variation of SOAP is used to implement the document-based web service pattern.
The RPC/encoded SOAP variation was the initial SOAP mechanism to implement the RPC design pattern. However, inefficiencies and other difficulties in large scale enterprise systems have led to RPC/encoded falling into disuse; it is most likely that eventually this variation will be deprecated by the web standardization committee responsible. A form of the Document/literal variation called document/literal wrapped is now the de facto standard for RPC pattern web services.