NFSe - Brasilia PHP

Bom dia Pessoal, estou correndo contra o tempo para adaptar meu sistema já que não será mais permitido nota conjugada no DF.

Usando os exemplos postados acima ainda não consegui, me retorna a seguinte mensagem: s:Client ConsultarNfseServicoPrestado deve obedecer a um schema válido.

Vou postar o meu aqui para identificar o erro:


$arquivo            = 'xml/consulta.xml';
$xml				= htmlentities(file_get_contents($arquivo));
$cabecalho			= htmlentities('<cabecalho versao="1.00" xmlns="http://www.issnetonline.com.br/webservice/nfd"><versaoDados>2.04</versaoDados></cabecalho>');

 
$envelope = 
'<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:nfse="http://nfse.abrasf.org.br">
	<SOAP-ENV:Body>
		<nfse:ConsultarNfseServicoPrestado>
			<nfseCabecMsg>'.$cabecalho.'</nfseCabecMsg>
            <nfseDadosMsg>'.$xml.'</nfseDadosMsg>
		</nfse:ConsultarNfseServicoPrestado>
	</SOAP-ENV:Body>
</SOAP-ENV:Envelope>';
 

$url = 'https://www.issnetonline.com.br/homologaabrasf/webservicenfse204/nfse.asmx';
  
$headers = array(
    "Content-type: text/xml; charset=utf-8",
    "SOAPAction: http://nfse.abrasf.org.br/ConsultarNfseServicoPrestado", 
    "Content-length: ".strlen($envelope),
);


$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 300);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $envelope); 
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

print_r(curl_exec($ch));

curl_close($ch);

XML:

<ConsultarNfseServicoPrestadoEnvio xmlns="http://www.abrasf.org.br/nfse.xsd">
	<Pedido>
		<Prestador>
			<CpfCnpj>
				<Cnpj>*****</Cnpj>
			</CpfCnpj>
			<InscricaoMunicipal>*****</InscricaoMunicipal>
		</Prestador>
		<PeriodoEmissao>
			<DataInicial>2022-10-01</DataInicial>
			<DataFinal>2022-10-20</DataFinal>
		</PeriodoEmissao>
		<Pagina>1</Pagina>
	</Pedido>
	<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
		<SignedInfo>
			<CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
			<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
			<Reference URI="">
				<Transforms>
					<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
				</Transforms>
				<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
				<DigestValue>...</DigestValue>
			</Reference>
		</SignedInfo>
		<SignatureValue>...</SignatureValue>
		<KeyInfo>
			<X509Data>
				<X509Certificate>...</X509Certificate>
			</X509Data>
		</KeyInfo>
	</Signature>
</ConsultarNfseServicoPrestadoEnvio>