Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

SOAP Message: Encoded vs Literal

Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Lipman Li
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Richard,
thanks for your comprehensive explanation.
You're not going crazy. You're going sane in a crazy word. Find comfort in this tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic