Skip to content

Commit d0ff869

Browse files
Merge branch 'release/4.00.25'
2 parents bf6bec7 + 189bc48 commit d0ff869

File tree

8 files changed

+1374
-24
lines changed

8 files changed

+1374
-24
lines changed

CHANGELOG.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
# Notas de versão
22

3-
- Atualizado Java Certificado (Ver https://github.com/Samuel-Oliveira/Java_Certificado)
4-
- Atualizado Cacert (Sefaz Minas)
5-
- Adicionado ZoneId direto a configuracao e removido da Chamada dos metodos. O padrao de ZoneId é America/Sao_Paulo
3+
- Corrigido erro Inutilizacão CE

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 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.24/jar)
1+
# 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.25/jar)
22
Biblioteca Java para consumo do WebService de NFe/NFCe
33

44
## Dúvidas, Sugestões ou Consultoria
@@ -17,7 +17,7 @@ Para Iniciar :
1717
<dependency>
1818
<groupId>br.com.swconsultoria</groupId>
1919
<artifactId>java-nfe</artifactId>
20-
<version>4.00.24</version>
20+
<version>4.00.25</version>
2121
</dependency>
2222
```
2323

@@ -29,7 +29,7 @@ repositories {
2929
}
3030
}
3131
dependencies {
32-
implementation "br.com.swconsultoria:java-nfe:4.00.24"
32+
implementation "br.com.swconsultoria:java-nfe:4.00.25"
3333
}
3434
```
3535

@@ -39,6 +39,9 @@ ________________________________________________________________________________
3939

4040
# Historico de Versões
4141

