<?xml version="1.0"?>
<!-- WSDL description Flash-db's Stock History. -->

<definitions name="urn:StockHistory"
             targetNamespace="urn:StockHistory"
             xmlns:typens="urn:StockHistory"
             xmlns:xsd="http://www.w3.org/2001/XMLSchema"
             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
             xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
             xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
             xmlns="http://schemas.xmlsoap.org/wsdl/">

  <types>
    <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:StockHistory">
          
      <xsd:complexType name="StockHistoryResultArray">
        <xsd:all>
          <xsd:element name="stockHistoryElements" type="typens:StockHistoryElementArray"/>
        </xsd:all>
      </xsd:complexType>

      <xsd:complexType name="StockHistoryElementArray">
        <xsd:complexContent>
          <xsd:restriction base="soapenc:Array">
             <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="typens:StockHistoryElement[]"/>
          </xsd:restriction>
        </xsd:complexContent>
      </xsd:complexType>

      <xsd:complexType name="StockHistoryElement">
        <xsd:all>
          <xsd:element name="date" type="xsd:string"/>
          <xsd:element name="open" type="xsd:float"/>
          <xsd:element name="high" type="xsd:float"/>
          <xsd:element name="low" type="xsd:float"/>		  		  		  
          <xsd:element name="close" type="xsd:float"/>	
          <xsd:element name="volume" type="xsd:float"/>		  
        </xsd:all>
      </xsd:complexType>
	  
    </xsd:schema>
  </types> 


  <!-- Messages for Stock History - doStockHistory. -->
  <message name="doStockHistory">
    <part name="username"       type="xsd:string"/>
    <part name="password"       type="xsd:string"/>
    <part name="symbol"        	type="xsd:string"/>
	<part name="interval"       type="xsd:string"/>		
    <part name="dayFrom"        type="xsd:string"/>	
	<part name="monthFrom"      type="xsd:string"/>
	<part name="yearFrom"       type="xsd:string"/>
  </message>

  <message name="doStockHistoryResponse">
    <part name="return"         type="typens:StockHistoryResultArray"/>           
  </message>



  <!-- Port for Stock History -->
  <portType name="StockHistoryPort">
    <operation name="doStockHistory">
      <input message="typens:doStockHistory"/>
      <output message="typens:doStockHistoryResponse"/>
    </operation>
  </portType>

  
  <binding name="StockHistoryBinding" type="typens:StockHistoryPort">
    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>

    <operation name="doStockHistory">
      <soap:operation soapAction="urn:StockHistoryAction"/>
      <input>
        <soap:body use="encoded"
                   namespace="urn:StockHistory"
                   encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </input>
      <output>
        <soap:body use="encoded"
                   namespace="urn:StockHistory"
                   encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </output>
    </operation>
  </binding>


  <service name="StockHistoryService">
  <documentation>Returns open, high, low, close, and volume daily data for a given company symbol.</documentation>
    <port name="StockHistoryPort" binding="typens:StockHistoryBinding">
      <soap:address location="http://www.flash-db.com/services/ws/stockHistory.php"/>
    </port>
  </service>
</definitions>

