W3C home > Mailing lists > Public > www-ws-desc@w3.org > November 2003

The Department Directory: A Use Case for Abstract Interfaces in Service References

From: Arthur Ryman <ryman@ca.ibm.com>
Date: Tue, 4 Nov 2003 16:48:02 -0500
To: www-ws-desc@w3.org
Message-ID: <OFB2E55BC9.F63E3933-ON85256DD4.00777D64@ca.ibm.com>
The Department Directory: A Use Case for Abstract Interfaces in Service 
Arthur Ryman
In this application, a company plans to make its organization chart 
available by hosting a directory of departments and making it accessible 
as Web services. The directory contains information about each department, 
such as the department name, number, manager, employees, and other 
departments the report to it. There is a set of operations for querying 
and updating the department information. It is therefore natural to define 
a Web service interface for querying and updating a department. Each 
department will be represented as the endpoint of a Web service. 
Furthermore, our company wants to make the department directory available 
by several transports. Java applications within the firewall will use SOAP 
over JMS. Other users will use SOAP over HTTP. 

The point of this example is that two different transports use the same 
abstract interface. This is an important design goal for WSDL. Interfaces 
should not be coupled to bindings. Any support for service references 
should preserver this design goal.
SOAP Messages
Let's focus exclusively on the department reporting structure since that 
involves Web service references. For simplicity, let's define a single 
operation, getDepartments, which returns the set of departments that 
report to the current department. In this application, the address of each 
department service is defined by a URI. SOAP over HTTP uses the http or 
https scheme, while SOAP over JMS uses the jms scheme. We can therefore 
XML Schema simple type anyURI to represent the endpoint address of each 
department service.

For simplicity, suppose our company is W3C, the top level department is 
D001 and that D002, D003, and D004 report to it. For SOAP over HTTP, we'll 
use endpoint addresses like:
The SOAP request to getDepartments is:

          <q0:getDepartmentsRequest /> 

The SOAP response from getDepartments is:


For SOAP over JMS, the message formats will be the same but the endpoints 
with use the jms scheme instead of the http scheme.
WSDL Description
The following listing is a WSDL 1.1 description of the service:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="Department" 
        <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
            <xsd:element name="getDepartmentsResponse">
                        <xsd:element name="Department" type="xsd:anyURI" 
minOccurs="0" maxOccurs="unbounded"></xsd:element>
            <xsd:element name="getDepartmentsRequest">

    <wsdl:message name="getDepartmentsInput">
        <wsdl:part name="body" 
    <wsdl:message name="getDepartmentsOutput">
        <wsdl:part name="body" 
    <wsdl:portType name="DepartmentInterface">
        <wsdl:operation name="getDepartments">
            <wsdl:input message="tns:getDepartmentsInput"></wsdl:input>
            <wsdl:output message="tns:getDepartmentsOutput"></wsdl:output>
    <wsdl:binding name="DepartmentSOAPHTTPBinding" 
        <soap:binding style="document" 
transport="http://schemas.xmlsoap.org/soap/http" />
        <wsdl:operation name="getDepartments">
soapAction="http://example.w3c.org/Department/getDepartments" />
                <soap:body use="literal" />
                <soap:body use="literal" />
    <wsdl:binding name="DepartmentSOAPJMSBinding" 
        <soap:binding style="document" 
transport="http://schemas.xmlsoap.org/soap/jms" />
        <wsdl:operation name="getDepartments">
soapAction="http://example.w3c.org/Department/getDepartments" />
                <soap:body use="literal" />
                <soap:body use="literal" />
    <wsdl:service name="DepartmentService">
        <wsdl:port name="SOAPHTTPPort" 
            <soap:address location="http://www.w3c.org/Department/D001" />
        <wsdl:port name="SOAPJMSPort" 

The service contains two bindings, one for SOAP over HTTP and one for SOAP 
over JMS, each of which uses the same abstract interface, 
DepartmentInterface. To anchor the service, we publish the endpoint of the 
top level department in each of the bindings. If a message is sent using 
SOAP over HTTP then the response contains service references that are 
bound using SOAP over HTTP. Similarly, requests that use SOAP over JMS 
result in responses that contain SOAP over JMS responses. A client 
application can select the most appropriate binding, for a request, and 
the same binding is used in the response.

WSDL 1.1 gives no way to formally describe the interface and binding 
associated with the URIs that appear in the messages. WSDL Requirement R085 states that WSDL 2.0 should provide a way to do so.
This document describes a realistic use case for service references and 
shows the desirability of defining an abstract interface that can be used 
with multiple bindings. WSDL 2.0 should provide a way to describe the 
interface and binding type associated with service references in a way 
that enables reuses of interfaces with multiple bindings.

Arthur Ryman
Received on Tuesday, 4 November 2003 16:48:07 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:06:36 UTC