W3C

Semantic Annotations for WSDL — Usage Guide

Editors' Copy $Date: 2006/08/24 02:44:31 $

This version:
http://www.w3.org/2002/ws/sawsdl/spec/examples/
Latest version:
http://www.w3.org/2002/ws/sawsdl/spec/examples/
Editors:
Rama Akkiraju, IBM Research, New York
Brahmananda Sapkota, DERI Galway

Abstract

Web services provide a standards-based foundation for exchanging information between distributed software systems. The World-Wide Web Consortium (W3C) standard Web Services Description Language (WSDL) specifies a standard way to describe the interfaces of a Web Service at a syntactic level and how to invoke it. While the syntactic descriptions provide information about the structure of input and output messages of an interface and how to invoke them, semantics are needed to describe what a Web service actual does. These semantics when expressed in formal languages disambiguate the description of Web services interfaces paving the way for automatic discovery, composition and integration of software components. WSDL does not explicitly provide any mechanisms to specify the semantics of a Web service. Semantic Annotations for WSDL (SAWSDL) is an effort to define mechanisms by which semantic annotations can be added to WSDL components. This usage guide is an accompanying document to SAWSDL specification. It presents examples to illustrate how to associate semantic annotations for a Web service (represented in SAWSDL format) that could be used for service classification, discovery, matching, composition, and invocation.

Status of this Document

This document is an editors' copy produced by the Semantic Annotations for Web Services Description Language Working Group and has no official standing at this time.

Table of Contents

Appendices

1. Introduction

As the set of available Web Services expands, it becomes increasingly important to have automated tools to help identify services that match a requester's requirements. Finding suitable Web services automatically depends on the facilities available for service providers to describe the capabilities of their services and for service requesters to describe their requirements in an unambiguous and ideally, machine-interpretable form. Adding semantics to represent the requirements and capabilities of Web services is essential for achieving this unambiguity and machine-interpretability. The World-Wide Web Consortium (W3C) standard Web Services Description Language (WSDL) specifies a standard way to describe the interfaces of a Web Service at a syntactic level and how to invoke it. However, WSDL does not explicitly provide any mechanisms to specify the semantics of a Web service. Semantic Annotations for WSDL (SAWSDL) is an effort to define mechanisms by which semantic annotations can be added to WSDL components. This usage guide is an accompanying document to SAWSDL specification. It presents examples to illustrate how to associate semantic annotations for a Web service (represented in SAWSDL format) that could be used for classifying, discovering, matching, composing, and invoking Web services.

Semantics play an important role in all aspects of the lifecycle of Web services. During development, a service provider can explicate the intended semantics by annotating the appropriate parts of the Web service with concepts from a richer semantic model. Since semantic models provide agreement on the terms and intended use of terms, and may provide formal and informal definitions of the entities, there will be less ambiguity in the intended semantics of the provider. During discovery, a service requestor can describe the service requirements using terms from the semantic model. Reasoning techniques can be used to find the semantic similarity between the service description and the request. During composition, these annotations can be used to aggregate the functionality of multiple services to create useful service compositions. Therefore, once represented, semantics can be leveraged by tools to automate service discovery, mediation, composition and monitoring.

The sections in this document are organized to show how to associate semantic annotations (that are specified in SAWSDL format) with a WSDL document for use in service classification, discovery, matching, composition and invocation in that order.

1.1 Terminology

We provide basic definitions for the terminology we use in this document.

1.2 Notational Conventions

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC2119 [keywords].

1.3 Namespaces

The XML namespace names [XMLNamespace] URIs [URI] used by this specification are as follows:

Prefix Namespace name
xs http://www.w3.org/2001/XMLSchema#
sawsdl http://www.w3.org/2002/ws/sawsdl/spec/sawsdl#
wsdl http://www.w3.org/2006/01/wsdl

2. Defining annotations to classify a Web service in a service registry

A Web service can be semantically annotated to carry categorization information that could be used to publish it in a service registry. SAWSDL extension mechanism modelReference can be used to add this categorization information to Web services. This categorization information could be used when automatically publishing services in registries such as UDDI. Below, we illustrate a couple of ways by which categorization information can be associated with a Web service.

