SOAP Message Formats
WSDL 1.1 distinguishes between two message styles: document and RPC. Here's how each style affects the contents of <soap:Body>.
-
Document
<soap:Body> contains one or more child elements called parts. There are no SOAP formatting rules for what the <soap:Body> contains; it contains whatever the sender and the receiver agree upon.
-
RPC
RPC implies that <soap:Body> contains an element with the name of the method or remote procedure being invoked. This element in turn contains an element for each parameter of that procedure.
For applications that use serialization and deserialization to abstract away the data wire format, there is one more choice to be made: the serialization format. The current two popular serialization formats today are:
-
SOAP Encoding
SOAP encoding is a set of serialization rules defined in section 5 of SOAP 1.1 and is sometimes referred to as "section 5 Encoding". The rules specify how objects, structures, arrays, and object graphs should be serialized. Generally speaking, an application using SOAP Encoding is focused on remote procedure calls and will likely use RPC message style.
-
Literal
Data is serialized according to a schema. In practice, this schema is usually expressed using W3C XML Schema. Although there are no prescribed rules for serializing objects, structures, graphs, and so on, the service's schema describes the application‑level Infoset of each of the service's messages.
There are therefore four possible variations in the message format. By default, JADE uses the document/literal format. If circular references are detected, the only way to currently represent this is in encoded format, so in this case JADE defaults to document/encoded. You have a choice of changing either of these defaults to RPC format, by using the application options. JADE’s RPC format is always encoded.
Many people believe that a shift away from SOAP encoding is inevitable. The W3C XML Protocol Working Group's SOAP 1.2 specification makes support for SOAP encoding optional (that is, a toolkit can claim SOAP 1.2 compliance without supporting SOAP encoding), the WS-I Basic Profile Working Group's interoperability guidelines (Basic Profile Version 1.0a) disallows the use of SOAP encoding with SOAP 1.1, and the W3C Web Service Description Working Group has dropped support for encoding from the WSDL 1.2 specification.
Before JADE can drop support for encoded formats and conform to WS‑I’s Basic Profile, there has to be an XML schema‑friendly way to handle circular references. A one‑to‑one relationship is an example of a circular reference. If both properties in this relationship are exposed, the WSDL that JADE generates will be in encoded format.