<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions name="Soap12" 
    targetNamespace="http://schemas.servicestack.net/types" 
    xmlns:svc="http://schemas.servicestack.net/types" 
    xmlns:tns="http://schemas.servicestack.net/types" 
    
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" 
    xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" 
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
    xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" 
    xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" 
    xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" 
    xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" 
    xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" 
    xmlns:wsa10="http://www.w3.org/2005/08/addressing" 
    xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex">

	<wsdl:types>
		<xs:schema xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="anyType" nillable="true" type="xs:anyType" />
  <xs:element name="anyURI" nillable="true" type="xs:anyURI" />
  <xs:element name="base64Binary" nillable="true" type="xs:base64Binary" />
  <xs:element name="boolean" nillable="true" type="xs:boolean" />
  <xs:element name="byte" nillable="true" type="xs:byte" />
  <xs:element name="dateTime" nillable="true" type="xs:dateTime" />
  <xs:element name="decimal" nillable="true" type="xs:decimal" />
  <xs:element name="double" nillable="true" type="xs:double" />
  <xs:element name="float" nillable="true" type="xs:float" />
  <xs:element name="int" nillable="true" type="xs:int" />
  <xs:element name="long" nillable="true" type="xs:long" />
  <xs:element name="QName" nillable="true" type="xs:QName" />
  <xs:element name="short" nillable="true" type="xs:short" />
  <xs:element name="string" nillable="true" type="xs:string" />
  <xs:element name="unsignedByte" nillable="true" type="xs:unsignedByte" />
  <xs:element name="unsignedInt" nillable="true" type="xs:unsignedInt" />
  <xs:element name="unsignedLong" nillable="true" type="xs:unsignedLong" />
  <xs:element name="unsignedShort" nillable="true" type="xs:unsignedShort" />
  <xs:element name="char" nillable="true" type="tns:char" />
  <xs:simpleType name="char">
    <xs:restriction base="xs:int" />
  </xs:simpleType>
  <xs:element name="duration" nillable="true" type="tns:duration" />
  <xs:simpleType name="duration">
    <xs:restriction base="xs:duration">
      <xs:pattern value="\-?P(\d*D)?(T(\d*H)?(\d*M)?(\d*(\.\d*)?S)?)?" />
      <xs:minInclusive value="-P10675199DT2H48M5.4775808S" />
      <xs:maxInclusive value="P10675199DT2H48M5.4775807S" />
    </xs:restriction>
  </xs:simpleType>
  <xs:element name="guid" nillable="true" type="tns:guid" />
  <xs:simpleType name="guid">
    <xs:restriction base="xs:string">
      <xs:pattern value="[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:attribute name="FactoryType" type="xs:QName" />
  <xs:attribute name="Id" type="xs:ID" />
  <xs:attribute name="Ref" type="xs:IDREF" />
</xs:schema>
<xs:schema xmlns:tns="http://schemas.datacontract.org/2004/07/TvListings.ServiceModel.Types.Reports" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/TvListings.ServiceModel.Types.Reports" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:import namespace="http://schemas.datacontract.org/2004/07/System" />
  <xs:complexType name="StatsReport">
    <xs:sequence>
      <xs:element minOccurs="0" name="AverageEventsPerBrand" type="xs:int" />
      <xs:element minOccurs="0" name="EarliestEventCreatedAt" type="xs:dateTime" />
      <xs:element minOccurs="0" name="LatestEventCreatedAt" type="xs:dateTime" />
      <xs:element minOccurs="0" name="TotalBrands" type="xs:int" />
      <xs:element minOccurs="0" name="TotalEvents" type="xs:int" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="StatsReport" nillable="true" type="tns:StatsReport" />
  <xs:complexType name="SummaryReport">
    <xs:sequence>
      <xs:element minOccurs="0" name="CountBrands" type="xs:int" />
      <xs:element minOccurs="0" name="CountEvents" type="xs:int" />
      <xs:element minOccurs="0" name="CountOrigins" type="xs:int" />
      <xs:element minOccurs="0" name="MaxCreatedAt" type="xs:dateTime" />
      <xs:element minOccurs="0" name="MinCreatedAt" type="xs:dateTime" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="SummaryReport" nillable="true" type="tns:SummaryReport" />
  <xs:complexType name="OriginReport">
    <xs:sequence>
      <xs:element minOccurs="0" name="CountEvents" type="xs:int" />
      <xs:element minOccurs="0" name="OriginId" type="xs:int" />
      <xs:element minOccurs="0" name="OriginSlug" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="SumDurationSeconds" type="xs:int" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="OriginReport" nillable="true" type="tns:OriginReport" />
  <xs:complexType name="CoverageReport">
    <xs:sequence>
      <xs:element minOccurs="0" name="BrandId" type="xs:int" />
      <xs:element minOccurs="0" name="BrandSlug" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="CountRecords" type="xs:int" />
      <xs:element minOccurs="0" name="MaxCreatedAt" type="xs:dateTime" />
      <xs:element minOccurs="0" name="MaxEndTime" xmlns:q1="http://schemas.datacontract.org/2004/07/System" type="q1:DateTimeOffset" />
      <xs:element minOccurs="0" name="MinStartTime" xmlns:q2="http://schemas.datacontract.org/2004/07/System" type="q2:DateTimeOffset" />
      <xs:element minOccurs="0" name="OriginId" type="xs:int" />
      <xs:element minOccurs="0" name="OriginSlug" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="SumDurationSeconds" type="xs:int" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="CoverageReport" nillable="true" type="tns:CoverageReport" />