a. If a categorization domain model already exists (for example a taxonomy), then a modelReference element could be defined on an interface of a Web service to point to a particular concept in the hierarchy. For example, if a purchase order categorization was created as shown below (in OWL), then the interface of an item availability check Web service could be annotated with categorization information as shown.

<?xml version="1.0"?> <rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:xs="http://www.w3.org/2001/XMLSchema#"
  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
  xmlns:owl="http://www.w3.org/2002/07/owl#"
  xmlns="http://www.owl-ontologies.com/unnamed.owl#"
  xml:base="http://www.owl-ontologies.com/unnamed.owl">

  <owl:Ontology rdf:about=""/>
    <owl:Class rdf:ID="OrderModification">
      <rdfs:subClassOf>
        <owl:Class rdf:ID="PurchaseOrderServices"/>
      </rdfs:subClassOf>
    </owl:Class>
    <owl:Class rdf:ID="ItemAvailabilityCheck">
      <rdfs:subClassOf rdf:resource="#PurchaseOrderServices"/>
    </owl:Class>
    <owl:Class rdf:ID="OrderPlacement">
      <rdfs:subClassOf rdf:resource="#PurchaseOrderServices"/>
    </owl:Class>
    <owl:Class rdf:ID="ProductInfoInquiry">
      <rdfs:subClassOf rdf:resource="#PurchaseOrderServices"/>
    </owl:Class>
    <owl:Class rdf:ID="OrderTracking">
      <rdfs:subClassOf rdf:resource="#PurchaseOrderServices"/>
    </owl:Class>
</rdf:RDF> 
    ...
<wsdl:interface name="CheckItemAvailability"
  sawsdl:modelReference="http://example.org/categorization/PurchaseOrderServices/ItemAvailability">
    ...
</wsdl:interface>
    ...

b. For taxonomies that require additional information about the category, users can define additional information as per the requirements and associate a modelReference to point to such user-defined taxonomic information. For example, if a particular taxonomy specifies three pieces of information namely, the name of the taxonomy, the specific categorization in the taxonomy and unique code for that taxonomy, then, it can be defined as follows.

<rdf:RDF>
<rdfs:Class rdf:about="http://www.w3.org/2002/ws/sawsdl/spec/ontology/interface#Category"/>
  <rdf:Property rdf:about="http://www.w3.org/2002/ws/sawsdl/spec/ontology/interface#hasValue">
    <rdfs:domain rdf:resource="http://www.w3.org/2002/ws/sawsdl/spec/ontology/interface#Category"/>
    <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
  </rdf:Property>
  <rdf:Property rdf:about="http://www.w3.org/2002/ws/sawsdl/spec/ontology/interface#usesTaxonomy">
    <rdfs:domain rdf:resource="http://www.w3.org/2002/ws/sawsdl/spec/ontology/interface#Category"/>
    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#anyUri"/>
  </rdf:Property>
</rdf:RDF>

Then, the following xml that adheres to the above schema can be defined and either imported or inserted into the WSDL file whose interface is to be annotated.

<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:if="http://www.w3.org/2006/ws/sawsdl/spec/ontology/interface#">

  <if:Category rdf:about="urn:Electronics"
      if:hasValue="443112"
      if:usesTaxonomy="http://naics.com/"/>
</rdf:RDF>

The annotation can be associated as follows.

<wsdl:interface name="CheckItemAvailability"
  sawsdl:modelReference="interface#Electronics">

  ...

</wsdl:interface>

Using similar modelReference annotation operations within an interface can also be annotated. SAWSDL does not specify any relationship between the categorization information specified at the level of an interface and the one that is specified on an operation that is contained within that interface.

3. Defining annotations for use in matching and composing Web services

One of the main motivations for SAWSDL specification is to provide mechanisms using which semantic annoations can be added to WSDL documents to enable automatic matching and composition of Web services. In this section we present some examples to show how to add such annotations for use during Web service matching and composition. First we present an example to illustrate the use of annotations in Web service matching.

3.1 A Web service matching example

