Obrigado pelas dicas, eu verifiquei várias vezes, veja como estou consultando o protocolo, estou capturando do site do sefaz.... a rotina estava funcionando normalmente, parou derrepente.
ACBrNFe1.NotasFiscais.Clear;
ACBrNFe1.EventoNFe.Evento.Clear;
ACBrNFe1.WebServices.Consulta.NFeChave := CancChave.edChave.Text;
if ACBrNFe1.WebServices.Consulta.Executar then
begin
CancChave.edProtocolo.Text := ACBrNFe1.WebServices.Consulta.Protocolo;
end;
try
if CancChave.ShowModal <> mrOK then exit;
ACBrNFe1.EventoNFe.Evento.Clear;
with ACBrNFe1.EventoNFe.Evento.Add do
begin
infEvento.chNFe := CancChave.edChave.Text;
infEvento.CNPJ := dvdados.RetiraCaracteresEspeciais(TBConfigCNPJ.AsString);
infEvento.dhEvento := now;
infEvento.tpEvento := teCancelamento;
infEvento.detEvento.xJust := CancChave.edJusiticativa.Text;
infEvento.detEvento.nProt := CancChave.edProtocolo.Text;
end;
Cancelou := ACBrNFe1.EnviarEvento(StrToInt(CancChave.edLote.Text));
ConfirmaCancelamentoNFe;
LoadXML(ACBrNFe1.WebServices.EnvEvento.RetornoWS, WBResposta);
finally
FreeandNil(CancChave);
end;