SOAP 1.2 Binding Rules

This section describes SOAP 1.2 Binding rules provided in WSDL Version 2.0 Part 2: Adjuncts). Attribute binding[@wsoap:version='1.2'] sets SOAP 1.2.

If you are planning to use WSDL 2.0 with SOAP 1.2, you need to remember these main rules:

1. Declaring SOAP Binding namespace in the "description" element:

<wsdl:description xmlns:wsdl="http://www.w3.org/ns/wsdl"
  xmlns:wsoap= "http://www.w3.org/ns/wsdl/soap" ...>
  ...
</wsdl:description>

2. Specifying binding type, SOAP version, underlying protocol, and default SOAP MEP at the binding interface level:

  <wsdl:binding name="token" interface="qname"
    type="http://www.w3.org/ns/wsdl/soap"
    wsoap:version="1.2"
    wsoap:protocol="http://www.w3.org/2003/05/soap/bindings/HTTP/">
    wsoap:mepDefault
      ="http://www.w3.org/2003/05/soap/mep/soap-response/">
    ...
  </wsdl:binding>

Note that wsoap:version="1.2" is the default setting.

3. Specifying SOAP action, and SOAP MEP at the binding operation level:

  <wsdl:binding name="token" interface="qname" ...>
    <wsdl:operation ref="Hello" 
      wsoap:mep="http://www.w3.org/2003/05/soap/mep/request-response/"
      wsoap:action="http://www.herongyang.com/Service/Hello" >
    </wsdl:operation>
  </wsdl:binding>

4. Specifying SOAP modules at different level, if needed:

  <wsdl:binding name="token" interface="qname" ...>
      <wsoap:module ... />

    <wsdl:fault ...
      <wsoap:module ... />
    </wsdl:fault>

    <wsdl:operation ref="Hello" ...>
      <wsoap:module ... />

      <wsdl:input ...>
        <wsoap:module ... />
      </wsdl:input>

      <wsdl:output ...>
        <wsoap:module ... />
      </wsdl:output>

      <wsdl:infault ...>
        <wsoap:module ... />
      </wsdl:infault>

      <wsdl:outfault ...>
        <wsoap:module ... />
      </wsdl:outfault>
  
    </wsdl:operation>
  </wsdl:binding>

5. Specifying SOAP Headers in fault messages and in-out messages, if needed:

  <wsdl:binding name="token" interface="qname" ...>

    <wsdl:fault ...
      <wsoap:header ... />
    </wsdl:fault>

    <wsdl:operation ref="Hello" ...>

      <wsdl:input ...>
        <wsoap:header ... />
      </wsdl:input>

      <wsdl:output ...>
        <wsoap:header ... />
      </wsdl:output>

    </wsdl:operation>
  </wsdl:binding>

Last update: 2009.

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 Message Exchange Patterns

 wsdlx:safe="true|false" Operation Safety

 Operation Message Styles

 SOAP Binding Extension

SOAP 1.2 Binding Rules

 WSDL 2.0 Document Examples with SOAP Binding

 WSDL 20 Programming APIs and Testing Tools

 Introduction to WSDL 1.1

 WSDL 1.1 Document Structure and Syntax

 WSDL 1.1 Binding Extension for SOAP 1.1

 soapUI 3.0.1 - Web Service Testing Tool

 WSDL 1.1 and SOAP 1.1 Examples - Document and RPC Styles

 PHP SOAP Extension in PHP 5.3.1

 Using WSDL in Perl with SOAP::Lite 0.710

 Using WSDL Document in Java with Axis2 1.4.1

 Using WSDL2Java to Generate Web Service Stub Classes

 WSDL 1.1 Binding Extension for SOAP 1.2

 WSDL 1.1 and SOAP 1.2 Examples - Document and RPC Styles

 SOAP 1.2 Binding - PHP, Java and Perl Clients

 WSDL Related Terminologies

 References

 PDF Printing Version