Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Web Services Certification (SCDJWS/OCEJWSD) and the fly likes Is SOAP supports Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "Is SOAP supports "RPC-Literal" or "RPC-Encoded"?" Watch "Is SOAP supports "RPC-Literal" or "RPC-Encoded"?" New topic

Is SOAP supports "RPC-Literal" or "RPC-Encoded"?

George Kennedy

Joined: Apr 14, 2005
Posts: 10

I read some documents SOAP(as per BP-1) supports "RPC-Literal" and "Document-Literal". But in some other documents I read as it supports "RPC-Ecoded" and "Document-Literal".
So my question is SOAP supports "RPC-Literal" or "RPC-Encoded"???

[ April 21, 2005: Message edited by: George Kennedy ]
Valentin Crettaz
Gold Digger

Joined: Aug 26, 2001
Posts: 7610
In the WSDL 1.1 W3C Note, you will find some extension elements SOAP provides in order to extend WSDL. In the soap:binding extension element, you may specify a style (rpc or document) that will be the default for each contained soap: operation element. Then, in each soap: operation element, you may override the style specified in the soap:binding element. You can thus specify for each operation whether the contained SOAP message is to be considered an RPC message or simply an XML document.

Then, for each SOAP operation you might specify an input, an output and a fault element. In turn, those input, output and fault elements might contain soap:body and soap:header element which feature an attribute named "use" and whose valid values are literal or encoded.

As you can see you can customize each operation along two styles (RPC and Document) and two uses (Literal and Encoded). As a result, the following are all valid couple for SOAP messages:
1. RPC/Literal
2. RPC/Encoded
3. Document/Literal
4. Document/Encoded

However, for compatibility reasons, the Basic Profile 1.0 does not allow the use of Encoded. Thus, in order to be compliant with the Basic Profile you must choose either 1 or 3.
[ April 21, 2005: Message edited by: Valentin Crettaz ]

[Blog] [Blogroll] [My Reviews] My Linked In
George Kennedy

Joined: Apr 14, 2005
Posts: 10
Thanks Valentin for nice analysis, so we have to use only RPC/Literal or Document/Literal.
I agree. Here's the link:
subject: Is SOAP supports "RPC-Literal" or "RPC-Encoded"?
It's not a secret anymore!