<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:header="http://atapply.grants.gov/system/Header-V1.0" xmlns:footer="http://atapply.grants.gov/system/Footer-V1.0" xmlns:glob="http://atapply.grants.gov/system/Global-V1.0" xmlns:agis="http://atapply.grants.gov/WebServices/AgencyIntegrationServices-V1.0" targetNamespace="http://atapply.grants.gov/WebServices/AgencyIntegrationServices-V1.0" name="AgencyIntegrationServices">
   <wsdl:types>
      <xsd:schema targetNamespace="http://atapply.grants.gov/WebServices/AgencyIntegrationServices-V1.0" xmlns:agis="http://atapply.grants.gov/WebServices/AgencyIntegrationServices-V1.0" elementFormDefault="qualified" attributeFormDefault="qualified" version="1.2">
         <!--System Data Types-->
         <xsd:import namespace="http://atapply.grants.gov/system/Footer-V1.0" schemaLocation="http://atapply.grants.gov/system/schemas/Footer-V1.0.xsd"/>
         <xsd:import namespace="http://atapply.grants.gov/system/Header-V1.0" schemaLocation="http://atapply.grants.gov/system/schemas/Header-V1.0.xsd"/>
         <xsd:import namespace="http://atapply.grants.gov/system/Global-V1.0" schemaLocation="http://atapply.grants.gov/system/schemas/Global-V1.0.xsd"/>

<!-- ================================================================= -->
<!-- For those who rather bind to the GrantApplication element         -->
<!-- uncomment the import for the MetaGrantApplication schema below    -->
<!-- and add the its namespace to the wsdl:definitions root element    -->
<!-- xmlns:grant="http://atapply.grants.gov/system/MetaGrantApplication" -->
<!-- ================================================================= -->
<!--
         <xsd:import namespace="http://atapply.grants.gov/system/MetaGrantApplication" schemaLocation="http://atapply.grants.gov/system/schemas/MetaGrantApplication.xsd"/>
