<?xml version="1.0"?>
<!-- the root element, wsdl:definitions, defines a set of -->
<!-- related services -->
<wsdl:definitions name="Temperature"
 targetNamespace="http://www.socweather.com/schema"
 xmlns:ts="http://www.socweather.com/TempSvc.wsdl"
 xmlns:tsxsd="http://schemas.socweather.com/TempSvc.xsd"
 xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
 xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">

<!-- wsdl:types encapsulates schema definitions of -->
<!-- communication types; here using xsd -->
 <wsdl:types>
<!-- all type declarations are expressed in xsd -->
  <xsd:schema
   targetNamespace="http://namespaces.socweather.com"
   xmlns:xsd="http://www.w3.org/1999/XMLSchema">

<!-- xsd def: GetTemp [City string, When string] -->
   <xsd:element name="GetTemp">
    <xsd:complexType>
     <xsd:sequence>
      <xsd:element name="City" type="string"/>
      <xsd:element name="When" type="string"/>
     </xsd:sequence>
    </xsd:complexType>
   </xsd:element>

<!-- xsd def: GetTempResponse [DegreesCelsius integer] -->
   <xsd:element name="GetTempResponse">
   <!-- XML Schema entry as above -->
  </xsd:element>

<!-- xsd def: GetTempFault [errorMessage string] -->
   <xsd:element name="GetTempFault">
   <!-- XML Schema entry as above -->
   </xsd:element>
  </xsd:schema>
 </wsdl:types>

<!-- wsdl:message elements describe potential transactions -->
<!-- Most messages, as here, have only one part.  Multiple -->
<!-- parts provide a way to aggregate complex messages -->

<!-- request GetTempRequest is of type GetTemp -->
 <wsdl:message name="GetTempRequest">
  <wsdl:part name="body" element="tsxsd:GetTemp"/>
 </wsdl:message>

<!-- response GetTempResponse is of type GetTempResponse -->
 <wsdl:message name="GetTempResponse">
   <wsdl:part name="body" element="tsxsd:GetTempResponse"/>
 </wsdl:message>

<!-- wsdl:portType describes messages in an operation -->
 <wsdl:portType name="GetTempPortType">

<!-- wsdl:operation describes the entire protocol from -->
<!-- input to output or fault -->
  <wsdl:operation name="GetTemp">
<!-- The order input preceding output indicates the -->
<!-- request-response operation type -->
   <wsdl:input message="ts:GetTempRequest"/>
   <wsdl:output message="ts:GetTempResponse"/>
   <wsdl:fault message="ts:GetTempFault"/>
  </wsdl:operation>
 </wsdl:portType>

<!-- wsdl:binding specifies a serialization protocol -->
 <wsdl:binding name="TempSvcSoapBinding"
  type="ts:GetTempPortType">

<!-- leverage off soap:binding document style -->
 <soap:binding style="document"
  transport="http://schemas.xmlsoap.org/soap/http"/>

<!-- semi-opaque container of network transport details --> 
<!-- classed by soap:binding above @@@ -->
  <wsdl:operation name="GetTemp">
   <soap:operation
    soapAction="http://www.socweather.com/TempSvc"/>
<!-- further specify that the messages in the -->
<!--  wsdl:operation "GetTemp" use SOAP? @@@ -->
    <wsdl:input>
     <soap:body use="literal"
      namespace="http://schemas.socweather.com/TempSvc.xsd"/>
    </wsdl:input>

    <!-- As above for wsdl:output and wsdl:fault -->

  </wsdl:operation>
 </wsdl:binding>

<!-- wsdl:service names a new service "TemperatureService" -->
 <wsdl:service name="TemperatureService">
  <wsdl:documentation>socweather.com temperature service
  </wsdl:documentation>

<!-- connect it to the binding "TempSvcSoapBinding" above -->
  <wsdl:port name="GetTempPort" binding="ts:TempSvcSoapBinding">

<!-- give the binding a network address -->
   <soap:address location="http://www.socweather.com/TempSvc"/>
  </wsdl:port>
 </wsdl:service>
</wsdl:definitions>
