This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Services and the fly likes RPC v Document style Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "RPC v Document style" Watch "RPC v Document style" New topic

RPC v Document style

Luke Murphy
Ranch Hand

Joined: May 12, 2010
Posts: 300
Just reading through the excellent Ivan A Krizsan notes and the messaging modes RPC/Literal and Document/Literal style, he makes the point RPC is usually used to expose existing components as web services?

Why is this? Surely Document style could also be used?

Any comments?

Naren Chivukula
Ranch Hand

Joined: Feb 03, 2004
Posts: 576

Hi Luke,
he makes the point RPC is usually used to expose existing components as web services

This is because existing components might have been designed without keeping in mind of potential future exposure as web services, they might well contain "overloaded" methods. As typical RPC style SOAP message relies on dispatching SOAP message based on "method" name, it'd would confuse Web Service API to which method it should dispatch incoming input request.

On the otherhand, Document style SOAP message replies on "order and type" of the arguments to dispatch incoming input request. Unless you are sure existing code doesn't have overloaded methods, you shouldn't use this style to expose as Web Services. Note that "operation overloading" is already NOT allowed by WS Basic Profile 1.0.

(OCEEJBD6, SCWCD5, SCDJWS, SCJP1.4 and Oracle SQL 1Z0-051)
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
I just want to add that the latest version of my study notes can be found at:
The version on JavaRanch is not up to date.
Best wishes!

My free books and tutorials:
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: RPC v Document style
Similar Threads
Object 2.1 List and describe the encoding types used in a SOAP message.
encodingStyle attribute value
encoding type in wsdl
SOAPBodyElement in Axis