Error in the XML signature of NFs-e Belo Horizonte

5

I am developing the integration of a system to issue Nfse to Belo Horizonte are happening 2 situations that only with this prefecture that I have developed are happening, already we have integrated several prefectures and this is the one that is giving more work. now)

1) By the ABRASF manual the RPS Signature tag is not mandatory, at least that's what I understood in the manual where it says:

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

page 27 of the BH integration manual - BH manual link , 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 subscribe to RPS and try to issue it, it says "XML with signature error", but I do not understand why, in the same way that I signed the Batch, I am signing the RPS, the other prefectures we have approved. The XML file is the same as the one available on the BH prefecture's website.

Return of when 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 return one of these errors or if the RPS was converted to Nfse, when I make the second sending of the other RPS,

    
asked by anonymous 07.11.2014 / 18:05

1 answer

4

I will take the solution to the problem and answer Oeslei.

The XML signature problem has been solved by placing the attribute "xmlns" with the value " link " in the tags LoteRps, Rps and InfRps.

The second problem of the "Could not create SSL / TLS secure channel" error message occurred when I tried to make more than one request to the webservice. I resolved by changing the way the system communicated with the webservice, initially adding the webservice address through WebReference and using that class to communicate with the webservice. Now doing the communication through the HttpWebRequest class, the problem has not been repeated, and I can perform several requests for the BH webservice, the strange thing is that other webservices from other prefectures do not need to use HttpWebRequest.

I hope you have helped.

    
25.02.2015 / 19:01