WebService Integration SEFAZ CSharp - Genexus

0

We are using the Genexus Evo 3 U3, SQL 2008 Server R2 and CSharp version.

I'm having trouble communicating with SEFAZ's webservice.

I have already added the certificate to the program using the syntax below:

csharp [!&HttpClient!].AddCertificate([!&CertificadoPath!],[!&password!]);

But even with the full certificate added, when executing the routine the following message is displayed:

  

"The underlying connection was closed: Could not establish   trust relationship for the SSL / TLS secure channel. "

As I researched this message appears when there are no root certificates installed, but they are. I came to the conclusion that it is necessary to add the root certificates manually in the webservice procedure.

Has anyone done this integration? How to make the routine work and transmit the NFe?

    
asked by anonymous 20.07.2017 / 20:48

1 answer

0

Hello, First of all, try to access the WSDL from Sefaz's Web Service in the browser to see if everything is ok. When you access WSDL it asks for the certificate that is installed on the machine. So, in this way you will know if your certificate is actually installed / configured correctly, before you go looking for errors in the code.

    
27.07.2017 / 22:48