Ir para conteúdo
  • Cadastre-se

pedrobragap

Membros
  • Total de ítens

    7
  • Registro em

  • Última visita

Posts postados por pedrobragap

  1. Em 05/01/2021 at 16:47, EdmarFrazao disse:

    Uma solução que achei:

    Consulta pelo 'ultimo ANSU' que você tem armazenado: ''NSU específico''

      ACBrNFe1.DistribuicaoDFe(StrToInt(cUFAutor), CNPJ, '', ANSU);

    Sera retornado :
      sMsg := 'maxNSU'+
          ACBrNFe1.WebServices.DistribuicaoDFe.retDistDFeInt.maxNSU;

     

    Comparar se o MAXNSU e > que o ultimo NSU que foi armazenado

    Somente se for que ira fazer a pesquisa pelo Ultimo NSU, assim evita rodar a rotina sem ter novos NSU

     

    Bom dia Edmar,

    fiquei com uma duvida sobre essa sua solução, pois ao fazer a comparação do maxNSU, vc já vai estar fazendo uma nova solicitação para conseguir ele!

  2. Meu problema foi resolvido utilizando esse schema:

     

    <?xml version="1.0" encoding="UTF-8"?>
    <soap12:Envelope xmlns:soap12="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <soap12:Header>
            <nfeCabecMsg xmlns="http://www.portalfiscal.inf.br/nfe/wsdl/NFeDistribuicaoDFe">
                <cUF>15</cUF>
                <versaoDados>1.00</versaoDados>
            </nfeCabecMsg>
        </soap12:Header>
        <soap12:Body>
            <nfeDistDFeInteresse xmlns="http://www.portalfiscal.inf.br/nfe/wsdl/NFeDistribuicaoDFe">
                <nfeDadosMsg>
                    <distDFeInt xmlns="http://www.portalfiscal.inf.br/nfe" versao="1.00">
                        <tpAmb>1</tpAmb>
                        <cUFAutor>15</cUFAutor>
                        <CNPJ>XXXXXXXXXXXXX</CNPJ>
                        <distNSU>
                            <ultNSU>000000000000000</ultNSU>
                        </distNSU>
                    </distDFeInt>
                </nfeDadosMsg>
            </nfeDistDFeInteresse>
        </soap12:Body>
    </soap12:Envelope>

  3. Estou tentando consumir o webservice NFeDistribuicaoDFe e só tenho esse retorno !!! e não sei oque fazer pois sou novo nessa área, Me ajudem. 

     

    <?xml version="1.0" encoding="utf-8"?>
    <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
      <soap12:Body>
        <nfeDistDFeInteresse xmlns="http://www.portalfiscal.inf.br/nfe/wsdl/NFeDistribuicaoDFe">
          <nfeDadosMsg><nfeDistDFeInteresse xmlns="http://www.portalfiscal.inf.br/nfe/wsdl/NFeDistribuicaoDFe">
          <nfeDadosMsg>
                    <distDFeInt versao="1.00" xmlns="http://www.portalfiscal.inf.br/nfe"  >
                        <tpAmb>1</tpAmb>
                        <cUFAutor>15</cUFAutor>
                        <CNPJ>XXXXXXXXXXXXXX</CNPJ>
                        <distNSU>
                            <ultNSU>00000000000000</ultNSU>
                        </distNSU>
                    </distDFeInt>
            </nfeDadosMsg></nfeDistDFeInteresse>
        </nfeDadosMsg>
        </nfeDistDFeInteresse>
      </soap12:Body>
    </soap12:Envelope>

     

    retorno

     

    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <soap:Body>
            <nfeDistDFeInteresseResponse xmlns="http://www.portalfiscal.inf.br/nfe/wsdl/NFeDistribuicaoDFe">
                <nfeDistDFeInteresseResult>
                    <retDistDFeInt xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" versao="1.00" xmlns="http://www.portalfiscal.inf.br/nfe">
                        <tpAmb>1</tpAmb>
                        <verAplic>1.2.0</verAplic>
                        <cStat>239</cStat>
                        <xMotivo>Rejeicao: Cabecalho - Versao do arquivo XML nao suportada</xMotivo>
                        <dhResp>2020-09-01T18:21:59</dhResp>
                        <ultNSU>000000000000000</ultNSU>
                        <maxNSU>000000000000000</maxNSU>
                    </retDistDFeInt>
                </nfeDistDFeInteresseResult>
            </nfeDistDFeInteresseResponse>
        </soap:Body>
    </soap:Envelope>

     

     

×
×
  • Criar Novo...

Informação Importante

Colocamos cookies em seu dispositivo para ajudar a tornar este site melhor. Você pode ajustar suas configurações de cookies, caso contrário, assumiremos que você está bem para continuar.