<?xml version="1.0" ?>
<wsdl:definitions name="urn:GoogleSearch" targetNamespace="http://www.prescod.net/google_search_result" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:typens="http://www.prescod.net/google_search_result" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <wsdl:types>
    <xsd:schema targetNamespace="http://www.prescod.net/google_search_result">
      <xsd:complexType name="GoogleSearchResult">
        <xsd:all>
          <xsd:element name="documentFiltering" type="xsd:boolean"/>
          <xsd:element name="searchComments" type="xsd:string"/>
          <xsd:element name="estimatedTotalResultsCount" type="xsd:int"/>
          <xsd:element name="estimateIsExact" type="xsd:boolean"/>
          <xsd:element name="resultElements" type="typens:ResultElementArray"/>
          <xsd:element name="searchQuery" type="xsd:string"/>
          <xsd:element name="startIndex" type="xsd:int"/>
          <xsd:element name="endIndex" type="xsd:int"/>
          <xsd:element name="searchTips" type="xsd:string"/>
          <xsd:element name="directoryCategories" type="typens:DirectoryCategoryArray"/>
          <xsd:element name="searchTime" type="xsd:double"/>
        </xsd:all>
      </xsd:complexType>
      <xsd:complexType name="ResultElement">
        <xsd:all>
          <xsd:element name="summary" type="xsd:string"/>
          <xsd:element name="URL" type="xsd:string"/>
          <xsd:element name="snippet" type="xsd:string"/>
          <xsd:element name="title" type="xsd:string"/>
          <xsd:element name="cachedSize" type="xsd:string"/>
          <xsd:element name="relatedInformationPresent" type="xsd:boolean"/>
          <xsd:element name="hostName" type="xsd:string"/>
          <xsd:element name="directoryCategory" type="typens:DirectoryCategory"/>
          <xsd:element name="directoryTitle" type="xsd:string"/>
        </xsd:all>
      </xsd:complexType>
      <xsd:complexType name="ResultElementArray">
        <xsd:sequence>
          <xsd:element maxOccurrs="unbounded" name="item" type="typens:ResultElement"/>
        </xsd:sequence>
      </xsd:complexType>
      <xsd:complexType name="DirectoryCategoryArray">
        <xsd:sequence>
          <xsd:element maxOccurrs="unbounded" name="directoryCategory" type="typens:DirectoryCategory"/>
        </xsd:sequence>
      </xsd:complexType>
      <xsd:complexType name="DirectoryCategory">
        <xsd:all>
          <xsd:element name="fullViewableName" type="xsd:string"/>
          <xsd:element name="specialEncoding" type="xsd:string"/>
        </xsd:all>
      </xsd:complexType>
      <xsd:element name="base64Binary" type="xsd:base64Binary"/>
      <xsd:element name="string" type="xsd:string"/>
      <xsd:element name="searchResult" type="typens:GoogleSearchResult"/>
    </xsd:schema>
  </wsdl:types>
  <wsdl:message name="doGetCachedPage">
    <wsdl:part name="key" type="xsd:string"/>
    <wsdl:part name="url" type="xsd:string"/>
  </wsdl:message>
  <wsdl:message name="doGetCachedPageResponse">
    <wsdl:part element="typens:base64Binary" name="return"/>
  </wsdl:message>
  <wsdl:message name="doSpellingSuggestion">
    <wsdl:part name="key" type="xsd:string"/>
    <wsdl:part name="phrase" type="xsd:string"/>
  </wsdl:message>
  <wsdl:message name="doSpellingSuggestionResponse">
    <wsdl:part element="typens:string" name="return"/>
  </wsdl:message>
  <wsdl:message name="doGoogleSearch">
    <wsdl:part name="key" type="xsd:string"/>
    <wsdl:part name="q" type="xsd:string"/>
    <wsdl:part name="start" type="xsd:int"/>
    <wsdl:part name="maxResults" type="xsd:int"/>
    <wsdl:part name="filter" type="xsd:boolean"/>
    <wsdl:part name="restrict" type="xsd:string"/>
    <wsdl:part name="safeSearch" type="xsd:boolean"/>
    <wsdl:part name="lr" type="xsd:string"/>
    <wsdl:part name="ie" type="xsd:string"/>
    <wsdl:part name="oe" type="xsd:string"/>
  </wsdl:message>
  <wsdl:message name="doGoogleSearchResponse">
    <wsdl:part element="typens:searchResult" name="return"/>
  </wsdl:message>
  <wsdl:portType name="GoogleSearchPort">
    <wsdl:operation name="doGetCachedPage">
      <wsdl:documentation>
        Get Cached Page
      </wsdl:documentation>
      <wsdl:input message="typens:doGetCachedPage"/>
      <wsdl:output message="typens:doGetCachedPageResponse"/>
    </wsdl:operation>
    <wsdl:operation name="doSpellingSuggestion">
      <wsdl:input message="typens:doSpellingSuggestion"/>
      <wsdl:output message="typens:doSpellingSuggestionResponse"/>
    </wsdl:operation>
    <wsdl:operation name="doGoogleSearch">
      <wsdl:input message="typens:doGoogleSearch"/>
      <wsdl:output message="typens:doGoogleSearchResponse"/>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="PureXMLGoogleHTTPBinding" type="typens:GoogleSearchPort">
    <http:binding verb="GET"/>
    <wsdl:operation name="doGetCachedPage">
      <http:operation location="/cachedpage_pure_xml.py"/>
      <wsdl:input>
        <http:urlEncoded/>
      </wsdl:input>
      <wsdl:output>
        <mime:mimeXml part="return"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="doSpellingSuggestion">
      <http:operation location="/spelling_suggestion_pure_xml.py"/>
      <wsdl:input>
        <http:urlEncoded/>
      </wsdl:input>
      <wsdl:output>
        <mime:mimeXml part="return"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="doGoogleSearch">
      <http:operation location="/search.py"/>
      <wsdl:input>
        <http:urlEncoded/>
      </wsdl:input>
      <wsdl:output>
        <mime:mimeXml part="return"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:binding name="EfficientGoogleHTTPBinding" type="typens:GoogleSearchPort">
    <http:binding verb="GET"/>
    <wsdl:operation name="doGetCachedPage">
      <wsdl:documentation>
        Get Cached Page
      </wsdl:documentation>
      <http:operation location="/cachedpage.py"/>
      <wsdl:input>
        <http:urlEncoded/>
      </wsdl:input>
      <wsdl:output>
        <mime:mimeXml part="return"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="doSpellingSuggestion">
      <http:operation location="/spelling_suggestion.py"/>
      <wsdl:input>
        <http:urlEncoded/>
      </wsdl:input>
      <wsdl:output>
        <mime:mimeXml part="return"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="doGoogleSearch">
      <http:operation location="/search.py"/>
      <wsdl:input>
        <http:urlEncoded/>
      </wsdl:input>
      <wsdl:output>
        <mime:mimeXml part="return"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="PureXMLGoogleHTTPService">
    <wsdl:port binding="typens:PureXMLGoogleHTTPBinding" name="GoogleHTTPPort">
      <http:blah/>
      <http:address location="http://localhost:8000/scripts/"/>
    </wsdl:port>
  </wsdl:service>
  <wsdl:service name="GoogleHTTPService">
    <wsdl:port binding="typens:EfficientGoogleHTTPBinding" name="GoogleHTTPPort">
      <http:address location="http://localhost:8000/scripts/"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>