-->

         <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" schemaLocation="http://schemas.xmlsoap.org/wsdl/"/>
         <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/soap/" schemaLocation="http://schemas.xmlsoap.org/wsdl/soap/"/>
         <xsd:element name="GetApplicationListRequest">
            <xsd:complexType>
               <xsd:sequence>
                  <xsd:element name="ApplicationFilter" minOccurs="0" maxOccurs="unbounded">
                     <!-- If there is no ApplicationFilter specified in the GetApplicationRequest, the web services will response with the list of ALL applications on Grants.gov.  -->
                     <xsd:complexType>
                        <xsd:sequence>
                           <xsd:element name="Filter">
                              <xsd:simpleType>
                                 <xsd:restriction base="xsd:string">
                                    <xsd:enumeration value="Status"/>
                                    <!--see GrantsGovApplicationStatusType for a list of valid status values-->
                                    <xsd:enumeration value="OpportunityID"/>
                                    <xsd:enumeration value="CFDANumber"/>
                                 </xsd:restriction>
                              </xsd:simpleType>
                           </xsd:element>
                           <xsd:element name="FilterValue" type="xsd:string"/>
                        </xsd:sequence>
                     </xsd:complexType>
                  </xsd:element>
               </xsd:sequence>
            </xsd:complexType>
            <xsd:unique name="filter">
               <xsd:selector xpath="GetApplicationListRequest/ApplicationFilter"/>
               <xsd:field xpath="Filter"/>
            </xsd:unique>
         </xsd:element>
         <xsd:element name="GetApplicationListResponse">
            <xsd:complexType>
               <xsd:sequence>
                  <xsd:element name="AvailableApplicationNumber" type="xsd:int"/>
                  <xsd:element name="ApplicationInformation" type="agis:ApplicationInformationType" minOccurs="0" maxOccurs="unbounded"/>
               </xsd:sequence>
            </xsd:complexType>
         </xsd:element>
         <xsd:complexType name="ApplicationInformationType">
            <xsd:sequence>
               <xsd:element ref="header:OpportunityID" minOccurs="0"/>
               <xsd:element ref="header:CompetitionID" minOccurs="0"/>
               <xsd:element ref="header:CFDANumber" minOccurs="0"/>
               <xsd:element ref="footer:Grants_govTrackingNumber"/>
               <xsd:element ref="footer:ReceivedDateTime" minOccurs="0"/>
               <xsd:element name="Grants_GovApplicationStatus" type="agis:GrantsGovApplicationStatusType"/>
            </xsd:sequence>
         </xsd:complexType>
         <xsd:simpleType name="GrantsGovApplicationStatusType">
            <xsd:restriction base="xsd:string">
               <xsd:enumeration value="Receiving"/>
               <xsd:enumeration value="Received"/>
               <xsd:enumeration value="Processing"/>
               <xsd:enumeration value="Validated"/>
               <xsd:enumeration value="Rejected with Errors"/>
               <xsd:enumeration value="Received by Agency"/>
               <xsd:enumeration value="Agency Tracking Number Assigned"/>
            </xsd:restriction>
         </xsd:simpleType>
         <xsd:element name="ConfirmApplicationDeliveryRequest">
            <xsd:complexType>
               <xsd:sequence>
                  <xsd:element ref="footer:Grants_govTrackingNumber"/>
               </xsd:sequence>
            </xsd:complexType>
         </xsd:element>
         <xsd:simpleType name="EncodingTypeEnum">
            <xsd:restriction base="xsd:string">
               <xsd:enumeration value="MIME"/>
               <xsd:enumeration value="DIME"/>
            </xsd:restriction>
         </xsd:simpleType>
         <xsd:element name="GetApplicationRequest">
            <xsd:complexType>
               <xsd:sequence>
                  <xsd:element name="encodingType" type="agis:EncodingTypeEnum" minOccurs="0" default="MIME"/>
                  <xsd:element ref="footer:Grants_govTrackingNumber"/>
               </xsd:sequence>
            </xsd:complexType>
         </xsd:element>
         <xsd:element name="GetApplicationResponse">
            <xsd:complexType>
               <xsd:sequence>
                  <xsd:element name="SubmittedApplication" type="xsd:anyType"/>
<!-- ========================================================= -->
<!-- For those who rather bind to the GrantApplication element -->
<!-- comment out the above definition for SubmittedApplication -->
<!-- and uncomment the alternate definition below.             -->
<!-- ========================================================= -->
<!-- 
                  <xsd:element name="SubmittedApplication">
                     <xsd:complexType>
                        <xsd:sequence>
                           <xsd:element ref="grant:GrantApplication"/>
                        </xsd:sequence>
                     </xsd:complexType>
                  </xsd:element>
