I'm trying to consume the NFE download service on the farm:
But I have gotten the following error:
The remote server returned an error: (500) Internal Server Error.
The message I have sent is:
<?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:Header>
<nfeCabecMsg xmlns="http://www.portalfiscal.inf.br/nfe/wsdl/nfeDownloadNF">
<cUF>31</cUF>
<versaoDados>3.10</versaoDados>
</nfeCabecMsg>
</soap:Header>
<soap:Body>
<nfeDadosMsg xmlns="http://www.portalfiscal.inf.br/nfe/wsdl/NfeDownloadNF">
<downloadNFe xmlns="http://www.portalfiscal.inf.br/nfe" versao="3.10">
<tpAmb>1</tpAmb>
<xServ>DOWNLOAD NFE</xServ>
<CNPJ>[NUMERO DO CNPJ]</CNPJ>
<chNFe>[CHAVE DA NOTA FISCAL]</chNFe>
</downloadNFe>
</nfeDadosMsg>
</soap:Body>
</soap:Envelope>
I've removed all the spaces as requested (I already use some other services successfully)
request.Method = "POST";
request.ContentType = "text/xml";
The certificate I'm sure is correct too.
Could someone tell me the error?