I have an NFe and NFCe issue system that we use for several RS clients. A few months ago, the company moved the webservices structure, so they also provided new URLs for access to the service (the old ones continue to run until the end of 2015). I've already downloaded the certificate chain and imported it into our trusted certificate store. I did some tests and had the following problem: Sometimes it works and sometimes it does not! Sometimes I send 5 notes and all are issued with no problem, and nothing starts to give error when connecting to WS. The error that happens (when it happens) is as follows:
INFO (11:19:42,368) - Unable to sendViaPost to url[https://nfce-homologacao.sefazrs.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx]
java.net.SocketException: Connection reset
I thought it might be something in my internet provider, but I tried to put it on some clients and the same problem occurs. Sometimes it is right and sometimes it is this error.
With the old URL everything worked 100%, this was when the old URL served both NFe and NFCe. Now with the new they have separated the services, and the new one from NFe works perfectly, the problem is only in the NFCe.
I talked to the staff of the committee and according to them it is no problem with them. However, they did not know to inform why the connection is sometimes not accepted. I also believe that it is not a problem in my code, since sometimes it works. But then I can not be too sure. Anyone know what could be happening?