Why Should We Care About
WSDL 2.0?

by
Philippe Le Hégaret
(W3C)
WSDL ?!?
Web Services
Web Services
Description
Web Services
Description
Language
WSDL
Web Services?
Computer
-to-
computer
interaction
Language neutral
Java
C#
Transport neutral
HTTP
JMS
UDP
SOAP
XML
Envelope
Why SOAP?
Code generation
Tools
interface reservation
{
 aResult checkAvailability(aRequest);
}
Language Independent
Web Services Description
Interfaces
and
Operations
XML
<interface name="reservation" >
 <operation name="checkAvailability">
   <input element="sc:aRequest" />
   <output element="sc:aResult" />
 </operation>
</interface>
<interface name="reservation" >
 <operation name="checkAvailability">
   <input element="sc:aRequest" />
   <output element="sc:aResult" />
 </operation>
</interface>
<interface name="reservation" >
 <operation name="checkAvailability">
   <input element="sc:aRequest" />
   <output element="sc:aResult" />
 </operation>
</interface>
<interface name="reservation" >
 <operation name="checkAvailability">
   <input element="sc:aRequest" />
   <output element="sc:aResult" />
 </operation>
</interface>
Schema Language
<interface name="reservation" >
 <operation name="checkAvailability">
   <input element="sc:aRequest" />
   <output element="sc:aResult" />
 </operation>
</interface>
XML Schema
<interface name="reservation" >
 <operation name="checkAvailability">
   <input element="sc:aRequest" />
   <output element="sc:aResult" />
 </operation>
</interface>
Faults
<interface name="reservation">
 <fault name='f' element='#any'/>
 <operation name="checkAvailability">
   <input element="sc:aRequest" />
   <output element="sc:aResult" />
   <outfault ref="f" />
 </operation>
</interface>
Protocol
<binding
 name="reservationBinding" 
 interface="tns:reservation">
 
</binding>
Protocol
SOAP
<binding
 name="reservationSOAPBinding" 
 interface="tns:reservation"
 type="http://www.w3.org/ns/wsdl/soap"
 wsoap:protocol="http://www.w3.org/2003/05/soap/bindings/HTTP/">
 
</binding>
Transport
Protocol
over HTTP
<binding
 name="reservationSOAPBinding" 
 interface="tns:reservation"
 type="http://www.w3.org/ns/wsdl/soap"
 wsoap:protocol="http://www.w3.org/2003/05/soap/bindings/HTTP/">
 
</binding>
Protocol neutral
HTTP
HTTP
only
<binding
 name="reservationHTTPBinding"
 interface="tns:reservation"
 type="http://www.w3.org/ns/wsdl/http">
</binding>
Default is
HTTP POST
XML
in the
HTTP BODY
HTTP GET
From
XML
to
URI
http://example.org
/services/Premium?
checkIn=2007-06-01
&checkOut=2007-06-01
URI Mapping
<interface name="reservation" >
 <operation name="checkAvailability">
   <input element="sc:aRequest" />
   <output element="sc:aResult" />
 </operation>
</interface>
<xs:element name='aRequest'>
  <xs:complexType>     
    <xs:sequence>      
      <xs:element name="checkInDate" type="xs:date"/>      
      <xs:element name="checkOutDate" type="xs:date"/>      
      <xs:element name="roomType" type="xs:string"/>      
    </xs:sequence>     
  </xs:complexType>
</xs:element>
<xs:element name='aRequest'>
  <xs:complexType>     
    <xs:sequence>      
      <xs:element name="checkInDate" type="xs:date"/>      
      <xs:element name="checkOutDate" type="xs:date"/>      
      <xs:element name="roomType" type="xs:string"/>
    </xs:sequence>     
  </xs:complexType>
</xs:element>
<xs:element name='aRequest'>
  <xs:complexType>     
    <xs:sequence>      
      <xs:element name="checkInDate" type="xs:date"/>      
      <xs:element name="checkOutDate" type="xs:date"/>      
      <xs:element name="roomType" type="xs:string"/>
    </xs:sequence>     
  </xs:complexType>
</xs:element>
<xs:element name='aRequest'>
  <xs:complexType>     
    <xs:sequence>      
      <xs:element name="checkInDate" type="xs:date"/>      
      <xs:element name="checkOutDate" type="xs:date"/>      
      <xs:element name="roomType" type="xs:string"/>
    </xs:sequence>     
  </xs:complexType>
</xs:element>
<xs:element name='aRequest'>
  <xs:complexType>     
    <xs:sequence>      
      <xs:element name="checkInDate" type="xs:date"/>      
      <xs:element name="checkOutDate" type="xs:date"/>      
      <xs:element name="roomType" type="xs:string"/>
    </xs:sequence>     
  </xs:complexType>
</xs:element>
<aRequest>
  <checkInDate>2006-06-01</checkInDate>
  <checkOutDate>2006-06-03</checkOutDate>
  <roomType>Premium</roomType>
</aRequest>
?checkInDate=2007-06-01
&checkOutDate=2007-06-03
&roomType=Premium
<binding
 name="reservationHTTPBinding"
 interface="tns:reservation"
 type="http://www.w3.org/ns/wsdl/http">
 <operation ref="tns:checkAvailability"
   whttp:method="GET" />
