<?xml version="1.0" encoding="utf-8"?>
<definitions xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="urn:TLApplicationService" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="urn:TLApplicationService">
<types>
<xsd:schema targetNamespace="urn:TLApplicationService">
 <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
 <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" />
</xsd:schema>
</types>

<message name="authenticateRequest">
  <part name="ap_key" type="xsd:string" />
  <part name="api_username" type="xsd:string" />
  <part name="api_password" type="xsd:string" />
  <part name="hash" type="xsd:string" />
  <part name="backref" type="xsd:anyType" />
</message>

<message name="authenticateResponse">
  <part name="return" type="xsd:string" />
</message>

<message name="getBranchesRequest">
  <part name="session_key" type="xsd:string" />
  <part name="coin" type="xsd:string" />
  <part name="hash" type="xsd:string" />
  <part name="backref" type="xsd:string" />
</message>

<message name="getBranchesResponse">
  <part name="return" type="xsd:string" />
</message>

  <message name="checkApplicationStatusRequest">
    <part name="session_key" type="xsd:string" />
    <part name="TLreference" type="xsd:string" />
    <part name="hash" type="xsd:string" />
    <part name="backref" type="xsd:string" />
  </message>

  <message name="checkApplicationStatusResponse">
    <part name="return" type="xsd:string" />
  </message>
  
<message name="makeTLApplicationRequest">
  <part name="session_key" type="xsd:string" />
  <part name="coin" type="xsd:string" />
  <part name="branches" type="xsd:string" />
  <part name="hash" type="xsd:string" />
  <part name="backref" type="xsd:string" />
</message>

<message name="makeTLApplicationResponse">
  <part name="return" type="xsd:string" />
</message>

<portType name="TLApplicationServicePortType">
  <operation name="authenticate">
    <documentation>Validate a user by supplied password, returns session key needs:(api_key, api_username, api_password)</documentation>
    <input message="tns:authenticateRequest"/>
    <output message="tns:authenticateResponse"/>
  </operation> 

  <operation name="getBranches">
    <documentation>Get Customer's profile and active trading license branches needs:(session_key, coin) returns:(customer_profile, active_branches)</documentation>
    <input message="tns:getBranchesRequest"/>
    <output message="tns:getBranchesResponse"/>
  </operation> 
  
   <operation name="makeTLApplication">
    <documentation>Apply for trading license(s) and returns the resulting tlc_codes needs:(session_key, coin,branches) returns:(tlc_codes)</documentation>
    <input message="tns:makeTLApplicationRequest"/>
    <output message="tns:makeTLApplicationResponse"/>
  </operation>

  <operation name="checkApplicationStatus">
    <documentation>Input the acknowledgement number recieved after applying to check the status of an application needs:(session_key, TLreference) returns:(tl_applications)</documentation>
    <input message="tns:checkApplicationStatusRequest"/>
    <output message="tns:checkApplicationStatusResponse"/>
  </operation>
  
</portType>

<binding name="TLApplicationServiceBinding" type="tns:TLApplicationServicePortType">
  <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
  <operation name="authenticate">
    <soap:operation soapAction="urn:TLApplicationService#authenticate" style="rpc"/>
    <input><soap:body use="encoded" namespace="urn:TLApplicationService" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="urn:TLApplicationService" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
  </operation> 
    
  <operation name="getBranches">
    <soap:operation soapAction="urn:TLApplicationService#getBranches" style="rpc"/>
    <input><soap:body use="encoded" namespace="urn:TLApplicationService" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="urn:TLApplicationService" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
  </operation> 
  
   <operation name="makeTLApplication">
    <soap:operation soapAction="urn:TLApplicationService#makeTLApplication" style="rpc"/>
    <input><soap:body use="encoded" namespace="urn:TLApplicationService" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="urn:TLApplicationService" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
  </operation>

  <operation name="checkApplicationStatus">
    <soap:operation soapAction="urn:TLApplicationService#checkApplicationStatus" style="rpc"/>
    <input>
      <soap:body use="encoded" namespace="urn:TLApplicationService" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
    </input>
    <output>
      <soap:body use="encoded" namespace="urn:TLApplicationService" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
    </output>
  </operation>

 
    
</binding>

<service name="TLApplicationService">
  <port name="TLApplicationServicePort" binding="tns:TLApplicationServiceBinding">
    <soap:address location="https://172.16.0.164/ecitie/api/tlapplicationv1.php"/>
  </port>
</service>
</definitions>
