Skip to content

Commit

Permalink
Merge pull request #204 from Transis-Felipe/patch-3
Browse files Browse the repository at this point in the history
Update SimplISSv2ServiceClient.cs
  • Loading branch information
rftd authored Mar 24, 2023
2 parents d65304d + 4943c73 commit 9101e89
Showing 1 changed file with 8 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ***********************************************************************
// ***********************************************************************
// Assembly : OpenAC.Net.NFSe
// Author : Felipe Silveira/Transis
// Created : 16-03-2023
Expand Down Expand Up @@ -31,6 +31,7 @@

using System;
using System.Linq;
using System.ServiceModel.Channels;
using System.Text;
using System.Xml;
using System.Xml.Linq;
Expand All @@ -44,7 +45,7 @@ internal sealed class SimplISSv2ServiceClient : NFSeSoapServiceClient, IServiceC
{
#region Fields

private XNamespace tc = "http://www.abrasf.org.br/nfse.xsd";
private XNamespace tc = "http://www.sistema.com.br/Nfse/arquivos/nfse_3.xsd";

#endregion Fields

Expand Down Expand Up @@ -104,24 +105,15 @@ public string ConsultarNFSeRps(string cabec, string msg)
public string ConsultarNFSe(string cabec, string msg)
{
var message = new StringBuilder();
message.Append("<sis:ConsultarNfse>");
message.Append(AjustarMensagem(msg));
message.Append("</sis:ConsultarNfse>");
message.Append("<sis:ConsultarNfseRps>");
message.Append(msg);
message.Append("</sis:ConsultarNfseRps>");

return Execute("http://www.sistema.com.br/Sistema.Ws.Nfse/INfseService/ConsultarNfse",
message.ToString(), "ConsultarNfseResult");
}

public string CancelarNFSe(string cabec, string msg)
{
var message = new StringBuilder();
message.Append("<sis:CancelarNfse>");
message.Append(AjustarMensagem(msg));
message.Append("</sis:CancelarNfse>");

return Execute("http://www.sistema.com.br/Sistema.Ws.Nfse/INfseService/CancelarNfse",
message.ToString(), "CancelarNfseResult");
}
public string CancelarNFSe(string cabec, string msg) => throw new NotImplementedException("Função não implementada/suportada neste Provedor !");

public string EnviarSincrono(string cabec, string msg) => throw new NotImplementedException("Função não implementada/suportada neste Provedor !");

Expand All @@ -134,8 +126,7 @@ public string CancelarNFSe(string cabec, string msg)
private string Execute(string soapAction, string message, string responseTag)
{
return Execute(soapAction, message, "", responseTag, "xmlns:sis=\"http://www.sistema.com.br/Sistema.Ws.Nfse\"",
"xmlns:nfse=\"http://www.abrasf.org.br/nfse.xsd\"",
"xmlns:xd=\"http://www.w3.org/2000/09/xmldsig#\"");
"xmlns:sis1=\"http://www.sistema.com.br/Sistema.Ws.Nfse.Cn\"");
}

public string AjustarMensagem(string msg, params string[] tags)
Expand Down

0 comments on commit 9101e89

Please sign in to comment.