<?xml version="1.0" encoding="utf-8" ?>
<!--
  The Web Service Description Language ("WSDL") provided herein is subject to the following:  
  
  Exceptional Innovation reserves the right to update or change the WSDL at any time without notice to 
  you.  The WSDL is protected by the copyright laws of the United States and other applicable laws. 
  © Exceptional Innovation 2007.  All Rights Reserved.  

  The WSDL is made available by Exceptional Innovation via a royalty free license for use in developing 
  hardware and software that is compliant with the WSDL. Suggestions and comments regarding the WSDL 
  can be sent to WSDL@life-ware.com. All suggestions and comments become the property of 
  Exceptional Innovation.  Exceptional Innovation reserves the right to use or implement any submitted 
  suggestion or comment without notice, and to submit the WSDL to a standards body.

  THE WSDL IS BEING PROVIDED “AS IS” AND WITHOUT WARRANTY.  ALL USE OF THE WSDL IS AT YOUR OWN RISK.  
  EXCEPTIONAL INNOVATION HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, WHETHER EXPRESS, IMPLIED OR 
  STATUTORY, WITH REGARD TO THE WSDL, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OR CONDITIONS OF 
  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT.
-->
<wsdl:definitions 
  targetNamespace="http://schemas.exceptionalinnovation.com/ws/2006/04/device/Thermostat" 
  xmlns:tns="http://schemas.exceptionalinnovation.com/ws/2006/04/device/Thermostat" 
  xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
	xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
	xmlns:wsdp="http://schemas.xmlsoap.org/ws/2006/02/devprof" 
	xmlns:wse="http://schemas.xmlsoap.org/ws/2004/08/eventing"
	xmlns:wsoap12="http://schemas.xmlsoap.org/wsdl/soap12/"
	xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
	xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
  xmlns:wst="http://schemas.xmlsoap.org/ws/2004/09/transfer"
  >

  <wsp:Policy wsu:Id="EventingPolicy" >
    <wsdp:Profile />
    <wsdp:PushDelivery />
    <wsdp:DurationExpiration />
    <wsdp:ActionFilter />
  </wsp:Policy>

  <!-- Note: Some code gen tools automatically import Transfer.wsdl and Eventing.wsdl for DPWS devices. If you are not using one of these -->
  <!-- code gen tools you must import Transfer and Eventing using the tool of your choice for DPWS compliance. -->

  <!-- Types -->
  <wsdl:types>
    <xs:schema
      targetNamespace="http://schemas.exceptionalinnovation.com/ws/2006/04/device/Thermostat"
      xmlns:tns="http://schemas.exceptionalinnovation.com/ws/2006/04/device/Thermostat"
      xmlns:xs="http://www.w3.org/2001/XMLSchema"
      blockDefault="#all"
      elementFormDefault="qualified" >

      <xs:element name="Setpoint" type="xs:int" />
      <xs:element name="Temperature" type="xs:int" />

      <!-- FanOperatingMode -->
      <xs:element name="FanOperatingMode" type="tns:FanOperatingModeType" />
      <xs:simpleType name="FanOperatingModeType">
        <xs:restriction base="xs:string">
          <xs:enumeration value="AUTO" />
          <xs:enumeration value="ON" />
        </xs:restriction>
      </xs:simpleType>

      <!-- UserOperatingMode -->
      <xs:element name="UserOperatingMode" type="tns:UserOperatingModeType" />
      <xs:simpleType name="UserOperatingModeType">
        <xs:restriction base="xs:string">
          <xs:enumeration value="AUTO" />
          <xs:enumeration value="HEAT" />
          <xs:enumeration value="COOL" />
          <xs:enumeration value="OFF" />
        </xs:restriction>
      </xs:simpleType>

      <!-- List Types -->
      <xs:simpleType name ="FanOperatingModeListType">
        <xs:list itemType="tns:FanOperatingModeType"/>
      </xs:simpleType>
      <xs:simpleType name ="UserOperatingModeListType">
        <xs:list itemType="tns:UserOperatingModeType"/>
      </xs:simpleType>

      <!-- State -->
      <xs:element name="State" type="tns:StateType" />
      <xs:complexType name="StateType">
        <xs:sequence>
          <xs:element minOccurs="1" maxOccurs="1" name="LastChanged" type="xs:dateTime" />
          <xs:element minOccurs="1" maxOccurs="1" name="ServiceId" type="xs:anyURI" />
          <xs:element minOccurs="1" maxOccurs="1" name="CoolingSetpoint" type="xs:int" />
          <xs:element minOccurs="1" maxOccurs="1" name="FanOperatingMode" type="tns:FanOperatingModeType" />
          <xs:element minOccurs="1" maxOccurs="1" name="HeatingSetpoint" type="xs:int" />
          <xs:element minOccurs="1" maxOccurs="1" name="SensorTemperature" type="xs:int" />
          <xs:element minOccurs="1" maxOccurs="1" name="UserOperatingMode" type="tns:UserOperatingModeType" />
          <xs:element minOccurs="1" maxOccurs="1" name="UserOperatingModeTarget" type="tns:UserOperatingModeType" />
          <xs:any minOccurs="0" maxOccurs="unbounded" />
        </xs:sequence>
        <xs:anyAttribute />
      </xs:complexType>

      <!-- Settings -->
      <xs:element name="Settings" type="tns:SettingsType" />
      <xs:complexType name="SettingsType">
        <xs:sequence>
          <xs:element minOccurs="1" maxOccurs="1" name="ServiceId" type="xs:anyURI" />
          <xs:element minOccurs="1" maxOccurs="1" name="FanOperatingModes" type="tns:FanOperatingModeListType" />
          <xs:element minOccurs="1" maxOccurs="1" name="MaxCoolingSetpoint" type="xs:int" />
          <xs:element minOccurs="1" maxOccurs="1" name="MinCoolingSetpoint" type="xs:int" />
          <xs:element minOccurs="1" maxOccurs="1" name="MaxHeatingSetpoint" type="xs:int" />
          <xs:element minOccurs="1" maxOccurs="1" name="MinHeatingSetpoint" type="xs:int" />
          <xs:element minOccurs="1" maxOccurs="1" name="UserOperatingModes" type="tns:UserOperatingModeListType" />
          <xs:any minOccurs="0" maxOccurs="unbounded" namespace="##other" processContents="lax" />
        </xs:sequence>
        <xs:anyAttribute namespace="##any" processContents="lax" />
      </xs:complexType>
      
    </xs:schema>
  </wsdl:types>

  <!-- Messages -->

  <!-- Fan Operating Mode -->
  <wsdl:message name="GetFanOperatingModeMessageIn" />
  <wsdl:message name="GetFanOperatingModeMessageOut">
    <wsdl:part name="parameters" element="tns:FanOperatingMode" />
  </wsdl:message>
  <wsdl:message name="SetFanOperatingModeMessageIn">
    <wsdl:part name="parameters" element="tns:FanOperatingMode" />
  </wsdl:message>
  <wsdl:message name="SetFanOperatingModeMessageOut" />

  <!-- User Operating Mode -->
  <wsdl:message name="GetUserOperatingModeMessageIn" />
  <wsdl:message name="GetUserOperatingModeMessageOut">
    <wsdl:part name="parameters" element="tns:UserOperatingMode" />
  </wsdl:message>
  <wsdl:message name="SetUserOperatingModeMessageIn">
    <wsdl:part name="parameters" element="tns:UserOperatingMode" />
  </wsdl:message>
  <wsdl:message name="SetUserOperatingModeMessageOut" />

  <!-- Temperature Sensor -->
  <wsdl:message name="GetTemperatureSensorCurrentTemperatureMessageIn" />
  <wsdl:message name="GetTemperatureSensorCurrentTemperatureMessageOut">
    <wsdl:part name="parameters" element="tns:Temperature" />
  </wsdl:message>

  <!-- Cooling Temperature Setpoint -->
  <wsdl:message name="GetCoolingCurrentSetpointMessageIn" />
  <wsdl:message name="GetCoolingCurrentSetpointMessageOut">
    <wsdl:part name="parameters" element="tns:Setpoint" />
  </wsdl:message>
  <wsdl:message name="SetCoolingCurrentSetpointMessageIn">
    <wsdl:part name="parameters" element="tns:Setpoint" />
  </wsdl:message>
  <wsdl:message name="SetCoolingCurrentSetpointMessageOut" />

  <!-- Heating Temperature Setpoint -->
  <wsdl:message name="GetHeatingCurrentSetpointMessageIn" />
  <wsdl:message name="GetHeatingCurrentSetpointMessageOut">
    <wsdl:part name="parameters" element="tns:Setpoint" />
  </wsdl:message>
  <wsdl:message name="SetHeatingCurrentSetpointMessageIn">
    <wsdl:part name="parameters" element="tns:Setpoint" />
  </wsdl:message>
  <wsdl:message name="SetHeatingCurrentSetpointMessageOut" />

  <!-- Events -->
  <wsdl:message name="StateChangedMessageOut">
    <wsdl:part name="parameters" element="tns:State" />
  </wsdl:message>

  <!-- State -->
  <wsdl:message name="GetStateMessageIn" />
  <wsdl:message name="GetStateMessageOut">
    <wsdl:part name="parameters" element="tns:State" />
  </wsdl:message>

  <!-- Settings -->
  <wsdl:message name="GetSettingsMessageIn" />
  <wsdl:message name="GetSettingsMessageOut">
    <wsdl:part name="parameters" element="tns:Settings" />
  </wsdl:message>

  <!-- Port Type Operations -->
  <wsdl:portType name="Control" wse:EventSource="true" >

    <!-- Fan Operating Mode -->
    <wsdl:operation name="GetFanOperatingMode">
      <wsdl:input message="tns:GetFanOperatingModeMessageIn"/>
      <wsdl:output message="tns:GetFanOperatingModeMessageOut"/>
    </wsdl:operation>
    <wsdl:operation name="SetFanOperatingMode">
      <wsdl:input message="tns:SetFanOperatingModeMessageIn"/>
      <wsdl:output message="tns:SetFanOperatingModeMessageOut"/>
    </wsdl:operation>

    <!-- User Operating Mode -->
    <wsdl:operation name="GetUserOperatingMode">
      <wsdl:input message="tns:GetUserOperatingModeMessageIn"/>
      <wsdl:output message="tns:GetUserOperatingModeMessageOut"/>
    </wsdl:operation>
    <wsdl:operation name="SetUserOperatingMode">
      <wsdl:input message="tns:SetUserOperatingModeMessageIn"/>
      <wsdl:output message="tns:SetUserOperatingModeMessageOut"/>
    </wsdl:operation>

    <!-- Temperature Sensor -->
    <wsdl:operation name="GetTemperatureSensorCurrentTemperature">
      <wsdl:input message="tns:GetTemperatureSensorCurrentTemperatureMessageIn"/>
      <wsdl:output message="tns:GetTemperatureSensorCurrentTemperatureMessageOut"/>
    </wsdl:operation>

    <!-- Cooling Temperature Setpoint -->
    <wsdl:operation name="GetCoolingCurrentSetpoint">
      <wsdl:input message="tns:GetCoolingCurrentSetpointMessageIn"/>
      <wsdl:output message="tns:GetCoolingCurrentSetpointMessageOut"/>
    </wsdl:operation>
    <wsdl:operation name="SetCoolingCurrentSetpoint">
      <wsdl:input message="tns:SetCoolingCurrentSetpointMessageIn"/>
      <wsdl:output message="tns:SetCoolingCurrentSetpointMessageOut"/>
    </wsdl:operation>

    <!-- Heating Temperature Setpoint -->
    <wsdl:operation name="GetHeatingCurrentSetpoint">
      <wsdl:input message="tns:GetHeatingCurrentSetpointMessageIn"/>
      <wsdl:output message="tns:GetHeatingCurrentSetpointMessageOut"/>
    </wsdl:operation>
    <wsdl:operation name="SetHeatingCurrentSetpoint">
      <wsdl:input message="tns:SetHeatingCurrentSetpointMessageIn"/>
      <wsdl:output message="tns:SetHeatingCurrentSetpointMessageOut"/>
    </wsdl:operation>

    <!-- State -->
    <wsdl:operation name="GetState">
      <wsdl:input message="tns:GetStateMessageIn"/>
      <wsdl:output message="tns:GetStateMessageOut"/>
    </wsdl:operation>
    <wsdl:operation name="StateChanged">
      <wsdl:output message="tns:StateChangedMessageOut"/>
    </wsdl:operation>

    <!-- Settings -->
    <wsdl:operation name="GetSettings">
      <wsdl:input message="tns:GetSettingsMessageIn"/>
      <wsdl:output message="tns:GetSettingsMessageOut"/>
    </wsdl:operation>

  </wsdl:portType>

  <!-- Bindings -->
  <wsdl:binding name="ControlBinding" type="tns:Control" >
    <wsoap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsp:PolicyReference URI="#EventingPolicy" wsdl:required="true" />

    <!-- Fan Operating Mode -->
    <wsdl:operation name="GetFanOperatingMode">
      <wsoap12:operation soapAction="http://schemas.exceptionalinnovation.com/ws/2006/04/device/Thermostat/Control/GetFanOperatingModeRequest" />
      <wsdl:input>
        <wsoap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <wsoap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="SetFanOperatingMode">
      <wsoap12:operation soapAction="http://schemas.exceptionalinnovation.com/ws/2006/04/device/Thermostat/Control/SetFanOperatingModeRequest" />
      <wsdl:input>
        <wsoap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <wsoap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>

    <!-- User Operating Mode -->
    <wsdl:operation name="GetUserOperatingMode">
      <wsoap12:operation soapAction="http://schemas.exceptionalinnovation.com/ws/2006/04/device/Thermostat/Control/GetUserOperatingModeRequest" />
      <wsdl:input>
        <wsoap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <wsoap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="SetUserOperatingMode">
      <wsoap12:operation soapAction="http://schemas.exceptionalinnovation.com/ws/2006/04/device/Thermostat/Control/SetUserOperatingModeRequest" />
      <wsdl:input>
        <wsoap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <wsoap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>

    <!-- Temperature Sensor -->
    <wsdl:operation name="GetTemperatureSensorCurrentTemperature">
      <wsoap12:operation soapAction="http://schemas.exceptionalinnovation.com/ws/2006/04/device/Thermostat/Control/GetTemperatureSensorCurrentTemperatureRequest" />
      <wsdl:input>
        <wsoap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <wsoap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>

    <!-- Cooling Temperature Setpoint -->
    <wsdl:operation name="GetCoolingCurrentSetpoint">
      <wsoap12:operation soapAction="http://schemas.exceptionalinnovation.com/ws/2006/04/device/Thermostat/Control/GetCoolingCurrentSetpointRequest" />
      <wsdl:input>
        <wsoap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <wsoap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="SetCoolingCurrentSetpoint">
      <wsoap12:operation soapAction="http://schemas.exceptionalinnovation.com/ws/2006/04/device/Thermostat/Control/SetCoolingCurrentSetpointRequest" />
      <wsdl:input>
        <wsoap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <wsoap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>

    <!-- Heating Temperature Setpoint -->
    <wsdl:operation name="GetHeatingCurrentSetpoint">
      <wsoap12:operation soapAction="http://schemas.exceptionalinnovation.com/ws/2006/04/device/Thermostat/Control/GetHeatingCurrentSetpointRequest" />
      <wsdl:input>
        <wsoap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <wsoap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="SetHeatingCurrentSetpoint">
      <wsoap12:operation soapAction="http://schemas.exceptionalinnovation.com/ws/2006/04/device/Thermostat/Control/SetHeatingCurrentSetpointRequest" />
      <wsdl:input>
        <wsoap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <wsoap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>

    <!-- State -->
    <wsdl:operation name="GetState">
      <wsoap12:operation soapAction="http://schemas.exceptionalinnovation.com/ws/2006/04/Service/State/GetStateRequest" />
      <wsdl:input>
        <wsoap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <wsoap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="StateChanged">
      <wsoap12:operation soapAction="http://schemas.exceptionalinnovation.com/ws/2006/04/Service/State/StateChanged"/>
      <wsdl:output>
        <wsoap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>

    <!-- Settings -->
    <wsdl:operation name="GetSettings">
      <wsoap12:operation soapAction="http://schemas.exceptionalinnovation.com/ws/2006/04/Service/Settings/GetSettingsRequest" />
      <wsdl:input>
        <wsoap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <wsoap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>

  </wsdl:binding>

</wsdl:definitions>