<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions name="DbServices"
	xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
	xmlns:s="http://www.w3.org/2001/XMLSchema"
	xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
	xmlns:tns="http://db.pictometry.com/DbServices/soap"
	xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
	targetNamespace="http://db.pictometry.com/DbServices/soap"
	xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">

   <wsdl:types>
	  <s:schema elementFormDefault="qualified" targetNamespace="http://db.pictometry.com/DbServices/soap">
	  <s:simpleType name="StatusType">
		  <s:restriction base="s:int">
			<s:enumeration value="0"/>
			<s:enumeration value="1"/>
			<s:enumeration value="2"/>
		  </s:restriction>
		</s:simpleType>

		<s:simpleType name="LatitudeType">
		  <s:restriction base="s:double">
		    <s:minInclusive value="-90.0"/>
		    <s:maxInclusive value="90.0"/>
		  </s:restriction>
		</s:simpleType>

		<s:simpleType name="LongitudeType">
		  <s:restriction base="s:double">
		    <s:minInclusive value="-180.0"/>
		    <s:maxInclusive value="180.0"/>
		  </s:restriction>
		</s:simpleType>

		<s:complexType name="SpatialRequest">
          <s:sequence>
	        <s:element name="latitude" type="tns:LatitudeType" minOccurs="1" maxOccurs="1"/>
			<s:element name="longitude" type="tns:LongitudeType" minOccurs="1" maxOccurs="1"/>
          </s:sequence>
        </s:complexType>

		<s:complexType name="SpatialResponse">
		  <s:sequence>
			<s:element name="status" type="tns:StatusType" minOccurs="1" maxOccurs="1"/>
			<s:element name="result" type="s:string" minOccurs="1" maxOccurs="1"/>
		  </s:sequence>
		</s:complexType>

		<s:complexType name="IndexRequest">
          <s:sequence>
	        <s:element name="table" type="s:string" minOccurs="1" maxOccurs="1"/>
	        <s:element name="index" type="s:int" minOccurs="1" maxOccurs="1"/>
          </s:sequence>
        </s:complexType>

		<s:complexType name="IndexResponse">
		  <s:sequence>
			<s:element name="status" type="tns:StatusType" minOccurs="1" maxOccurs="1"/>
			<s:element name="result" type="s:string" minOccurs="1" maxOccurs="1"/>
		  </s:sequence>
		</s:complexType>

		<s:complexType name="BoundingBoxRequest">
          <s:sequence>
	        <s:element name="north" type="tns:LatitudeType" minOccurs="1" maxOccurs="1"/>
			<s:element name="west" type="tns:LongitudeType" minOccurs="1" maxOccurs="1"/>
			<s:element name="south" type="tns:LatitudeType" minOccurs="1" maxOccurs="1"/>
			<s:element name="east" type="tns:LongitudeType" minOccurs="1" maxOccurs="1"/>
          </s:sequence>
        </s:complexType>

		<s:complexType name="BoundingBoxResponse">
		  <s:sequence>
			<s:element name="status" type="tns:StatusType" minOccurs="1" maxOccurs="1"/>
			<s:element name="result" type="s:string" minOccurs="1" maxOccurs="1"/>
		  </s:sequence>
		</s:complexType>
	  </s:schema>
   </wsdl:types>
 
   <wsdl:message name="SpatialSoapIn">
	   <wsdl:part name="parameters" element="tns:SpatialRequest"/>
   </wsdl:message>
   
   <wsdl:message name="SpatialSoapOut">
	   <wsdl:part name="parameters" element="tns:SpatialResponse"/>
   </wsdl:message>
 
   <wsdl:message name="IndexSoapIn">
	   <wsdl:part name="parameters" element="tns:IndexRequest"/>
   </wsdl:message>
   
   <wsdl:message name="IndexSoapOut">
	   <wsdl:part name="parameters" element="tns:IndexResponse"/>
   </wsdl:message>
 
   <wsdl:message name="BoundingBoxSoapIn">
	   <wsdl:part name="parameters" element="tns:BoundingBoxRequest"/>
   </wsdl:message>
   
   <wsdl:message name="BoundingBoxSoapOut">
	   <wsdl:part name="parameters" element="tns:BoundingBoxResponse"/>
   </wsdl:message>
 
   <wsdl:portType name="DbServicesPort">
	<wsdl:operation name="Spatial">
	   <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Perform a spatial search.</documentation>
	   <wsdl:input message="tns:SpatialSoapIn"/>
	   <wsdl:output message="tns:SpatialSoapOut"/>
	</wsdl:operation>
 
	<wsdl:operation name="Index">
	   <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Perform an index search.</documentation>
	   <wsdl:input message="tns:IndexSoapIn"/>
	   <wsdl:output message="tns:IndexSoapOut"/>
	</wsdl:operation>

	<wsdl:operation name="BoundingBox">
	   <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Perform a bounding box search.</documentation>
	   <wsdl:input message="tns:BoundingBoxSoapIn"/>
	   <wsdl:output message="tns:BoundingBoxSoapOut"/>
	</wsdl:operation>
   </wsdl:portType>

   <wsdl:binding name="DbServicesBinding" type="tns:DbServicesPort">
	 <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc" />
	 <wsdl:operation name="Spatial">
	   <soap:operation soapAction="http://db.pictometry.com/DbServices/Spatial"/>
	   <wsdl:input>
		   <soap:body use="literal"/>
	   </wsdl:input>
       <wsdl:output>
		   <soap:body use="literal"/>
       </wsdl:output>
     </wsdl:operation>

	 <wsdl:operation name="Index">
		 <soap:operation soapAction="http://db.pictometry.com/DbServices/Index"/>
	   <wsdl:input>
		   <soap:body use="literal"/>
	   </wsdl:input>
       <wsdl:output>
		   <soap:body use="literal"/>
       </wsdl:output>
     </wsdl:operation>

	 <wsdl:operation name="BoundingBox">
	   <soap:operation soapAction="http://db.pictometry.com/DbServices/BoundingBox"/>
	   <wsdl:input>
		   <soap:body use="literal"/>
	   </wsdl:input>
       <wsdl:output>
		   <soap:body use="literal"/>
       </wsdl:output>
     </wsdl:operation>
   </wsdl:binding>

   <wsdl:service name="DbServices">
     <wsdl:port name="DbServicesPort" binding="tns:DbServicesBinding">
		 <soap:address location="http://<ADD DOMAIN HERE>/DbServices/search/"/>
     </wsdl:port>
   </wsdl:service>
 
</wsdl:definitions>
