Previous section   Next section

A.2 WSDL File for the Document-Style Book Web Service

This WSDL file describes a document-style variant of the book web service. It forms the basis of the example in Section 6.6.2.1.

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" 
   xmlns:tns="urn:jwsnut.chapter6.docbookservice/wsdl/DocBookQuery"
   xmlns:typesns="urn:jwsnut.chapter6.docbookservice/types/DocBookQuery"  
   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
   xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
   name="DocBookQuery" 
   targetNamespace="urn:jwsnut.chapter6.docbookservice/wsdl/DocBookQuery">
  <types>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" 
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
            xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" 
            xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
            targetNamespace=
             "urn:jwsnut.chapter6.docbookservice/types/DocBookQuery">
      <element name="BookCountRequest">
        <complexType>
          <sequence/>
        </complexType>
      </element>         
      <element name="BookCountResponse">
        <complexType>
          <sequence>
            <element name="result" type="xsd:int"/>
          </sequence>
        </complexType>
      </element>
      <element name="BookTitleRequest">
        <complexType>
          <sequence>
            <element name="index" type="xsd:int"/>
          </sequence>
        </complexType>
      </element>
      <element name="BookTitleResponse">
        <complexType>
          <sequence>
            <element name="result" type="xsd:string"/>
          </sequence>
        </complexType>
      </element>
      <element name="BookAuthorRequest">
        <complexType>
          <sequence>
            <element name="title" type="xsd:string"/>
          </sequence>
        </complexType>
      </element>
      <element name="BookAuthorResponse">
        <complexType>
          <sequence>
            <element name="author" type="xsd:string"/>
          </sequence>
        </complexType>
      </element>
      <element name="BookInfoRequest">
        <complexType>
          <sequence>
            <element name="title" type="xsd:string"/>
          </sequence>
        </complexType>
      </element>
      <element name="BookInfo">
        <complexType>
          <sequence>
            <element name="title" type="xsd:string"/>
            <element name="author" type="xsd:string"/>
            <element name="editor" type="xsd:string"/>
            <element name="price" type="xsd:double"/>
            <element name="stock" type="xsd:int"/>
          </sequence>
        </complexType>
      </element>
      <element name="StockInfoRequest">
        <complexType>
          <sequence>
            <element name="title" type="xsd:string"/>
          </sequence>
        </complexType>
      </element>
      <element name="StockInfoResponse">
        <complexType>
          <sequence>
            <element name="stock" type="xsd:nonNegativeInteger"/>
          </sequence>
        </complexType>
      </element>
    </schema>
  </types>
  <message name="DocBookQuery_getBookCount">
    <part name="body" element="typesns:BookCountRequest"/>
  </message>
  <message name="DocBookQuery_getBookCountResponse">
    <part name="result" element="typesns:BookCountResponse"/>
  </message>
  <message name="DocBookQuery_getBookTitle">
    <part name="body" element="typesns:BookTitleRequest"/>
  </message>
  <message name="DocBookQuery_getBookTitleResponse">
    <part name="result" element="typesns:BookTitleResponse"/>
  </message>
  <message name="DocBookQuery_getBookAuthor">
    <part name="title" element="typesns:BookAuthorRequest"/>
  </message>
  <message name="DocBookQuery_getBookAuthorResponse">
    <part name="author" element="typesns:BookAuthorResponse"/>
  </message>
  <message name="DocBookQuery_getBookInfo">
    <part name="title" element="typesns:BookInfoRequest"/>
  </message>
  <message name="DocBookQuery_getBookInfoResponse">
    <part name="result" element="typesns:BookInfo"/>
  </message>
  <message name="DocBookQuery_getStockInfo">
    <part name="title" element="typesns:StockInfoRequest"/>
  </message>
  <message name="DocBookQuery_getStockInfoResponse">
    <part name="result" element="typesns:StockInfoResponse"/>
  </message>
  <portType name="DocBookQuery">
    <operation name="getBookCount" parameterOrder="">
      <input message="tns:DocBookQuery_getBookCount"/>
      <output message="tns:DocBookQuery_getBookCountResponse"/>
    </operation>
    <operation name="getBookTitle" parameterOrder="index">
      <input message="tns:DocBookQuery_getBookTitle"/>
      <output message="tns:DocBookQuery_getBookTitleResponse"/>
    </operation>
    <operation name="getBookAuthor" parameterOrder="title author">
      <input message="tns:DocBookQuery_getBookAuthor"/>
      <output message="tns:DocBookQuery_getBookAuthorResponse"/>
    </operation>
    <operation name="getBookInfo" parameterOrder="title result">
      <input message="tns:DocBookQuery_getBookInfo"/>
      <output message="tns:DocBookQuery_getBookInfoResponse"/>
    </operation>
    <operation name="getStockInfo" parameterOrder="title">
      <input message="tns:DocBookQuery_getStockInfo"/>
      <output message="tns:DocBookQuery_getStockInfoResponse"/>
    </operation>
  </portType>
  <binding name="DocBookQueryBinding" type="tns:DocBookQuery">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" 
                  style="document"/>
    <operation name="getBookCount">
      <soap:operation soapAction=""/>
      <input>
        <soap:body use="literal" 
          namespace="urn:jwsnut.chapter6.docbookservice/wsdl/DocBookQuery"/>
      </input>
      <output>
        <soap:body use="literal" namespace="urn:jwsnut.chapter6.
           docbookservice/wsdl/DocBookQuery"/>
      </output>
    </operation>
    <operation name="getBookTitle">
      <soap:operation soapAction=""/>
      <input>
        <soap:body use="literal" namespace="urn:jwsnut.chapter6.
           docbookservice/wsdl/DocBookQuery"/>
      </input>
      <output>
        <soap:body use="literal" namespace="urn:jwsnut.chapter6.
           docbookservice/wsdl/DocBookQuery"/>
      </output>
    </operation>
    <operation name="getBookAuthor">
      <soap:operation soapAction=""/>
      <input>
        <soap:body use="literal" namespace="urn:jwsnut.chapter6. 
           docbookservice/wsdl/DocBookQuery"/>
      </input>
      <output>
        <soap:body use="literal" namespace="urn:jwsnut.chapter6.
           docbookservice/wsdl/DocBookQuery"/>
      </output>
    </operation>
    <operation name="getBookInfo">
      <soap:operation soapAction=""/>
      <input>
        <soap:body use="literal" namespace="urn:jwsnut.chapter6.
            docbookservice/wsdl/DocBookQuery"/>
      </input>
      <output>
        <soap:body use="literal" namespace="urn:jwsnut.chapter6.
           docbookservice/wsdl/DocBookQuery"/>
      </output>
    </operation>
    <operation name="getStockInfo">
      <soap:operation soapAction=""/>
      <input>
        <soap:body use="literal" namespace="urn:jwsnut.chapter6.
           docbookservice/wsdl/DocBookQuery"/>
      </input>
      <output>
        <soap:body use="literal" namespace="urn:jwsnut.chapter6.
           docbookservice/wsdl/DocBookQuery"/>
      </output>
    </operation>
  </binding>
  <service name="DocBookService">
    <port name="DocBookQueryPort" binding="tns:DocBookQueryBinding">
      <soap:address location="http://localhost:8080/DocBooks/DocBookQuery"/>
    </port>
  </service>
</definitions>

  Previous section   Next section