Using WSDL in SOAP applications

An introduction to WSDL for SOAP programmers

Return to article

Listing 3. A WSDL description for a Snowboarding endorsement query
<?xml version="1.0"?>

<definitions name="EndorsementSearch"
  targetNamespace="http://namespaces.snowboard-info.com"
  xmlns:es="http://www.snowboard-info.com/EndorsementSearch.wsdl"
  xmlns:esxsd="http://schemas.snowboard-info.com/EndorsementSearch.xsd"
  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
  xmlns="http://schemas.xmlsoap.org/wsdl/">
  <types>
    <schema targetNamespace="http://namespaces.snowboard-info.com"
        xmlns="http://www.w3.org/1999/XMLSchema">
      <element name="GetEndorsingBoarder">
        <complexType>
          <sequence> <element name="manufacturer" type="string"/> <element name="model" type="string"/> </sequence>
        </complexType>
      </element>       <element name="GetEndorsingBoarderResponse"> <complexType> <all> <element name="endorsingBoarder" type="string"/> </all>
        </complexType>
      </element>       <element name="GetEndorsingBoarderFault"> <complexType> <all> <element name="errorMessage" type="string"/> </all>
        </complexType>
      </element>
    </schema>
  </types>   <message name="GetEndorsingBoarderRequest">
    <part name="body" element="esxsd:GetEndorsingBoarder"/>
  </message>   <message name="GetEndorsingBoarderResponse">
    <part name="body" element="esxsd:GetEndorsingBoarderResponse"/>
  </message>   <portType name="GetEndorsingBoarderPortType">
    <operation name="GetEndorsingBoarder">
      <input message="es:GetEndorsingBoarderRequest"/>
      <output message="es:GetEndorsingBoarderResponse"/>
      <fault message="es:GetEndorsingBoarderFault"/>
    </operation>
  </portType>
  <binding name="EndorsementSearchSoapBinding" type="es:GetEndorsingBoarderPortType">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="GetEndorsingBoarder">
      <soap:operation
        soapAction="http://www.snowboard-info.com/EndorsementSearch"/>
      <input>
        <soap:body use="literal" namespace="http://schemas.snowboard-info.com/EndorsementSearch.xsd"/>
      </input>
      <output> <soap:body use="literal"
          namespace="http://schemas.snowboard-info.com/EndorsementSearch.xsd"/>
      </output>
      <fault>
        <soap:body use="literal" namespace="http://schemas.snowboard-info.com/EndorsementSearch.xsd"/>
      </fault>
    </operation>
  </binding>
  <service name="EndorsementSearchService">
    <documentation>snowboarding-info.com Endorsement Service</documentation> 
    <port name="GetEndorsingBoarderPort" binding="es:EndorsementSearchSoapBinding">
      <soap:address location="http://www.snowboard-info.com/EndorsementSearch"/>
    </port>
  </service>
</definitions>

Return to article