0
I’m performing the R2099 Closing Event query, based on the question:
Using the same way @Pedro Gaspar demonstrated:
var urlServicoConsulta = @"https://preprodefdreinf.receita.fazenda.gov.br/ConsultasReinf.svc";
var address = new System.ServiceModel.EndpointAddress(urlServicoConsulta);
var binding = new System.ServiceModel.BasicHttpsBinding(); //Disponível desde .NET Framework 4.5
// ou:
//var binding = new System.ServiceModel.BasicHttpBinding(BasicHttpsSecurityMode.Transport);
binding.Security.Transport.ClientCredentialType = System.ServiceModel.HttpClientCredentialType.Certificate;
// Instancia o cliente para acessar o serviço de consulta do EFD-Reinf.
var wsClient = new WsConsultas.ConsultasReinfClient(binding, address);
wsClient.ClientCredentials.ClientCertificate.Certificate = x509Cert;
// Solicita uma consulta, passando os parâmetros e recebendo o evento R-5011 como retorno.
System.Xml.Linq.XElement retornoTotalContrib = wsClient.ConsultaInformacoesConsolidadas(1, "10220048", "4308-2099-1701-4308");
wsClient.Close();
On my call:
System.Xml.Linq.XElement retornoTotalContrib = wsClient.ConsultaInformacoesConsolidadas(1, "01628604", "15598-2099-1812-15598");
Is returning the following error:
Message=There was no endpoint listening at https://preprodefdreinf.receita.fazenda.gov.br/ConsultasReinf.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
The Reference service I added is pointing to this url: https://preprodefdreinf.receita.fazenda.gov.br/WsREINF/ConsultasReinf.svc?singleWsdl
Any idea what might be going on?
It’s probably the header
SOAPAction
, see if you are reporting the correct:http://sped.fazenda.gov.br/ConsultasReinf/ConsultaInformacoesConsolidadas
.– Homer Simpson
In the error is the url:
https://preprodefdreinf.receita.fazenda.gov.br/ConsultasReinf.svc
, the service Ference you said is pointing is:https://preprodefdreinf.receita.fazenda.gov.br/WsREINF/ConsultasReinf.svc?singleWsdl
. Which url should you use after all? There is a distortion of information (WsREINF
) at the url...– Pedro Paulo