Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Melhoria na no tratamento do EnvelopeRetorno #97

Merged
merged 1 commit into from
Jul 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/OpenAC.Net.NFSe/Providers/NFSeSoapServiceClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ protected virtual string Execute(string soapAction, string message, string soapH

Execute(contetType, "POST", headers);

if (!EnvelopeRetorno.IsValidXml())
throw new OpenDFeCommunicationException("Erro ao processar o xml do envelope SOAP => " + EnvelopeRetorno);

var xmlDocument = XDocument.Parse(EnvelopeRetorno);
var body = xmlDocument.ElementAnyNs("Envelope").ElementAnyNs("Body");
var retorno = TratarRetorno(body, responseTag);
Expand All @@ -165,4 +168,4 @@ protected virtual string Execute(string soapAction, string message, string soapH

#endregion Methods
}
}
}