Skip to content

Commit

Permalink
Merge branch 'release/4.00.27'
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel-Oliveira committed Nov 26, 2023
2 parents 350d06e + 65701d9 commit 9cf9e5b
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 15 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Notas de versão

- Atualizado Cacert MG
- Atualizado Cacert MT
- Adicionado Conversao para RetDistDFeInt
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Java-NFe [![MIT License](https://img.shields.io/github/license/Samuel-Oliveira/Java_NFe.svg) ](https://github.com/Samuel-Oliveira/Java_NFe/blob/master/LICENSE) [![Maven Central](https://img.shields.io/maven-central/v/br.com.swconsultoria/java-nfe.svg?label=Maven%20Central)](https://search.maven.org/artifact/br.com.swconsultoria/java-nfe/4.00.26/jar)
# Java-NFe [![MIT License](https://img.shields.io/github/license/Samuel-Oliveira/Java_NFe.svg) ](https://github.com/Samuel-Oliveira/Java_NFe/blob/master/LICENSE) [![Maven Central](https://img.shields.io/maven-central/v/br.com.swconsultoria/java-nfe.svg?label=Maven%20Central)](https://search.maven.org/artifact/br.com.swconsultoria/java-nfe/4.00.27/jar)
Biblioteca Java para consumo do WebService de NFe/NFCe

## Dúvidas, Sugestões ou Consultoria
Expand All @@ -17,7 +17,7 @@ Para Iniciar :
<dependency>
<groupId>br.com.swconsultoria</groupId>
<artifactId>java-nfe</artifactId>
<version>4.00.26</version>
<version>4.00.27</version>
</dependency>
```

Expand All @@ -29,7 +29,7 @@ repositories {
}
}
dependencies {
implementation "br.com.swconsultoria:java-nfe:4.00.26"
implementation "br.com.swconsultoria:java-nfe:4.00.27"
}
```

Expand All @@ -39,8 +39,12 @@ ________________________________________________________________________________

# Historico de Versões

## v4.00.26 - 26/11/2023 - Schemas PL.009k
- Atualizado Cacert MT
- Adicionado Conversao para RetDistDFeInt

## v4.00.26 - 21/08/2023 - Schemas PL.009k
- - Atualizado Cacert MG
- Atualizado Cacert MG

## v4.00.25 - 30/07/2023 - Schemas PL.009k
- Corrigido erro Inutilizacão CE
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>br.com.swconsultoria</groupId>
<artifactId>java-nfe</artifactId>
<version>4.00.27-SNAPSHOT</version>
<version>4.00.28-SNAPSHOT</version>
<name>Java_NFe</name>
<description>Api java para consumo do webService de nota fiscal eletronica</description>
<url>https://github.com/Samuel-Oliveira/Java_NFe</url>
Expand Down Expand Up @@ -84,7 +84,7 @@
<dependency>
<groupId>br.com.swconsultoria</groupId>
<artifactId>java_certificado</artifactId>
<version>2.11</version>
<version>2.13</version>
</dependency>
<!-- Ini4J -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public static ConfiguracoesNfe criarConfiguracoes(EstadosEnum estado, AmbienteEn

if (Logger.getLogger("").isLoggable(Level.SEVERE)) {
System.err.println("####################################################################");
System.err.println(" Api Java Nfe - Versão 4.00.26 - 21/08/2023");
System.err.println(" Api Java Nfe - Versão 4.00.27 - 26/11/2023");
if (Logger.getLogger("").isLoggable(Level.WARNING)) {
System.err.println(" Samuel Olivera - [email protected] ");
}
Expand Down
17 changes: 10 additions & 7 deletions src/main/java/br/com/swconsultoria/nfe/util/XmlNfeUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import javax.xml.transform.stream.StreamSource;
import java.io.*;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.security.InvalidParameterException;
Expand All @@ -48,6 +49,8 @@
@Log
public class XmlNfeUtil {

private XmlNfeUtil(){}

private static final String STATUS = "TConsStatServ";
private static final String SITUACAO_NFE = "TConsSitNFe";
private static final String ENVIO_NFE = "TEnviNFe";
Expand All @@ -65,30 +68,25 @@ public class XmlNfeUtil {
private static final String RET_RECIBO_NFE = "TRetConsReciNFe";
private static final String RET_STATUS_SERVICO = "TRetConsStatServ";
private static final String RET_CONS_CAD = "TRetConsCad";

private static final String RET_DIST_DFE = "RetDistDFeInt";
private static final String RET_ENV_EVENTO = "TRetEnvEvento";

private static final String RET_INUT_NFE = "TRetInutNFe";

private static final String TPROCCANCELAR = "br.com.swconsultoria.nfe.schema.envEventoCancNFe.TProcEvento";
private static final String TPROCATORINTERESSADO = "br.com.swconsultoria.nfe.schema.envEventoAtorInteressado.TProcEvento";
private static final String TPROCCANCELARSUBST = "br.com.swconsultoria.nfe.schema.envEventoCancSubst.TProcEvento";
private static final String TPROCCCE = "br.com.swconsultoria.nfe.schema.envcce.TProcEvento";
private static final String TPROCEPEC = "br.com.swconsultoria.nfe.schema.envEpec.TProcEvento";
private static final String TPROCMAN = "br.com.swconsultoria.nfe.schema.envConfRecebto.TProcEvento";

private static final String TProtNFe = "TProtNFe";
private static final String TProtEnvi = "br.com.swconsultoria.nfe.schema_4.enviNFe.TProtNFe";
private static final String TProtCons = "br.com.swconsultoria.nfe.schema_4.retConsSitNFe.TProtNFe";
private static final String TProtReci = "br.com.swconsultoria.nfe.schema_4.retConsReciNFe.TProtNFe";

private static final String CANCELAR = "br.com.swconsultoria.nfe.schema.envEventoCancNFe.TEnvEvento";
private static final String ATOR_INTERESSADO = "br.com.swconsultoria.nfe.schema.envEventoAtorInteressado.TEnvEvento";
private static final String CANCELAR_SUBSTITUICAO = "br.com.swconsultoria.nfe.schema.envEventoCancSubst.TEnvEvento";
private static final String CCE = "br.com.swconsultoria.nfe.schema.envcce.TEnvEvento";
private static final String EPEC = "br.com.swconsultoria.nfe.schema.envEpec.TEnvEvento";
private static final String MANIFESTAR = "br.com.swconsultoria.nfe.schema.envConfRecebto.TEnvEvento";

private static final String RET_CANCELAR = "br.com.swconsultoria.nfe.schema.envEventoCancNFe.TRetEnvEvento";
private static final String RET_ATOR_INTERESSADO = "br.com.swconsultoria.nfe.schema.envEventoAtorInteressado.TRetEnvEvento";
private static final String RET_CANCELAR_SUBSTITUICAO = "br.com.swconsultoria.nfe.schema.envEventoCancSubst.TRetEnvEvento";
Expand Down Expand Up @@ -191,6 +189,11 @@ public static <T> String objectToXml(Object obj, Charset encode) throws JAXBExce
element = new br.com.swconsultoria.nfe.schema.retConsCad.ObjectFactory().createRetConsCad((br.com.swconsultoria.nfe.schema.retConsCad.TRetConsCad) obj);
break;

case RET_DIST_DFE:
context = JAXBContext.newInstance(br.com.swconsultoria.nfe.schema.retdistdfeint.RetDistDFeInt.class);
element = XsdUtil.distDFeInt.createRetDistDFeInt((br.com.swconsultoria.nfe.schema.retdistdfeint.RetDistDFeInt) obj);
break;

case TPROCEVENTO:
switch (obj.getClass().getName()) {
case TPROCCANCELAR:
Expand Down Expand Up @@ -351,7 +354,7 @@ public static String gZipToXml(byte[] conteudo) throws IOException {
}
GZIPInputStream gis;
gis = new GZIPInputStream(new ByteArrayInputStream(conteudo));
BufferedReader bf = new BufferedReader(new InputStreamReader(gis, "UTF-8"));
BufferedReader bf = new BufferedReader(new InputStreamReader(gis, StandardCharsets.UTF_8));
StringBuilder outStr = new StringBuilder();
String line;
while ((line = bf.readLine()) != null) {
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/br/com/swconsultoria/nfe/util/XsdUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public class XsdUtil {
private static final QName _TRetEnvEvento_QNAME = new QName("http://www.portalfiscal.inf.br/nfe", "retEnvEvento");
private static final QName _TRetInutNFe_QNAME = new QName("http://www.portalfiscal.inf.br/nfe", "retInutNFe");
private static final QName _TDistDFeInt_QNAME = new QName("http://www.portalfiscal.inf.br/nfe", "distDFeInt");
private static final QName _TRetDistDFeInt_QNAME = new QName("http://www.portalfiscal.inf.br/nfe", "retDistDFeInt");

public interface enviNfe {
@XmlElementDecl(namespace = "http://www.portalfiscal.inf.br/nfe", name = "TNfeProc", scope = br.com.swconsultoria.nfe.schema_4.enviNFe.TNfeProc.class)
Expand All @@ -43,6 +44,11 @@ public interface distDFeInt {
static JAXBElement<br.com.swconsultoria.nfe.schema.distdfeint.DistDFeInt> createDistDFeInt(br.com.swconsultoria.nfe.schema.distdfeint.DistDFeInt value) {
return new JAXBElement<>(_TDistDFeInt_QNAME, br.com.swconsultoria.nfe.schema.distdfeint.DistDFeInt.class, br.com.swconsultoria.nfe.schema.distdfeint.DistDFeInt.class, value);
}
@XmlElementDecl(namespace = "http://www.portalfiscal.inf.br/nfe", name = "retDistDFeInt", scope = br.com.swconsultoria.nfe.schema.retdistdfeint.RetDistDFeInt.class)
static JAXBElement<br.com.swconsultoria.nfe.schema.retdistdfeint.RetDistDFeInt> createRetDistDFeInt(br.com.swconsultoria.nfe.schema.retdistdfeint.RetDistDFeInt value) {
return new JAXBElement<>(_TRetDistDFeInt_QNAME, br.com.swconsultoria.nfe.schema.retdistdfeint.RetDistDFeInt.class,
br.com.swconsultoria.nfe.schema.retdistdfeint.RetDistDFeInt.class, value);
}
}

public interface retConsReciNfe {
Expand Down

0 comments on commit 9cf9e5b

Please sign in to comment.