"soap12:body" - Binding for SOAP Body

This section describes 'soap12:body', a SOAP extension element that specifies how the SOAP Body should be constructed in the SOAP message for an operation input and output. 'literal' means no encoding.

"soap12:body" is a SOAP extension element used as a sub element of the "wsdl:input" or "wsdl:output" element inside the "wsdl:binding" and "wsdl:operation" element structure. "soap12:body" is used to provide information on how the content of the SOAP Body element is constructed. The syntax of "soap12:body" looks like this:

<wsdl:definitions ...>
  <wsdl:binding ...>
    <wsdl:operation ...>
      <wsdl:input>
        <soap12:body parts="nmtokens" use="literal|encoded"
          encodingStyle="list" namespace="uri"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body parts="nmtokens" use="literal|encoded"
          encodingStyle="list" namespace="uri"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
</wsdl:definitions>

Notes on the "soap12:body" element:

If style="rpc" is specified for this operation, each message part is a parameter for the operation and appears inside a wrapper element within the SOAP Body. The wrapper element is assigned a local name of the operation name and a namespace name of the value of the namespace attribute of the soap12:body element. Each message part is carried as a child element of the wrapper element. Each parameter element is assigned a local name of the value of the name attribute of the corresponding wsdl:part element and a namespace name with no value.

If style="document" is specified for this operation, Child elements of the soap:Body must be elements as defined by the global element declarations identified by the respective QName values of the element attributes of the wsdl:part element children of the corresponding wsdl:message element. The message parts appear as child elements of the soap:Body element and there are no additional wrappers.

Here is an example of "soap12:operation" element:

  <wsdl:binding name="helloBinding" type="hy:helloPortType">
    <soap12:binding style="document"
      transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="Hello">
      <soap12:operation
        soapAction="http://www.herongyang.com/Service/Hello"/>
      <wsdl:input name="helloInput">
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="helloOutput">
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>

In this example,

Last update: 2007.

Table of Contents

 About This Book

 Introduction to WSDL 2.0

 WSDL 2.0 Document Structure and Syntax

 WSDL Version 2.0 Part 2: Adjuncts

 WSDL 2.0 Document Examples with SOAP Binding

 Using WSDL Document in Java Apache Axis2/Java for WSDL

 Apache Woden for WSDL Documents in Java

 SoapUI - Web Service Testing Tool

 PHP SOAP Extension for WSDL

 Perl SOAP::Lite for WSDL

 Introduction to WSDL 1.1

 WSDL 1.1 Document Structure and Syntax

 WSDL 1.1 Binding Extension for SOAP 1.1

 SoapUI as WSDL 1.1 Testing Tool

 WSDL 1.1 and SOAP 1.1 Examples - Document and RPC Styles

 PHP SOAP Extension for WSDL 1.1

 Perl SOAP::Lite for WSDL 1.1

 Apache Axis2/Java for WSDL 1.1

 Using WSDL2Java to Generate Web Service Stub Classes

WSDL 1.1 Binding Extension for SOAP 1.2

 What Is WSDL 1.1 SOAP Extension?

 "soap12:binding" - Binding Message Style and Transportation

 "soap12:operation" - SOAPAction Header Line

"soap12:body" - Binding for SOAP Body

 "soap12:fault" - Binding for SOAP Fault Details

 "soap12:header" - Binding for SOAP Header

 "soap12:address" - Location of Service

 WSDL 1.1 and SOAP 1.2 Examples - Document and RPC Styles

 SOAP 1.2 Binding - PHP, Java and Perl Clients

 WSDL Related Terminologies

 Outdated Tutorials

 References

 Full Version in PDF/EPUB