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

The Department Directory Use Case Using <wsdl:reference>

From: Arthur Ryman <ryman@ca.ibm.com>
Date: Wed, 5 Nov 2003 12:46:23 -0500
To: www-ws-desc@w3.org
Message-ID: <OF45B6A62A.8F78C5D6-ON85256DD5.006038DC@ca.ibm.com>
I posted a sample use case that described a Department Directory [1] which 
used services references to refer to departments that reported to the 
current department service endpoint. I gave a WSDL 1.1 description there. 
I then described why the service reference counterproposal [2] could not 
support this use case since it required putting binding information in the 
interface, thereby making the interface non abstract and non reusable for 
multiple bindings. 

Here I give the proposed WSDL 2.0 description of the Department Directory 
using the <wsdl:reference> element. Here the interface is fully abstract 
and reusable for both of the bindings.

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="Department" targetNamespace="http://example.w3c.org/Department" 
        xmlns:tns="http://example.w3c.org/Department" 
        xmlns:wsdl="http://www.w3.org/@@@@/@@/wsdl" 
        xmlns:soap="http://www.w3.org/@@@@/@@/wsdl/soap" 
        xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <wsdl:types>
                <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://example.w3c.org/Department">
                        <xsd:element name="getDepartmentsResponse">
                                <xsd:complexType>
                                        <xsd:sequence>
                                                <xsd:element name="Department" type="xsd:anyURI" minOccurs="0" maxOccurs="unbounded"></xsd:element>
                                        </xsd:sequence>
                                </xsd:complexType>
                        </xsd:element>
                        <xsd:element name="getDepartmentsRequest">
                                <xsd:complexType></xsd:complexType>
                        </xsd:element>

                </xsd:schema>
        </wsdl:types>
        <wsdl:interface name="DepartmentInterface">
                <wsdl:operation name="getDepartments">
                        <wsdl:input body="tns:getDepartmentsRequest"></wsdl:input>
                        <wsdl:output body="tns:getDepartmentsResponse">
                                <wsdl:reference type="xsd:anyURI" interface="tns:DepartmentInterface"/>
                        </wsdl:output>
                </wsdl:operation>
        </wsdl:interface>
        <wsdl:binding name="DepartmentSOAPHTTPBinding" type="tns:DepartmentInterface">
                <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
                <wsdl:operation name="getDepartments">
                        <soap:operation soapAction="http://example.w3c.org/Department/getDepartments" />
                        <wsdl:input>
                                <soap:body use="literal" />
                        </wsdl:input>
                        <wsdl:output>
                                <soap:body use="literal" />
                                <wsdl:reference type="xsd:anyURI" binding="tns:DepartmentSOAPHTTPBinding"/> 
                        </wsdl:output>
                </wsdl:operation>
        </wsdl:binding>
        <wsdl:binding name="DepartmentSOAPJMSBinding" type="tns:DepartmentInterface">
                <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/jms" />
                <wsdl:operation name="getDepartments">
                        <soap:operation soapAction="http://example.w3c.org/Department/getDepartments" />
                        <wsdl:input>
                                <soap:body use="literal" />
                        </wsdl:input>
                        <wsdl:output>
                                <soap:body use="literal" />
                                <wsdl:reference type="xsd:anyURI" binding="tns:DepartmentSOAPJMSBinding"/> 
                        </wsdl:output>
                </wsdl:operation>
        </wsdl:binding>
        <wsdl:service name="DepartmentService">
                <wsdl:endpoint name="SOAPHTTPPort" binding="tns:DepartmentSOAPHTTPBinding">
                        <soap:address location="http://www.w3c.org/Department/D001" />
                </wsdl:endpoint>
                <wsdl:endpoint name="SOAPJMSPort" binding="tns:DepartmentSOAPJMSBinding">
                        <soap:address location="jms:/queue?destination=jms/queue&amp;connectionFactory=jms/qcf&amp;targetService=Department/D001" 
/>
                </wsdl:endpoint>
        </wsdl:service>
</wsdl:definitions>

Arthur Ryman

[1] http://lists.w3.org/Archives/Public/www-ws-desc/2003Nov/0037.html
[2] http://lists.w3.org/Archives/Public/www-ws-desc/2003Nov/0041.html



Received on Wednesday, 5 November 2003 12:49:29 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:58:27 GMT