42+
## v4.00.25 - 30/07/2023 - Schemas PL.009k
43+
- Corrigido erro Inutilizacão CE
44+
4245
## v4.00.24 - 05/05/2023 - Schemas PL.009k
4346
- Atualizado Java Certificado (Ver https://github.com/Samuel-Oliveira/Java_Certificado)
4447
- Atualizado Cacert (Sefaz Minas)

docs/docs/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Build Status](https://travis-ci.org/Samuel-Oliveira/Java_NFe.svg?branch=master)](https://travis-ci.org/Samuel-Oliveira/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.24/jar) [![Language grade: Java](https://img.shields.io/lgtm/grade/java/g/Samuel-Oliveira/Java_NFe.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Samuel-Oliveira/Java_NFe/context:java) [![Total alerts](https://img.shields.io/lgtm/alerts/g/Samuel-Oliveira/Java_NFe.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Samuel-Oliveira/Java_NFe/alerts/)
1+
[![Build Status](https://travis-ci.org/Samuel-Oliveira/Java_NFe.svg?branch=master)](https://travis-ci.org/Samuel-Oliveira/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.25/jar) [![Language grade: Java](https://img.shields.io/lgtm/grade/java/g/Samuel-Oliveira/Java_NFe.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Samuel-Oliveira/Java_NFe/context:java) [![Total alerts](https://img.shields.io/lgtm/alerts/g/Samuel-Oliveira/Java_NFe.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Samuel-Oliveira/Java_NFe/alerts/)
22

33
***Biblioteca Java para consumo do WebService de NFe/NFCe***
44

@@ -11,7 +11,7 @@
1111
</p>
1212

1313
Para Iniciar :
14-
- Caso use Libs baixe o [java-nfe-4.00.24.jar](https://github.com/Samuel-Oliveira/Java_NFe/raw/master/java-nfe-4.00.24.jar) e o adicione às bibliotecas de Seu Projeto.
14+
- Caso use Libs baixe o [java-nfe-4.00.25.jar](https://github.com/Samuel-Oliveira/Java_NFe/raw/master/java-nfe-4.00.25.jar) e o adicione às bibliotecas de Seu Projeto.
1515

1616
- Baixe o [Schemas.rar](https://github.com/Samuel-Oliveira/Java_NFe/raw/master/schemas.zip) e extraia na sua Máquina.
1717

@@ -20,7 +20,7 @@ Para Iniciar :
2020
<dependency>
2121
<groupId>br.com.swconsultoria</groupId>
2222
<artifactId>java-nfe</artifactId>
23-
<version>4.00.24</version>
23+
<version>4.00.25</version>
2424
</dependency>
2525
```
2626

@@ -32,7 +32,7 @@ repositories {
3232
}
3333
}
3434
dependencies {
35-
implementation "br.com.swconsultoria:java-nfe:4.00.24"
35+
implementation "br.com.swconsultoria:java-nfe:4.00.25"
3636
}
3737
```
3838

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<modelVersion>4.0.0</modelVersion>
33
<groupId>br.com.swconsultoria</groupId>
44
<artifactId>java-nfe</artifactId>
5-
<version>4.00.24-SNAPSHOT</version>
5+
<version>4.00.26-SNAPSHOT</version>
66
<name>Java_NFe</name>
77
<description>Api java para consumo do webService de nota fiscal eletronica</description>
88
<url>https://github.com/Samuel-Oliveira/Java_NFe</url>

src/main/java/br/com/swconsultoria/nfe/Inutilizar.java

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import br.com.swconsultoria.nfe.dom.ConfiguracoesNfe;
44
import br.com.swconsultoria.nfe.dom.enuns.AssinaturaEnum;
55
import br.com.swconsultoria.nfe.dom.enuns.DocumentoEnum;
6+
import br.com.swconsultoria.nfe.dom.enuns.EstadosEnum;
67
import br.com.swconsultoria.nfe.dom.enuns.ServicosEnum;
78
import br.com.swconsultoria.nfe.exception.NfeException;
89
import br.com.swconsultoria.nfe.schema_4.inutNFe.TInutNFe;
@@ -45,21 +46,39 @@ static TRetInutNFe inutiliza(ConfiguracoesNfe config, TInutNFe inutNFe, Document
4546

4647
OMElement ome = AXIOMUtil.stringToOM(xml);
4748

48-
NFeInutilizacao4Stub.NfeDadosMsg dadosMsg = new NFeInutilizacao4Stub.NfeDadosMsg();
49-
dadosMsg.setExtraElement(ome);
49+
if (EstadosEnum.CE.equals(config.getEstado()) ) {
50+
br.com.swconsultoria.nfe.wsdl.NFeInutilizacao.ce.NFeInutilizacao4Stub.NfeDadosMsg dadosMsgCe =
51+
new br.com.swconsultoria.nfe.wsdl.NFeInutilizacao.ce.NFeInutilizacao4Stub.NfeDadosMsg();
52+
dadosMsgCe.setExtraElement(ome);
53+
br.com.swconsultoria.nfe.wsdl.NFeInutilizacao.ce.NFeInutilizacao4Stub stubCe = new br.com.swconsultoria.nfe.wsdl.NFeInutilizacao.ce.NFeInutilizacao4Stub(
54+
WebServiceUtil.getUrl(config, tipoDocumento, ServicosEnum.INUTILIZACAO));
5055

51-
NFeInutilizacao4Stub stub = new NFeInutilizacao4Stub(
52-
WebServiceUtil.getUrl(config, tipoDocumento, ServicosEnum.INUTILIZACAO));
56+
// Timeout
57+
if (ObjetoUtil.verifica(config.getTimeout()).isPresent()) {
58+
stubCe._getServiceClient().getOptions().setProperty(HTTPConstants.SO_TIMEOUT, config.getTimeout());
59+
stubCe._getServiceClient().getOptions().setProperty(HTTPConstants.CONNECTION_TIMEOUT, config.getTimeout());
60+
}
61+
br.com.swconsultoria.nfe.wsdl.NFeInutilizacao.ce.NFeInutilizacao4Stub.NfeResultMsg resultCe = stubCe.nfeInutilizacaoNF(dadosMsgCe);
5362

54-
// Timeout
55-
if (ObjetoUtil.verifica(config.getTimeout()).isPresent()) {
56-
stub._getServiceClient().getOptions().setProperty(HTTPConstants.SO_TIMEOUT, config.getTimeout());
57-
stub._getServiceClient().getOptions().setProperty(HTTPConstants.CONNECTION_TIMEOUT, config.getTimeout());
63+
log.info("[XML-RETORNO]: " + resultCe.getExtraElement().toString());
64+
return XmlNfeUtil.xmlToObject(resultCe.getExtraElement().toString(), TRetInutNFe.class);
65+
} else{
66+
NFeInutilizacao4Stub.NfeDadosMsg dadosMsg = new NFeInutilizacao4Stub.NfeDadosMsg();
67+
dadosMsg.setExtraElement(ome);
68+
NFeInutilizacao4Stub stub = new NFeInutilizacao4Stub(
69+
WebServiceUtil.getUrl(config, tipoDocumento, ServicosEnum.INUTILIZACAO));
70+
71+
// Timeout
72+
if (ObjetoUtil.verifica(config.getTimeout()).isPresent()) {
73+
stub._getServiceClient().getOptions().setProperty(HTTPConstants.SO_TIMEOUT, config.getTimeout());
74+
stub._getServiceClient().getOptions().setProperty(HTTPConstants.CONNECTION_TIMEOUT, config.getTimeout());
75+
}
76+
NFeInutilizacao4Stub.NfeResultMsg result = stub.nfeInutilizacaoNF(dadosMsg);
77+
78+
log.info("[XML-RETORNO]: " + result.getExtraElement().toString());
79+
return XmlNfeUtil.xmlToObject(result.getExtraElement().toString(), TRetInutNFe.class);
5880
}
59-
NFeInutilizacao4Stub.NfeResultMsg result = stub.nfeInutilizacaoNF(dadosMsg);
6081

61-
log.info("[XML-RETORNO]: " + result.getExtraElement().toString());
62-
return XmlNfeUtil.xmlToObject(result.getExtraElement().toString(), TRetInutNFe.class);
6382
} catch (RemoteException | XMLStreamException | JAXBException e) {
6483
throw new NfeException(e.getMessage(),e);
6584
}

src/main/java/br/com/swconsultoria/nfe/dom/ConfiguracoesNfe.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public static ConfiguracoesNfe criarConfiguracoes(EstadosEnum estado, AmbienteEn
109109

110110
if (Logger.getLogger("").isLoggable(Level.SEVERE)) {
111111
System.err.println("####################################################################");
112-
System.err.println(" Api Java Nfe - Versão 4.00.24 - 06/05/2023");
112+
System.err.println(" Api Java Nfe - Versão 4.00.25 - 30/07/2023");
113113
if (Logger.getLogger("").isLoggable(Level.WARNING)) {
114114
System.err.println(" Samuel Olivera - [email protected] ");
115115
}
@@ -199,7 +199,7 @@ public boolean isContigenciaSVC() {
199199
}
200200

201201
/**
202-
* Atribui um valor para contigenciaSCAN. Caso True, as operações da NF-e
202+
* Atribui um valor para contigenciaSVC. Caso True, as operações da NF-e
203203
* funcionarão no modo de Contingência. <br>
204204
* Usar para situações em que não for possível estabelecer conexão com o
205205
* WebService SEFAZ Origem.
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
/**
2+
* NFeInutilizacao4CallbackHandler.java
3+
*
4+
* This file was auto-generated from WSDL
5+
* by the Apache Axis2 version: 1.7.5 Built on : May 06, 2017 (03:45:26 BST)
6+
*/
7+
package br.com.swconsultoria.nfe.wsdl.NFeInutilizacao.ce;
8+
9+
10+
/**
11+
* NFeInutilizacao4CallbackHandler Callback class, Users can extend this class and implement
12+
* their own receiveResult and receiveError methods.
13+
*/
14+
public abstract class NFeInutilizacao4CallbackHandler {
15+
protected Object clientData;
16+
17+
/**
18+
* User can pass in any object that needs to be accessed once the NonBlocking
19+
* Web service call is finished and appropriate method of this CallBack is called.
20+
* @param clientData Object mechanism by which the user can pass in user data
21+
* that will be avilable at the time this callback is called.
22+
*/
23+
public NFeInutilizacao4CallbackHandler(Object clientData) {
24+
this.clientData = clientData;
25+
}
26+
27+
/**
28+
* Please use this constructor if you don't want to set any clientData
29+
*/
30+
public NFeInutilizacao4CallbackHandler() {
31+
this.clientData = null;
32+
}
33+
34+
/**
35+
* Get the client data
36+
*/
37+
public Object getClientData() {
38+
return clientData;
39+
}
40+
41+
/**
42+
* auto generated Axis2 call back method for nfeInutilizacaoNF method
43+
* override this method for handling normal response from nfeInutilizacaoNF operation
44+
*/
45+
public void receiveResultnfeInutilizacaoNF(
46+
br.com.swconsultoria.nfe.wsdl.NFeInutilizacao.ce.NFeInutilizacao4Stub.NfeResultMsg result) {
47+
}
48+
49+
/**
50+
* auto generated Axis2 Error handler
51+
* override this method for handling error response from nfeInutilizacaoNF operation
52+
*/
53+
public void receiveErrornfeInutilizacaoNF(java.lang.Exception e) {
54+
}
55+
}

0 commit comments

Comments
 (0)