</xs:schema>
<xs:schema xmlns:tns="http://schemas.datacontract.org/2004/07/System" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/System" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:import namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
  <xs:complexType name="DateTimeOffset">
    <xs:annotation>
      <xs:appinfo>
        <IsValueType xmlns="http://schemas.microsoft.com/2003/10/Serialization/">true</IsValueType>
      </xs:appinfo>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="DateTime" type="xs:dateTime" />
      <xs:element name="OffsetMinutes" type="xs:short" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="DateTimeOffset" nillable="true" type="tns:DateTimeOffset" />
</xs:schema>
<xs:schema xmlns:tns="http://schemas.datacontract.org/2004/07/TvListings.ServiceModel.Operations" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/TvListings.ServiceModel.Operations" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:import namespace="http://schemas.datacontract.org/2004/07/System" />
  <xs:import namespace="http://schemas.datacontract.org/2004/07/TvListings.ServiceModel.Types" />
  <xs:import namespace="http://schemas.servicestack.net/types" />
  <xs:complexType name="EventSearch">
    <xs:sequence>
      <xs:element minOccurs="0" name="Brand" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="EndTime" xmlns:q1="http://schemas.datacontract.org/2004/07/System" type="q1:DateTimeOffset" />
      <xs:element minOccurs="0" name="SearchType" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="ShowCount" nillable="true" type="xs:int" />
      <xs:element minOccurs="0" name="ShowTitle" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="ShowTitleLike" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="StartTime" xmlns:q2="http://schemas.datacontract.org/2004/07/System" type="q2:DateTimeOffset" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="EventSearch" nillable="true" type="tns:EventSearch" />
  <xs:complexType name="EventSearchResponse">
    <xs:sequence>
      <xs:element minOccurs="0" name="Listings" nillable="true" xmlns:q3="http://schemas.datacontract.org/2004/07/TvListings.ServiceModel.Types" type="q3:ArrayOfEvent" />
      <xs:element minOccurs="0" name="ResponseStatus" nillable="true" xmlns:q4="http://schemas.servicestack.net/types" type="q4:ResponseStatus" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="EventSearchResponse" nillable="true" type="tns:EventSearchResponse" />
</xs:schema>
<xs:schema xmlns:tns="http://schemas.datacontract.org/2004/07/TvListings.ServiceModel.Types" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/TvListings.ServiceModel.Types" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:import namespace="http://schemas.datacontract.org/2004/07/System" />
  <xs:complexType name="ArrayOfEvent">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="Event" nillable="true" type="tns:Event" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfEvent" nillable="true" type="tns:ArrayOfEvent" />
  <xs:complexType name="Event">
    <xs:sequence>
      <xs:element minOccurs="0" name="BrandId" type="xs:int" />
      <xs:element minOccurs="0" name="Captioned" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="CreatedAt" type="xs:dateTime" />
      <xs:element minOccurs="0" name="DescriptiveVideo" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="DurationInSeconds" nillable="true" type="xs:int" />
      <xs:element minOccurs="0" name="EndTime" xmlns:q1="http://schemas.datacontract.org/2004/07/System" type="q1:DateTimeOffset" />
      <xs:element minOccurs="0" name="EpisodeNumber" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="EpisodeSeason" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="EpisodeTitle" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="Id" type="xs:int" />
      <xs:element minOccurs="0" name="OriginId" type="xs:int" />
      <xs:element minOccurs="0" name="ProgSynopsis" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="Rating" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="Simulcast" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="StartTime" xmlns:q2="http://schemas.datacontract.org/2004/07/System" type="q2:DateTimeOffset" />
      <xs:element minOccurs="0" name="Synopsis" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="Title" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="VideoFormat" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="YearOfProduction" nillable="true" type="xs:int" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="Event" nillable="true" type="tns:Event" />