Let's consider the following two WSDL files. The first one is a request to verify the availability of an item from a preferred supplier represented as a WSDL and the second one is a service offered by a service provider that enables the requesters to check for the availability of items it offers. Specifically, the request WSDL codifies the inputs it can supply and the outputs it expects of an item availability check service by the service provider. The service WSDL specifies the interface of a service that allows requesters to check for the availability of an inventory item by exposing the inputs it requires in order to provide item availability confirmation. At a high level the service offered by the service provider should match the request. However, the differences in the vocabulary used by the two services to represent their interfaces may get in the way of making a match. For example, the term PartNum used by the requester and the term UPC used by the provider both are meant to uniquely identify the item in question. Also, the term qty used by the requester and the term numBundles used by the provider both in this context may refer to the number of items (in one case, it is the number of items being requested and in the other case, it is the number of items being offered). However, a matching engine may not have sufficient information to identify them as related terms unless explicitly specified. Semantic annotations, in cases such as these, could be quite helpful. If there was a semantic model that captures the relationships between various terms that the requesters and the providers use in their Web services, one could annotate the request and service WSDLs as follows using the modelReference extensibility element. This information can be used by semantic engines to match the Web service interfaces.

<wsdl:definitions
  targetNamespace="http://uima.semantica.ibm.com.wsdl/CheckAvailabilityRequestService/">

  <wsdl:message name="CheckAvailabilityRequestServiceRequest">
    <wsdl:part name="partNum" type="xs:string"
      sawsdl:modelReference="SampleRetailOntology#PartNumber"/>
    <wsdl:part name="Date" type="xs:string"
      sawsdl:modelReference="SampleRetailOntology#DeliveryDate"/>
    <wsdl:part name="qty" type="xs:float"
      sawsdl:modelReference="SampleRetailOntology#Quantity
  </wsdl:message>

  <wsdl:message name="CheckAvailabilityRequestServiceResponse">
    <wsdl:part name="itemConfirmation" type="xsd:boolean"
      sawsdl:modelReference="SampleRetailOntology#AvailabilityConfirmation"/>
  </wsdl:message>

  <wsdl:portType name="CheckAvailabilityRequestService">
    <wsdl:operation name="checkAvailabilityRequestService">
      <wsdl:input message="tns:CheckAvailabilityRequestServiceRequest" name="checkAvailabilityRequestServiceRequest"/>
      <wsdl:output message="tns:CheckAvailabilityRequestServiceResponse" name="checkAvailabilityRequestServiceResponse"/>
    </wsdl:operation>
  </wsdl:portType>

</wsdl:definitions>

The above WSDL snippet represents one of the ways of semantically annotating WSDL document of the request for checking item availability.

<wsdl:definitions
  targetNamespace="http://uima.semantica.ibm.com.wsdl/CheckInventoryService/">

  <wsdl:message name="CheckInventoryServiceRequest">
    <wsdl:part name="UPC" type="xs:string"
      sawsdl:modelReference="SampleRetailOntology#UPC"/>
    <wsdl:part name="DeliveryDate" type="xs:string"
      sawsdl:modelReference="SampleRetailOntology#ShipDate"/>
    <wsdl:part name="numBundles" type="xs:float"
      sawsdl:modelReference="SampleRetailOntology#Bundle"/>
  </wsdl:message>

  <wsdl:message name="CheckInventoryServiceResponse">
    <wsdl:part name="conf" type="xs:boolean"
      sawsdl:modelReference="SampleRetailOntology#Confirmation"/>
    <wsdl:part name="numBundles_available" type="xs:string"
      sawsdl:modelReference="SampleRetailOntology#Bundle"/>
  </wsdl:message>

  <wsdl:portType name="CheckInventoryService">
    <wsdl:operation name="checkInventoryService">
      <wsdl:input message="tns:CheckInventoryServiceRequest" name="checkInventoryServiceRequest"/>
      <wsdl:output message="tns:CheckInventoryServiceResponse" name="checkInventoryServiceResponse"/>
    </wsdl:operation>
  </wsdl:portType>

</wsdl:definitions>

The above WSDL snippet represents a way of semantically annotating the WSDL document of the service offered by the service provider for checking item availability.

As can be noted, both WSDL documents in this example are annotated with concepts from the same domain model – SampleRetailOntology. This ontology contains relationships between concepts such as PartNum and UPC and Quantity and Bundle. The relationships can be inferred during Web service interface matching by parsing and reasoning over the domain model. SampleRetailOntology that is referenced in the above two WSDL documents is shown below.

sampleRetailOntology

Figure 1: A simple sample ontology used to annotate item availability request WSDL