</binding>
<binding
 name="reservationHTTPBinding"
 interface="tns:reservation"
 type="http://www.w3.org/ns/wsdl/http"
 whttp:methodDefault="GET">

</binding>
/services/Premium?
checkIn=2007-06-01
&checkOut=2007-06-01
<binding
 name="reservationHTTPBinding"
 interface="tns:reservation"
 type="http://www.w3.org/ns/wsdl/http">
 <operation ref="tns:checkAvailability"
   whttp:method="GET"
   whttp:location="/services/{roomType}
          ?checkIn={checkInDate}
          &checkOut={checkOutDate}" />
</binding>
WSDL
WSDL 1.1
Widly deployed
Widly
mis-interpreted
Follow
WS-I
Basic
Profile 1.0
WSDL 2.0
Based on
WSDL 1.1
experience
Better defined
WSDL 2.0
Component Model
layer of
abstraction
Reuse
Inheritance
<interface name="reservation"
       extends='tns:metaService'>
 <operation name="checkAvailability">
   <input element="sc:aRequest" />
   <output element="sc:aResult" />
 </operation>
</interface>
<interface name="reservation"
       extends='tns:metaService
                fr:metaService2'>
 <operation name="checkAvailability">
   <input element="sc:aRequest" />
   <output element="sc:aResult" />
 </operation>
</interface>
Include
(WSDL 1.1)
<include location="interfaces.wsdl">
</include>
Same Namespace
Import
<import
   namespace='http://example.org/'
   location="interfaces.wsdl">
</import>
Multiple
Namespaces
<interface name="reservation"
       extends='tns:metaService
                fr:metaService2'>
 <operation name="checkAvailability">
   <input element="sc:aRequest" />
   <output element="sc:aResult" />
 </operation>
</interface>
Message
Exchange
Patterns
MEPs
<interface name="…">
 <operation name="…">
   [ <input /> | <output /> ]*
 </operation>
</interface>
3 MEPs
1. Robust-In-Only
<interface name="reservation">
 <operation name="checkAvailability"
   pattern='http://www.w3.org/ns/wsdl/robust-in-only'>
   <input element="sc:aRequest" />
 </operation>
</interface>
In-Only
+ optional Fault
<interface name="reservation">
 <fault name='f' element='#any'/>
 <operation name="checkAvailability"
   pattern='http://www.w3.org/ns/wsdl/robust-in-only'>
   <input element="sc:aRequest" />
   <outfault ref='tns:f'/>
 </operation>
</interface>
<interface name="reservation">
 <operation name="checkAvailability"
   pattern='http://www.w3.org/ns/wsdl/robust-in-only'>
   <input element="sc:aRequest" />
 </operation>
</interface>
2. In-Only
<interface name="reservation">
 <operation name="checkAvailability"
   pattern='http://www.w3.org/ns/wsdl/robust-in-only'>
   <input element="sc:aRequest" />
 </operation>
</interface>
Send
and
Move on
3. In-Out
<interface name="reservation">
 <operation name="checkAvailability">
   <input element="sc:aRequest" />
   <output element="sc:aResult" />
 </operation>
</interface>
<interface name="reservation">
 <fault name='f' element='#any'/>
 <operation name="checkAvailability">
   <input element="sc:aRequest" />
   <output element="sc:aResult" />
   <outfault ref="f" />
 </operation>
</interface>
Bindings
SOAP
SOAP 1.1
SOAP 1.1
SOAP 1.2
SOAP 1.2
MEPs
In-Out
to
Request-Response
In-Out
to
SOAP-Response
In-Only
to
Request-Response
Robust-In-Only
to
Request-Response
HTTP
Content-Encoding
<operation ref="tns:checkAvailability"
   whttp:contentEncoding="gzip"
  />
Headers
<operation ref="tns:checkAvailability">
   <whttp:header
     name="X-Auth"
     type="xs:string"
     required="true" />
   
</operation>
Authentication
<endpoint name="HTTPendpoint"
 binding="tns:reservationHTTPBinding"
 address="http://myservice.com/services/" >
   whttp:authenticationScheme="digest"
   whttp:authenticationRealm="Member" />
SOAP
over HTTP
<binding
 name="reservationSOAPBinding" 
 interface="tns:reservation"
 type="http://www.w3.org/ns/wsdl/soap"
 wsoap:protocol="http://www.w3.org/2003/05/soap/bindings/HTTP/">
 <operation ref="tns:checkAvailability"
   whttp:location="/services/{roomType}
          ?checkIn={checkInDate}
          &checkOut={checkOutDate}">
   <whttp:header
     name="X-Auth" type="xs:string"
     required="true" />
 </operation> 
</binding>
Serialization
Formats
application/
x-www-form-
urlencoded
multipart/form-data
Safety
Feature
<interface name="reservation">
 <operation name="checkAvailability"
            wsdlx:safe="true">
   <input element="sc:aRequest" />
   <output element="sc:aResult" />
 </operation>
</interface>
HTTP GET
Testing
Testing
Testing
WSDL 1.1
to
WSDL 2.0
converter
Full
SOAP support
Full
HTTP support
Full
SOAP
over HTTP
support
Describe
Web Services
Describe
Web Applications
Describe
Web Applications
WSDL 2.0
Summer 2007
http://www.w3.org/2007/Talks/0508-w3ctrack-plh-2/