<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:tns="http://www.sped.fazenda.gov.br/nfse/wsdl"
    targetNamespace="http://www.sped.fazenda.gov.br/nfse/wsdl">

    <!-- ========================================================= -->
    <!-- Types                                                     -->
    <!-- ========================================================= -->
    <wsdl:types>
        <xsd:schema
            targetNamespace="http://www.sped.fazenda.gov.br/nfse/wsdl"
            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:tns="http://www.sped.fazenda.gov.br/nfse/wsdl"
            elementFormDefault="qualified">

            <xsd:element name="GerarNfse">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="param" type="xsd:string"/>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>

            <xsd:element name="GerarNfseResponse">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="outputXML" type="xsd:string"/>
                        <xsd:element name="respostaADN" type="xsd:string"/>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>

            <xsd:element name="CancelarNfse">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="param" type="xsd:string"/>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>

            <xsd:element name="CancelarNfseResponse">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="outputXML" type="xsd:string"/>
                        <xsd:element name="respostaADN" type="xsd:string"/>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>

        </xsd:schema>
    </wsdl:types>


    <!-- ========================================================= -->
    <!-- Messages                                                  -->
    <!-- ========================================================= -->

    <!-- Gerar NFS-e -->
    <wsdl:message name="GerarNfseRequest">
        <wsdl:part name="parameters" element="tns:GerarNfse"/>
    </wsdl:message>

    <wsdl:message name="GerarNfseResponse">
        <wsdl:part name="parameters" element="tns:GerarNfseResponse"/>
    </wsdl:message>

    <!-- Cancelar NFS-e -->
    <wsdl:message name="CancelarNfseRequest">
        <wsdl:part name="parameters" element="tns:CancelarNfse"/>
    </wsdl:message>

    <wsdl:message name="CancelarNfseResponse">
        <wsdl:part name="parameters" element="tns:CancelarNfseResponse"/>
    </wsdl:message>

    <!-- Substituir NFS-e -->
    <wsdl:message name="SubstituirNfseRequest">
        <wsdl:part name="parameters" element="tns:SubstituirNfse"/>
    </wsdl:message>

    <wsdl:message name="SubstituirNfseResponse">
        <wsdl:part name="parameters" element="tns:SubstituirNfseResponse"/>
    </wsdl:message>

    <!-- ========================================================= -->
    <!-- PortType                                                  -->
    <!-- ========================================================= -->
    <wsdl:portType name="NfseServicePortType">

        <wsdl:operation name="GerarNfse">
            <wsdl:input message="tns:GerarNfseRequest"/>
            <wsdl:output message="tns:GerarNfseResponse"/>
        </wsdl:operation>

        <wsdl:operation name="CancelarNfse">
            <wsdl:input message="tns:CancelarNfseRequest"/>
            <wsdl:output message="tns:CancelarNfseResponse"/>
        </wsdl:operation>

        <wsdl:operation name="SubstituirNfse">
            <wsdl:input message="tns:SubstituirNfseRequest"/>
            <wsdl:output message="tns:SubstituirNfseResponse"/>
        </wsdl:operation>

    </wsdl:portType>

    <!-- ========================================================= -->
    <!-- Binding (SOAP 1.2)                                        -->
    <!-- ========================================================= -->
    <wsdl:binding name="NfseServiceSoap12Binding" type="tns:NfseServicePortType">
        <soap12:binding transport="http://schemas.xmlsoap.org/soap/http"
                        style="document"/>

        <wsdl:operation name="GerarNfse">
            <soap12:operation soapAction="GerarNfse"/>
            <wsdl:input>
                <soap12:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap12:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>

        <wsdl:operation name="CancelarNfse">
            <soap12:operation soapAction="CancelarNfse"/>
            <wsdl:input>
                <soap12:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap12:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>

        <wsdl:operation name="SubstituirNfse">
            <soap12:operation soapAction="SubstituirNfse"/>
            <wsdl:input>
                <soap12:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap12:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>

    </wsdl:binding>

    <!-- ========================================================= -->
    <!-- Service                                                   -->
    <!-- ========================================================= -->
    <wsdl:service name="NfseService">
        <wsdl:port name="NfseServiceSoap12Port"
                   binding="tns:NfseServiceSoap12Binding">
            <soap12:address location="https://sim.digifred.net.br/rondaalta/nfse/ws/principal"/>
        </wsdl:port>
    </wsdl:service>

</wsdl:definitions>