<?xml version="1.0"?>
<rdf:RDF
  xmlns="http://www.mynamespace.com/SampleRetailOntology.owl#"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
  xmlns:owl="http://www.w3.org/2002/07/owl#"
  xml:base="http://www.mynamespace.com/SampleRetailOntology.owl">

  <owl:Ontology rdf:about=""/>
  <owl:Class rdf:ID="PartNumber">
    <rdfs:subClassOf rdf:resource="http://www.w3.org/2002/07/owl#Thing"/>
    <owl:equivalentClass>
      <owl:Class rdf:ID="UPC"/>
    </owl:equivalentClass>
  </owl:Class>

  <owl:Class rdf:about="#UPC">
    <owl:equivalentClass rdf:resource="#PartNumber"/>
  </owl:Class>

  <owl:Class rdf:ID="ShipDate">
    <owl:equivalentClass>
      <owl:Class rdf:ID="DeliveryDate"/>
    </owl:equivalentClass>
  </owl:Class>

  <owl:Class rdf:ID="Quantity">
    <owl:equivalentClass>
      <owl:Class rdf:ID="Bundle"/>
    </owl:equivalentClass>
    <rdfs:subClassOf rdf:resource="http://www.w3.org/2002/07/owl#Thing"/>
  </owl:Class>

  <owl:Class rdf:about="#Bundle">
    <owl:equivalentClass rdf:resource="#Quantity"/>
  </owl:Class>

  <owl:Class rdf:about="#DeliveryDate">
    <owl:equivalentClass rdf:resource="#ShipDate"/>
    <rdfs:subClassOf rdf:resource="http://www.w3.org/2002/07/owl#Thing"/>
  </owl:Class>
</rdf:RDF> 

It is to be noted that SAWSDL specifies mechanisms to annotate WSDLs but does not say anything about how these annotations are generated. These annotations can either be created manually or by tools that can infer relationships between the terms used in the WSDLs and those that are given in a domain model. Also, SAWSDL does not say anything about how the domain models themselves are created. Just like the creation of annotations, these domain models can either be created manually by a human expert or generated automatically using ontology learning tools or by a combination of both.

In the next section, we extend the above item availability check example to show how semantic annotations added to a WSDL can be used to compose Web services.

3.2 A Web service composition example

Suppose that in the above example, the direct relationship between the concepts PartNumber and UPC is unspecified in the ontology. Also, suppose that there is another Web service PartNumber2EANLookup ( ) that can take a PartNumber as input and produce EAN code. In retail industry domain, it turns out EAN code is a superset of UPC Code i.e., scanners equipped to read EAN symbols can read UPC symbols as well. So, if we capture this information in the ontology and then annotate the WSDL input and output parameters accordingly, these annotations can be used to match checkAvailabilityRequestService ( ) operation with checkInventoryServiceRequest ( ) operation via PartNumber2EANLookup ( ) service as shown in the figure below. In other words the operations PartNumber2EANLookup ( ) and CheckInventoryService ( ) can be composed together using the semantic annotations provided on the request as well the two available WSDLs.

The following semantically annotated WSDL document represents the PartNumber2EANLookup service.

<wsdl:definitions
  targetNamespace="http://uima.semantica.ibm.com.wsdl/PartNumber2EANLookupService/">

  <wsdl:message name="PartNumber2EANLookupServiceRequest">
    <wsdl:part name="PartNumber" type="xs:string"
      sawsdl:modelReference="SampleRetailOntology#PartNumber"/>
  </wsdl:message>

  <wsdl:message name="PartNumber2EANLookupServiceResponse">
    <wsdl:part name="EAN" type="xs:string"
      sawsdl:modelReference="SampleRetailOntology#EAN"/>
  </wsdl:message>

  <wsdl:portType name="PartNumber2EANLookupService">
    <wsdl:operation name="partNumber2EANLookupService">
      <wsdl:input message="tns:PartNumber2EANLookupServiceRequest" name="partNumber2EANLookupServiceRequest"/>
      <wsdl:output message="tns:PartNumber2EANLookupServiceResponse" name="partNumber2EANLookupServiceResponse"/>
    </wsdl:operation>
  </wsdl:portType>

</wsdl:definitions>

The following represents the udated sample retail ontology that enables composition in this example.

