Document/Literal Wrapped Messaging Mode
  • The document/literal wrapped is an improvement over document/literal.
  • In document/literal wrapped, another element is added within the SOAP body element.
  • The element represents the method specified within the WSDL document that is being called.
In the code example, the myMethod wrapper element is defined in the WSDL document, which maps to the myMethod element in the SOAP message. The wrapper element is further referenced by the part subelement of the message element in the WSDL document.

WSDL Document
  <types>
    <schema>
      <element name="myMethod">
        <complexType>
        <sequence>
        <element name="x" type="xsd:int"/>
        <element name="y" type="xsd:float"/>
        </sequence>
        </complexType>
      </element>

      <element name="myMethodResponse">
        <complexType/>
      </element>
    </schema>
  </types>

  <message name="myMethodRequest">
  <part name="parameters" element="myMethod"/>
  </message>

  <message name="empty">
  <part name="parameters" element="myMethodResponse"/>
  </message>

  <interface name="myInterface">
    <operation name="myMethod">
      <input message="myMethodRequest"/>
      <output message="empty"/>
    </operation>
  </interface>
  <binding/>

SOAP Message
  <soap:envelope>
    <soap:body>
      <myMethod>
        <x>5</x>
        <y>5.0</y>
      </myMethod>
    </soap:body>
  </soap:envelope>

Click the Next button to continue.