wood burning stoves 2.0*
The moose likes Web Services Certification (SCDJWS/OCEJWSD) and the fly likes SOAP Message: Encoded vs Literal 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 "SOAP Message: Encoded vs Literal" Watch "SOAP Message: Encoded vs Literal" New topic
Author

SOAP Message: Encoded vs Literal

Lipman Li
Ranch Hand

Joined: May 02, 2002
Posts: 122
as BP is only supporting Literal message(RPC/Literal, Document/Literal), so my question may not be relevant here.
I feel a bit hard to understand the difference between the SOAP messages, one of which is using SOAP Encoded, and another is using Literal.
so far, my understanding is that there's no difference if the message contains XML Simple type.
there would be a big difference if message is using Array, or other complex type. SOAP Encoded message will use its encode type, literal message will use XML schema complex type definition.
not quite sure if my understanding is really correct, can anybody here give some light?
[ May 12, 2004: Message edited by: Lipman Li ]
Richard Monson-Haefel
author
Ranch Hand

Joined: Oct 31, 2003
Posts: 92
I'm not sure if you have access to the J2EE Web Services book but it has a chapter on RPC/Encoded SOAP which explains the differences. In some case, as you mentioned, you may not be able to detect the difference between RPC/Encoded and an RPC/Literal - this is true for very simple calls because both use a structure to represent parameters to a remote call.

However, once you get into deeper waters the difference are more apparent. On thing that RPC/Encoded provides that RPC/Literal does not is referencing - like the ability to handle an object graph with circular references and such things. Turns out, however, that this is not compelling enough to offset the lack of clarity that section 5 of the SOAP 1.1 provides on mapping RPC calls to SOAP messages - this is why RPC/Literal is endorsed by the BP and RPC/Encoded is not - RPC/Encoded is not very clear and leaves too much open to interpretation so interoperability doesn't work very well.

Don't feel bad if this leaves you still scratching your head. The issues are, at best, difficult to explain � most self-proclaimed Web services experts don't understand the differences either � it took me a long time to figure it all out.

The important thing is to know that when the rubber hits the road, RPC/Encoded don't work. It will be come a foot note in the history of Web services and nothing more, so don't worry about it � its not important.


-- <br />Richard Monson-Haefel<br /><a href="http://www.Monson-Haefel.com" target="_blank" rel="nofollow">http://www.Monson-Haefel.com</a>
Lipman Li
Ranch Hand

Joined: May 02, 2002
Posts: 122
Hi Richard,
thanks for your comprehensive explanation.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SOAP Message: Encoded vs Literal