Atualizei tudo de novo , mas sem sucesso ! o problema está na func:
AcbrCte.DistribuicaoDFePorUltNSU( zQueryEMPRESAUF.AsInteger, zQueryEMPRESACNPJ.AsString , UltNSu );
Retorno da
Result := WebServices.DistribuicaoDFe.Executar;
('soap12', '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"', 'cteCabecMsg', 'cteDistDFeInteresse', '', '<cteDadosMsg><distDFeInt xmlns="http://www.portalfiscal.inf.br/cte" versao="1.00"><tpAmb>1</tpAmb><cUFAutor>02</cUFAutor><CNPJ>09421857000150</CNPJ><distNSU><ultNSU>000000000000000</ultNSU></distNSU></distDFeInt></cteDadosMsg>', '<?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:Header><cteCabecMsg xmlns="http://www.portalfiscal.inf.br/cte/wsdl/CTeDistribuicaoDFe"><cUF>35</cUF><versaoDados>1.00</versaoDados></cteCabecMsg></soap12:Header><soap12:Body><cteDistDFeInteresse xmlns="http://www.portalfiscal.inf.br/cte/wsdl/CTeDistribuicaoDFe"><cteDadosMsg><distDFeInt xmlns="http://www.portalfiscal.inf.br/cte" versao="1.00"><tpAmb>1</tpAmb><cUFAutor>02</cUFAutor><CNPJ>09421857000150</CNPJ><distNSU><ultNSU>000000000000000</ultNSU></distNSU></distDFeInt></cteDadosMsg></cteDistDFeInteresse></soap12:Body></soap12:Envelope>', '<?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><cteDistDFeInteresseResponse xmlns="http://www.portalfiscal.inf.br/cte/wsdl/CTeDistribuicaoDFe"><cteDistDFeInteresseResult><retDistDFeInt versao="1.00" xmlns="http://www.portalfiscal.inf.br/cte"><tpAmb>1</tpAmb><verAplic>2.0.5_2409060940</verAplic><cStat>215</cStat><xMotivo>Rejeicao: Falha no esquema xml</xMotivo><dhResp>2024-09-06T09:40:18</dhResp><ultNSU>000000000000000</ultNSU><maxNSU>000000000000000</maxNSU></retDistDFeInt></cteDistDFeInteresseResult></cteDistDFeInteresseResponse></soap:Body></soap:Envelope>', '<retDistDFeInt versao="1.00" xmlns="http://www.portalfiscal.inf.br/cte"><tpAmb>1</tpAmb><verAplic>2.0.5_24
---- func do CTE
function TACBrCTe.Distribuicao(AcUFAutor: integer; const ACNPJCPF, AultNSU, ANSU,
AchCTe: String): Boolean;
begin
WebServices.DistribuicaoDFe.cUFAutor := AcUFAutor;
WebServices.DistribuicaoDFe.CNPJCPF := ACNPJCPF;
WebServices.DistribuicaoDFe.ultNSU := AultNSU;
WebServices.DistribuicaoDFe.NSU := ANSU;
WebServices.DistribuicaoDFe.chCTe := AchCTe;
Result := WebServices.DistribuicaoDFe.Executar;
if not Result then
GerarException( WebServices.DistribuicaoDFe.Msg );
end;