-->


               </xsd:sequence>
            </xsd:complexType>
         </xsd:element>
         <xsd:element name="GetApplicationZipRequest">
            <xsd:complexType>
               <xsd:sequence>
                  <xsd:element name="encodingType" type="agis:EncodingTypeEnum" minOccurs="0" default="MIME"/>
                  <xsd:element ref="footer:Grants_govTrackingNumber"/>
               </xsd:sequence>
            </xsd:complexType>
         </xsd:element>
         <xsd:element name="ConfirmApplicationDeliveryResponse">
            <xsd:complexType>
               <xsd:sequence>
                  <xsd:element ref="footer:Grants_govTrackingNumber"/>
                  <xsd:element ref="agis:ResponseMessage"/>
               </xsd:sequence>
            </xsd:complexType>
         </xsd:element>
         <xsd:element name="ResponseMessage">
            <xsd:simpleType>
               <xsd:restriction base="xsd:string">
                  <xsd:enumeration value="Success"/>
                  <xsd:enumeration value="Failure"/>
               </xsd:restriction>
            </xsd:simpleType>
         </xsd:element>
         <xsd:element name="AssignAgencyTrackingNumberRequest">
            <xsd:complexType>
               <xsd:sequence>
                  <xsd:element ref="footer:Grants_govTrackingNumber"/>
                  <xsd:element ref="agis:AgencyTrackingNumber"/>
               </xsd:sequence>
            </xsd:complexType>
         </xsd:element>
         <xsd:element name="AssignAgencyTrackingNumberResponse">
            <xsd:complexType>
               <xsd:sequence>
                  <xsd:element ref="footer:Grants_govTrackingNumber"/>
                  <xsd:element ref="agis:ResponseMessage"/>
               </xsd:sequence>
            </xsd:complexType>
         </xsd:element>
         <xsd:element name="AgencyTrackingNumber" type="xsd:string"/>
         <xsd:element name="GetApplicationZipResponse">
            <xsd:complexType>
               <xsd:sequence>
                  <xsd:element ref="agis:Manifest"/>
               </xsd:sequence>
            </xsd:complexType>
         </xsd:element>
         <xsd:complexType name="item">
            <xsd:sequence>
               <xsd:element name="Purpose" type="glob:StringMin1Max255Type"/>
               <xsd:element name="FileName" type="glob:StringMin1Max255Type"/>
               <xsd:element name="MimeType" type="glob:StringMin1Max30Type"/>
               <xsd:element name="FileLocation">
                  <xsd:complexType>
                     <xsd:attribute name="href" type="xsd:anyURI"/>
                  </xsd:complexType>
               </xsd:element>
            </xsd:sequence>
         </xsd:complexType>
         <xsd:element name="Manifest">
            <xsd:complexType>
               <xsd:sequence>
                  <xsd:element name="itemType" type="agis:item" minOccurs="1" maxOccurs="unbounded"/>
               </xsd:sequence>
            </xsd:complexType>
         </xsd:element>
      </xsd:schema>
   </wsdl:types>
   <wsdl:message name="GetApplicationListRequestMessage">
      <wsdl:part name="GetApplicationListRequest" element="agis:GetApplicationListRequest"/>
   </wsdl:message>
   <wsdl:message name="GetApplicationListResponseMessage">
      <wsdl:part name="GetApplicationListRequestResponse" element="agis:GetApplicationListResponse"/>
   </wsdl:message>

   <wsdl:message name="GetApplicationRequestMessage">
      <wsdl:part name="GetApplicationRequest" element="agis:GetApplicationRequest"/>
   </wsdl:message>
   <wsdl:message name="GetApplicationResponseMessage">
      <wsdl:part name="GetApplicationResponse" element="agis:GetApplicationResponse"/>
   </wsdl:message>
   <wsdl:message name="GetApplicationZipRequestMessage">
      <wsdl:part name="GetApplicationZipRequest" element="agis:GetApplicationZipRequest"/>
   </wsdl:message>
   <wsdl:message name="GetApplicationZipResponseMessage">
      <wsdl:part name="GetApplicationZipResponse" element="agis:GetApplicationZipResponse"/>
   </wsdl:message>
   <wsdl:message name="ConfirmApplicationDeliveryRequestMessage">
      <wsdl:part name="ConfirmApplicationDeliveryRequest" element="agis:ConfirmApplicationDeliveryRequest"/>
   </wsdl:message>
   <wsdl:message name="ConfirmApplicationDeliveryResponseMessage">
      <wsdl:part name="ConfirmApplicationDeliveryResponse" element="agis:ConfirmApplicationDeliveryResponse"/>
   </wsdl:message>
   <wsdl:message name="AssignAgencyTrackingNumberRequestMessage">
      <wsdl:part name="AssignAgencyTrackingNumberRequest" element="agis:AssignAgencyTrackingNumberRequest"/>
   </wsdl:message>
   <wsdl:message name="AssignAgencyTrackingNumberResponseMessage">
      <wsdl:part name="AssignAgencyTrackingNumberResponse" element="agis:AssignAgencyTrackingNumberResponse"/>
   </wsdl:message>
   <wsdl:portType name="AgencyIntegrationPortType">
      <wsdl:operation name="GetApplicationList">
         <wsdl:input message="agis:GetApplicationListRequestMessage"/>
         <wsdl:output message="agis:GetApplicationListResponseMessage"/>

      </wsdl:operation>
      <wsdl:operation name="GetApplication">
         <wsdl:input message="agis:GetApplicationRequestMessage"/>
         <wsdl:output message="agis:GetApplicationResponseMessage"/>

      </wsdl:operation>
      <wsdl:operation name="GetApplicationZip">
         <wsdl:input message="agis:GetApplicationZipRequestMessage"/>
         <wsdl:output message="agis:GetApplicationZipResponseMessage"/>

      </wsdl:operation>
      <wsdl:operation name="ConfirmApplicationDelivery">
         <wsdl:input message="agis:ConfirmApplicationDeliveryRequestMessage"/>
         <wsdl:output message="agis:ConfirmApplicationDeliveryResponseMessage"/>

      </wsdl:operation>
      <wsdl:operation name="AssignAgencyTrackingNumber">
         <wsdl:input message="agis:AssignAgencyTrackingNumberRequestMessage"/>
         <wsdl:output message="agis:AssignAgencyTrackingNumberResponseMessage"/>

      </wsdl:operation>
   </wsdl:portType>
   <wsdl:binding name="AgencyIntegrationSoapBinding" type="agis:AgencyIntegrationPortType">
      <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
      <wsdl:operation name="GetApplicationList">
         <soap:operation soapAction="https://ws.grants.gov:446/agency-s2s-server/services/AgencyIntegrationSoapPort/GetApplicationList" style="document"/>
         <wsdl:input>
            <soap:body use="literal"/>
         </wsdl:input>
         <wsdl:output>
            <soap:body use="literal"/>
         </wsdl:output>

      </wsdl:operation>
      <wsdl:operation name="GetApplication">
         <soap:operation soapAction="https://ws.grants.gov:446/agency-s2s-server/services/AgencyIntegrationSoapPort/GetApplication" style="document"/>
         <wsdl:input>
            <soap:body use="literal"/>
         </wsdl:input>
         <wsdl:output>
            <soap:body use="literal"/>
         </wsdl:output>

      </wsdl:operation>
      <wsdl:operation name="GetApplicationZip">
         <soap:operation soapAction="https://ws.grants.gov:446/agency-s2s-server/services/AgencyIntegrationSoapPort/GetApplicationZip" style="document"/>
         <wsdl:input>
            <soap:body use="literal"/>
         </wsdl:input>
         <wsdl:output>
            <soap:body use="literal"/>
         </wsdl:output>

      </wsdl:operation>
      <wsdl:operation name="ConfirmApplicationDelivery">
         <soap:operation soapAction="https://ws.grants.gov:446/agency-s2s-server/services/AgencyIntegrationSoapPort/ConfirmApplicationDelivery" style="document"/>
         <wsdl:input>
            <soap:body use="literal"/>
         </wsdl:input>
         <wsdl:output>
            <soap:body use="literal"/>
         </wsdl:output>

      </wsdl:operation>
      <wsdl:operation name="AssignAgencyTrackingNumber">
         <soap:operation soapAction="https://ws.grants.gov:446/agency-s2s-server/services/AgencyIntegrationSoapPort/AssignAgencyTrackingNumber" style="document"/>
         <wsdl:input>
            <soap:body use="literal"/>
         </wsdl:input>
         <wsdl:output>
            <soap:body use="literal"/>
         </wsdl:output>

      </wsdl:operation>

   </wsdl:binding>
   <wsdl:service name="AgencyIntegrationServices">
      <wsdl:port name="AgencyIntegrationSoapPort" binding="agis:AgencyIntegrationSoapBinding">
         <soap:address location="https://ws.grants.gov:446/agency-s2s-server/services/AgencyIntegrationSoapPort"/>
      </wsdl:port>
   </wsdl:service>

</wsdl:definitions>