</xs:schema>
<xs:schema xmlns:tns="http://schemas.servicestack.net/types" elementFormDefault="qualified" targetNamespace="http://schemas.servicestack.net/types" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:complexType name="ResponseStatus">
    <xs:sequence>
      <xs:element minOccurs="0" name="ErrorCode" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="Errors" nillable="true" type="tns:ArrayOfResponseError" />
      <xs:element minOccurs="0" name="Message" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="StackTrace" nillable="true" type="xs:string" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ResponseStatus" nillable="true" type="tns:ResponseStatus" />
  <xs:complexType name="ArrayOfResponseError">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="ResponseError" nillable="true" type="tns:ResponseError" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfResponseError" nillable="true" type="tns:ArrayOfResponseError" />
  <xs:complexType name="ResponseError">
    <xs:sequence>
      <xs:element minOccurs="0" name="ErrorCode" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="FieldName" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="Message" nillable="true" type="xs:string" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ResponseError" nillable="true" type="tns:ResponseError" />
</xs:schema>
	</wsdl:types>

	<wsdl:message name="EventSearchIn">
        <wsdl:part name="parameters" element="tns:EventSearch" />
    </wsdl:message>
    <wsdl:message name="EventSearchOut">
        <wsdl:part name="parameters" element="tns:EventSearchResponse" />
    </wsdl:message>

	<wsdl:message name="StatsReportIn">
        <wsdl:part name="parameters" element="tns:StatsReport" />
    </wsdl:message><wsdl:message name="SummaryReportIn">
        <wsdl:part name="parameters" element="tns:SummaryReport" />
    </wsdl:message><wsdl:message name="OriginReportIn">
        <wsdl:part name="parameters" element="tns:OriginReport" />
    </wsdl:message><wsdl:message name="CoverageReportIn">
        <wsdl:part name="parameters" element="tns:CoverageReport" />
    </wsdl:message>

	<wsdl:portType name="ISyncReply">
	<wsdl:operation name="EventSearch">
        <wsdl:input message="svc:EventSearchIn" />
        <wsdl:output message="svc:EventSearchOut" />
    </wsdl:operation>
	</wsdl:portType>

	<wsdl:portType name="IOneWay">
	<wsdl:operation name="StatsReport">
        <wsdl:input message="svc:StatsReportIn" />
    </wsdl:operation><wsdl:operation name="SummaryReport">
        <wsdl:input message="svc:SummaryReportIn" />
    </wsdl:operation><wsdl:operation name="OriginReport">
        <wsdl:input message="svc:OriginReportIn" />
    </wsdl:operation><wsdl:operation name="CoverageReport">
        <wsdl:input message="svc:CoverageReportIn" />
    </wsdl:operation>
	</wsdl:portType>

	<wsdl:binding name="WSHttpBinding_ISyncReply" type="svc:ISyncReply">
		<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
		<wsdl:operation name="EventSearch">
      <soap:operation soapAction="http://schemas.servicestack.net/types/EventSearch" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
	</wsdl:binding>
        
	<wsdl:binding name="WSHttpBinding_IOneWay" type="svc:IOneWay">
		<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
		<wsdl:operation name="StatsReport">
      <soap:operation soapAction="http://schemas.servicestack.net/types/StatsReport" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
    </wsdl:operation><wsdl:operation name="SummaryReport">
      <soap:operation soapAction="http://schemas.servicestack.net/types/SummaryReport" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
    </wsdl:operation><wsdl:operation name="OriginReport">
      <soap:operation soapAction="http://schemas.servicestack.net/types/OriginReport" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
    </wsdl:operation><wsdl:operation name="CoverageReport">
      <soap:operation soapAction="http://schemas.servicestack.net/types/CoverageReport" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
    </wsdl:operation>
	</wsdl:binding>

	<wsdl:service name="SyncReply">
		<wsdl:port name="WSHttpBinding_ISyncReply" binding="svc:WSHttpBinding_ISyncReply">
			<soap:address location="http://tvlistings.ctvdigital.net/service/soap12" />
		</wsdl:port>
	</wsdl:service>

	<wsdl:service name="AsyncOneWay">
		<wsdl:port name="WSHttpBinding_IOneWay" binding="svc:WSHttpBinding_IOneWay">
			<soap:address location="http://tvlistings.ctvdigital.net/service/soap12" />
		</wsdl:port>
	</wsdl:service>
	
</wsdl:definitions>
