Nfs-e Belo Horizonte XML signature error

Asked

Viewed 2,184 times

5

I am developing the integration of a system to issue Nfse to Belo Horizonte are happening 2 situations that only with this city that I developed are happening, we have integrated several municipalities and this is the one that is giving more work. (At least so far)

1) By the ABRASF manual the RPS Signature tag is not required, at least it is what I understood in the manual where it indicates:

Tcrps| Signature| Type | dsig:Signature | Occurrence 0-1.

page 27 of the HB Integration Manual - Manual link of OB , if I do not sign the RPS, the following message is returned by the BH test web service:

<Codigo>E176</Codigo>

<Mensagem>Rps sem assinatura.</Mensagem>

If I sign the RPS and try to issue it, it heads back to me "XML with signature error", but I don’t understand why, the same way I signed the Lot, I’m signing the RPS, and the same way we signed the other prefectures we have approved. The XML file is the same as what is available in the portal of the city of BH.

Return from when to tag Infrps is signed:

<Codigo>E174</Codigo>
<Mensagem>Arquivo enviado com erro na assinatura.</Mensagem>

2) The other situation that is happening is, I have two Rpss in the queue, I send an ok returns me some of these errors or if the RPS was converted into Nfse, when I will do the second sending of the other RPS, happens an Exception: Could not create SSL/TLS Secure Channel, but the strange thing is that if I stop debugging and restart after a while, I can make the call to Ws again.

  • I’m facing the same problem. You managed to solve?

1 answer

6


I will take this opportunity to leave the solution found to the problem and already responding to Oeslei.

Problem in XML signature fixed by placing attribute "xmlns" with the value "http://www.abrasf.org.br/nfse.xsd" in the tags Loterps, Rps and Infrps.

The second problem of the error message "Could not create SSL/TLS Secure Channel" that occurred when I tried to perform more than one request for the webservice. I decided to change the way the system communicated with the webservice, initially we added the address of the webservice through Webreference and used this class to communicate with the webservice. Now carrying out the communication through the Httpwebrequest class the problem has not been repeated, and I can make several requests for the BH webservice, the strange thing is that for other webservices of other prefectures we do not need to use Httpwebrequest.

I hope it helped.

  • I am facing the same problem, but still can not solve. I wonder if it is necessary to add some namespace in the tag SignedInfo to generate the key to SignatureValue. I’m 2 weeks trying to sign an RPS and nothing.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.