<?xml version="1.0"?>
<rdf:RDF
  xmlns="http://www.mynamespace.com/SampleRetailOntology-Version1.owl#"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
  xmlns:owl="http://www.w3.org/2002/07/owl#"
  xml:base="http://www.mynamespace.com/SampleRetailOntology-Version1.owl">

  <owl:Ontology rdf:about=""/>
  <owl:Class rdf:ID="DeliveryDate">
    <rdfs:subClassOf rdf:resource="http://www.w3.org/2002/07/owl#Thing"/>
      <owl:equivalentClass>
      <owl:Class rdf:ID="ShipDate"/>
    </owl:equivalentClass>
  </owl:Class>

  <owl:Class rdf:about="#ShipDate">
    <owl:equivalentClass rdf:resource="#DeliveryDate"/>
  </owl:Class>

  <owl:Class rdf:ID="EAN">
    <owl:equivalentClass>
      <owl:Class rdf:ID="PartNumber"/>
    </owl:equivalentClass>
  </owl:Class>

  <owl:Class rdf:ID="Quantity">
    <owl:equivalentClass>
      <owl:Class rdf:ID="Bundle"/>
    </owl:equivalentClass>
    <rdfs:subClassOf rdf:resource="http://www.w3.org/2002/07/owl#Thing"/>
  </owl:Class>

  <owl:Class rdf:about="#Bundle">
    <owl:equivalentClass rdf:resource="#Quantity"/>
  </owl:Class>

  <owl:Class rdf:about="#PartNumber">
    <rdfs:subClassOf rdf:resource="http://www.w3.org/2002/07/owl#Thing"/>
    <owl:equivalentClass rdf:resource="#EAN"/>
  </owl:Class>

  <owl:Class rdf:ID="UPC">
    <rdfs:subClassOf rdf:resource="#EAN"/>
  </owl:Class>
</rdf:RDF>

The following figure represents an altered version of the ontology that enables composition in this example.

sampleRetailOntology-Mediation

Figure 2: An altered version of the simple sample retail ontology that enables composition

Figure 3 shows how Web service composition can be achieved by using the semantic annotations in the WSDL files discussed in this example.

sampleRetailOntology-Mediation

Figure 3: A Possible Web Service Composition Scenario

3.3 Associating Multiple Annotations with Simple Types

SAWSDL allows multiple annotations to be associated with those WSDL elements that can have a modelReference extension. These annotations could be pointing to different concepts from the same domain model or from different models altogether. For example, a WSDL element with the name partNum can be associated with both SampleRetailOntology#PartNumber and SampleRetailOntology#UPC concepts. SAWSDL does not specify any relationship between these multiple annotations other than saying that they all apply. It is upto the consumers of these annotated WSDLs to use the ones that are relevant to them or to figure out the relationship between the concepts, if they so choose, by consulting the ontology that defines them.

<wsdl:message
name="CheckAvailabilityRequestServiceRequest">
    <wsdl:part name="partNum" type="xs:string"
      sawsdl:modelReference="SampleRetailOntology#PartNumber" "SampleRetailOntology#UPC"/>
      ...

Best Practice Recommendation

Best Practice Recommendation #1: Since SAWSDL allows multiple annotations on WSDL elements that can have modelReference extension, one could be tempted to use this feature to overcome the ontology deficiencies. For example, practices such as below are discouraged.

<part name="fullName"
  sawsdl:modelReference="ontology#FirstName" "ontology#LastName"/>

In this example, fullName is not at the same level as ontology#FirstName, ontology#LastName. Ideally, the ontology should be amended to contain a high-level concept called ontology#Name that is an aggregation of the contepts ontology#FirstName and ontology#LastName and this high-level concept should be used to annotate fullName. Adding multiple annotations in this case, though not forbidden, is not recommended because the annotations are not at the same level. Therefore, a recommended best practice is to amend the ontology to contain concepts that are at the same level as the xsd elements that are being annotated. In summary, avoid using multiple annotations to overcome the ontology deficiencies.

3.4 Annotating complex types

In the above example, all elements are represented as simple types. The samples below illustrate the usage of modelReference for annotating elements within a complex type.

<wsdl:types>
  ...
  <xs:element name="CheckInventoryServiceRequest">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="partNum" type="xs:string"
          sawsdl:modelReference="SampleRetailOntology#PartNumber"/>
          <wsdl:element name="DeliveryDate" type="xs:string"
            sawsdl:modelReference="SampleRetailOntology#ShipDate"/>
          <wsdl:element name="numBundles" type="xs:string"
            sawsdl:modelReference="SampleRetailOntology#Bundle/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  ...
