IST logo
Cover page images (keys)

Web Services: Building Blocks and Prospective

Yves Lafon, W3C <ylafon@w3.org>
Web Services Activity Lead


About W3C

W3C logo

History

Web Services

Web Services in W3C Technologies

Web Services Challenges

… translating to an architecture

… justifying some choices:

XML-based messages
for platform-independent machine processing
Framework focused on extensibility
facilitating interoperability
Machine-processable descriptions
facilitating integration
Loose coupling
maximizing scalability

The Big Picture ?

Web Services Protocol

Web Services Work Items

Web Services Protocol

Web Services Protocol

Messaging Framework

SOAP 1.2:

W3C Recommendation since June 2003. Slow but steady transition.

SOAP Version 1.2

SOAP message

SOAP message

SOAP message path

SOAP message path

Example of a SOAP message

<?xml version='1.0' ?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> 
 <env:Header>
  <m:reservation xmlns:m="http://travelcompany.example.org/reservation" 
          env:role="http://www.w3.org/2003/05/soap-envelope/role/next"
          env:mustUnderstand="true">
   <m:reference>uuid:093a2da1-q345-739r-ba5d-pqff98fe8j7d</m:reference>
   <m:dateAndTime>2001-11-29T13:20:00.000-05:00</m:dateAndTime>
  </m:reservation>
 </env:Header>
 <env:Body>
  <p:itinerary
    xmlns:p="http://travelcompany.example.org/reservation/travel">
   …
  </p:itinerary>
 </env:Body>
</env:Envelope>

Message exchange patterns

Underlying protocols binding

Underlying protocols bindings

XMLP binding

SOAP 1.2 HTTP Binding

Addressing information: Web Services Addressing 1.0

Addressing from and to endpoints

Addressing information: Web Services Addressing 1.0

Addressing from and to endpoints

Addressing

Web Services Addressing 1.0:

W3C Recommendation (Core and SOAP Binding)

WSDL Binding interoperability ongoing

Handling non-XML data

XOP & MTOM

W3C Recommendation since January 2005.

Resource Representation SOAP Header Block

RRSHB example

<soap:Envelope
    xmlns:soap='http://www.w3.org/2003/05/soap-envelope'
    xmlns:rep='http://www.w3.org/2004/08/representation'
    xmlns:xmlmime='http://www.w3.org/2005/05/xmlmime'>
 <soap:Header>
  <rep:Representation resource='http://example.org/me.jpg'>
   <rep:Data
   xmlmime:contentType='image/jpeg'>/aWKKapGGyQ=</rep:Data>
  </rep:Representation>
 </soap:Header>
 <soap:Body>
  <x:MyData xmlns:x='http://example.org/mystuff'>
   <x:name>John Q. Public</x:name>
   <x:img src='http://example.org/me.jpg'/>
  </x:MyData>
 </soap:Body>
</soap:Envelope>

Doing something with this messaging framework

But:

Describing Web services

Web Services Description

Web Services descriptions

WSDL 2.0 Structure

Description document:

<description targetNamespace="…">

Message formats (schema types):

  <types> … </types>

Abstract interface of the service:

  <interface>
    <operation> … </operation>*
  </interface>

Binding of these messages to a protocol:

  <binding> … </binding>

Location of the service:

  <service>
    <endpoint> … </endpoint>*
  </service>

</description>

New Features in WSDL 2.0

Message Exchange Patterns (MEPs)

WSDL 2.0

Candidate Recommendation

Interoperability events

At risk: feature/properties, 6 MEPs

WS-Policy 1.5

WS-Policy 1.5

<Policy>
  <mtom:OptimizedMimeSerialization wsp:Optional="true"/>
  <wsap:UsingAddressing />
  <ExactlyOne>
    <sp:TransportBinding>
      <Policy>
        <sp:TransportToken>
          <Policy>
            <sp:HttpsToken RequireClientCertificate="false" />
          </Policy>
        </sp:TransportToken>
        <sp:AlgorithmSuite>
          <Policy>
            <sp:Basic256Rsa15/>
          </Policy>
        </sp:AlgorithmSuite>
      </Policy>
    </sp:TransportBinding>
    <sp:AsymmetricBinding>…</sp:AsymmetricBinding>
  </ExactlyOne>
</Policy>

Choreography

WS-CDL 1.0: Describe interaction among atomic Web Services

Candidate Recommendation phase

XML Schema Patterns for Databinding

Working Draft of XML Schema Patterns for Databinding

XML Schema Patterns example

<xs:complexType name="Collection">
  <xs:sequence>
    <xs:element name="name" type="xs:string"/>
    <xs:element name="shade" type="xs:string"/>
    <xs:element name="length" type="xs:int"/>
  </xs:sequence>
  <xs:attribute name="id" type="xs:string"/>
  <xs:attribute name="inStock" type="xs:int"/>
</xs:complexType>

Describing Web services

Semantics: setting expectations

Semantic Web Services

Generic Semantic Annotation mechanism for WSDL

Semantic Annotations Usage

Semantic Annotations example

<xs:element name="CheckInventoryServiceRequest">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="UPC" type="xsd:string"
        sawsdl:modelReference="SampleRetailOntology#UPCCode"/>
      <wsdl:element name="DeliveryDate" type="xs:string"
        sawsdl:modelReference="SampleRetailOntology#DeliveryDate"/>
      <wsdl:element name="numBundles" type="xs:float"
        sawsdl:modelReference="SampleRetailOntology#NumBundles/>
    </xs:sequence>
  </xs:complexType>
</xs:element>
<SampleRetailOntology.owl#> rdf:type owl:Ontology  .
  :PartNumber rdf:type owl:Class;
     rdfs:subClassOf owl:Thing;
     owl:equivalentClass :UPC .
  :UPC rdf:type owl:Class;
     owl:equivalentClass :PartNumber .
  :NumBundles rdf:type owl:Class;
     owl:equivalentClass :Quantity .
  :Quantity rdf:type owl:Class;
     rdfs:subClassOf owl:Thing;
     owl:equivalentClass :NumBundles; .
  :DeliveryDate rdf:type owl:Class;
     rdfs:subClassOf owl:Thing;
     owl:equivalentClass owl:DueDate .
  :DueDate rdf:type owl:Class;
     owl:equivalentClass :DeliveryDate .

Internationalization

<env:Envelope>
 <env:Header>
  <i18n:international>
   <i18n:locale>en-US</i18n:locale>
   <i18n:preferences>
    <ldml:collation>
     <ldml:alias source="de_DE" type="phonebook"/>
    </ldml:collation>
   </i18n:preferences>
  </i18n:international>
  …
 </env:Header>
 <env:Body>
  …
 </env:Body>
</env:Envelope>

Thank you

More information at:

http://www.w3.org/2002/ws/