Jump to content
Fivewin Brasil

RETORNO criptografado (fladimir/rochinha)


Alain da Silva

Recommended Posts

bom dia, achei aqui no fórum acho que referencia ao assunto:

fladimir

Quando baixa xml do site do governo via webservice (baixa com certificado) Consulta NFe Destinadas vem tb criptografado ai tem q descriptografar.

 

Alguem poderia me dizer como faço para descriptografar esse xml?

obrigado

 

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<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" xmlns="http://www.portalfiscal.inf.br/nfe" versao="1.01">
<tpAmb>1</tpAmb>
<verAplic>1.1.9</verAplic>
<cStat>138</cStat>
<xMotivo>Documento localizado</xMotivo>
<dhResp>2017-11-01T12:49:15-02:00</dhResp>
<loteDistDFeInt>
<docZip schema="procNFe_v3.10.xsd" NSU="000000000002404">H4sIAAAAAAAEAO1a6ZOiyLb/ ... (muito grande) AA==</docZip>
</loteDistDFeInt>
</retDistDFeInt>
</nfeDistDFeInteresseResult>
</nfeDistDFeInteresseResponse>
</soap:Body>
</soap:Envelope>
Link to comment
Share on other sites

Valeu Fladimir, funcionou perfeito. fico assim essa parte.

         if AT("<cStat>138</cStat>",cdoc)>0
            cRetornot:="Download Efetuado com Sucesso"
            cBase64 := oXmlDoc:findFirst( "docZip" )
            cBase64 := cBase64:cdata
            cBase64 := hb_ZUncompress(HB_base64Decode(cBase64))
            SaveFile( DiskName()+":\wfatura\XMLFORNECEDOR\" + cChaveNfe + "-nfe.xml", cBase64)
            Return cRetornot
         endif
 

Obrigado

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...