</wsdl:types>

Annotations can also be added directly on a complex type using modelReference element. In such a case, SAWSDL does not specify any relationship between the modelReferences on a complex type and those on the elements contained within a complex type. The following example illustrates annotating a complex type itself.

<wsdl:types>
  ...
  <xs:element name="CheckInventoryServiceRequest">

  <xs:complexType
      sawsdl:modelReference="SampleRetailOntology#InventoryCheckInputs>
      <xs:sequence> <xs:element name="partNum" type="xs:string"
        sawsdl:modelReference="SampleRetailOntology#PartNumber"/>
        <wsdl:element name="DeliveryDate" type="xsd:string"
          sawsdl:modelReference="SampleRetailOntology#ShipDate"/>
        <wsdl:element name="numBundles" type="xs:string"
          sawsdl:modelReference="SampleRetailOntology#Bundle/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  ...
</wsdl:types> 

So far, we have discussed how to annotate WSDL documents with semantic concepts for use in Web service matching and composition. Next we discuss the mechanisms defined in SAWSDL to enable Web service invocation.

4. Defining schema mappings to enable Web service invocation

The main purpose of semantic annotations that have been described so far is to aid semantic matching engines in matching and composing Web service interfaces. These annotations are meant to add semantic clarity to WSDL elements by pointing to concepts in a semantic model that describes the larger context. However, modelReferences, as they are defined, are typically meant for making one-to-one or one-to-many associations between WSDL elements and the concepts in a semantic model. For example, an XML element with a name partNum was associated with an ontological concept called PartNumber. Similarly, an XML element with a name qty was associated with an ontological concept Quantity. In case of one-to-many, an XML element called partNum could be associated with both PartNumber and UPC ontological concepts. As mentioned in the SAWSDL spec, in this case both concepts apply. Semantic engines can choose to use both concepts during matching. However, such one-to-one and one-to-many semantic annotations need to be augmented with data transformations to facilitate invocation. For example, consider the following snippet of a WSDL document.

..
  <xs:element name="firstName" type=xs:string/>
  <xs:element name="lastName" type=xs:string/>
...

In this XML fragment, full name is represented as two parts: a firstName element and a lastName element. If this WSDL document were to be matched with another WSDL document consisting of a concept called fullName, then the firstName and lastName concepts would have to be concatenated to match with a fullName concept. To facilitate such types of data transformations, SAWSDL provides a mechanism called schemaMapping. A schemaMapping concept is provided to allow the specification of transformation functions on the WSDL elements to map data values of these elements to instance data of the concepts in a semantic model. Conversely, functions representing the transformation of instance data of ontological concepts to match with the data values of WSDL elements can also be specified to enable matching in both directions. In the former case, the transformation functions are referred to using the extensibility feature liftingSchemaMapping and in the latter case it is called loweringSchemaMapping. When used together the lifting and lowering schema mapping transformation functions can help map the data values of the interfaces of the two Web services - an important step toward invoking a Web service. The following example illustrates lifting and lowering schema mapping notions.

<wsdl:types>
  <xs:schema
    targetNamespace="http://www.w3.org/2002/ws/sawsdl/spec/wsdl/order#" elementFormDefault="qualified">

    <xs:element name="OrderRequest">
      <xs:complexType sawsdl:modelReference="schemaMappingNS#OrderRequest.xslt">
        <xs:sequence>
          <xs:element name="firstName" type="xs:integer" />
          <xs:element name="lastName" type="xs:integer" />
          <xs:element name="item" type="item" minOccurs="1" maxOccurs="unbounded" />
        </xs:sequence>
      </xs:complexType>
    </xs:element>

    <xs:complexType name="item">
      <xs:all>
        <xs:element name="partNum" type="xs:string" />
        <xs:element name="quantity" type="xs:float"/>
        <xs:element name="shipDate" type="xs:string"/>
        <xs:element name="billingInfo" type="xsd1:POBilling"/>
      </xs:all>
    </xs:complexType>

    <xs:element name="OrderResponse" type="Confirmation"/>
    <xs:simpleType name="Confirmation">
      <xs:restriction base="xs:string">
        <xs:enumeration value="Confirmed"/>
        <xs:enumeration value="Pending"/>
        <xs:enumeration value="Rejected"/>
      </xs:restriction>
    </xs:simpleType>
  </xs:schema>
</wsdl:types>

<wsdl:interface name="Order">
  <wsdl:operation name="order" pattern="http://www.w3.org/2006/01/wsdl/in-out">
    <wsdl:input element="OrderRequest"/>
    <wsdl:output element="OrderResponse"/>
  </wsdl:operation> </wsdl:interface>
</wsdl:description>
....
<TODO #4: Create the XSLT example to to show lifting and lowering schema mappings for this example>
<TODO #5: Add text to discuss how modelReferences for complex types contained within complex types work>

5. Best Practices

<TODO#6: Think of other best practices that we may want to add here>

6. References

A. An Example (Non-Normative)

<TODO #7: Fix the following WSDLs to have all aspects of
annotations discussed in this document i.e,. annotations on complex types,
schema Mappings on complex types, ontology fixes so that it contains all
the concepts and their relationships>

The sample WSDL files and the ontology used in this document are given below.

Request: Please see http://www.w3.org/2002/ws/sawsdl/spec/examples/wsdl/CheckAvailability-req-sem.wsdl
Service: Please see http://www.w3.org/2002/ws/sawsdl/spec/examples/wsdl/CheckInventory-sem.wsdl,
Ontology: Please see http://www.w3.org/2002/ws/sawsdl/spec/examples/wsdl/SampleRetailOntology.owl

B. Acknowledgements (Non-Normative)

This document is the work of the W3C Semantic Annotations for Web Service Description Language Working Group.

Members of the Working Group are (at the time of writing, and by alphabetical order): Rama Akkiraju (IBM Corporation), Carine Bournez (W3C), J.B. Domingue (The Open University), Joel Farrell (IBM Corporation), Laurent Henocque (ILOG, S.A.), Mathias Kleiner (ILOG, S.A.), Jacek Kopecký (DERI Innsbruck at the Leopold-Franzens-Universität Innsbruck, Austria), Holger Lausen (DERI Innsbruck at the Leopold-Franzens-Universität Innsbruck, Austria), Eric Prud'hommeaux (W3C), Brahmananda Sapkota (DERI Galway at the National University of Ireland, Galway, Ireland), Amit Sheth (Semagix, Inc.).

C. Change Log (Non-Normative)

Table B-1. Summary of Changes Related to Semantic Annotations for WSDL Specification — Use Cases and Examples
Date Author Description
20060508 BNS Initial skeleton created from Rama's document
20060515 BNS WSDL-S files attached to Sections 4.1, 5.1 and 5.2 sent by Rama
Section 6 added from Rama's document
20060614 BNS, RA Best Practices Section 7 added.
20060814 RA Completely revamped and rewrote the document. The focus of the document is now on how to associate semantic annotations with a WSDL document for use in service matching, composition and invocation NOT on how to do matching, composition and invocation using semantic annotations.
Still some sections need some more work.
20060815 BNS Some clean ups.
20060816 RA Many more cleanups. Writeups for some more sections. Examples are much cleaner now and there is really only one running example that we keep building throughout the document. More Todos to be finished up still.
20060819 BNS Added schemaMapping examples.
20060821 BNS Added PartNumber2EANLookup SAWSDL examples.
20060823 RA Many more cleanups and additions to the sections. Created more images and text throughout the document to explain things better. Added a better example in the schemaMapping section. This should be more amenable to creating schema mappings (in XSLT or RDF). The placement of images need some cleanup. Some how things are getting justified to be in the middle. Even if I change it to left justification, it doesn't seem to work. The formatting needs cleanup as well.
20060824 BNS Clean up, and some additions in section 4.


D. Editors' Todo List (Non-Normative)


Table C-1. Summary of Editors' Semantic Annotations for WSDL Specification — Use Cases and Examples Work Items
Item Description
Item 1 The WSDL files attached in Sections 4.1, 5.1 and 5.2 are annotated using WSDL-S format.
They need to be revised after the revisions in SAWSDL.
Item 2 To add other use cases and examples from:
http://lsdis.cs.uga.edu/projects/meteor-s/Use-Cases/index.php?page=2.


Valid XHTML 1.0 Strict