Skip to content

Commit

Permalink
FIX fatture recupera file xml
Browse files Browse the repository at this point in the history
  • Loading branch information
mspasiano committed Apr 5, 2019
1 parent c8dbbc5 commit f99e39a
Showing 1 changed file with 13 additions and 1 deletion.
Expand Up @@ -7,6 +7,7 @@
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.rmi.RemoteException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
Expand Down Expand Up @@ -41,6 +42,7 @@
import javax.xml.transform.stream.StreamSource;
import javax.xml.ws.soap.SOAPFaultException;

import it.cnr.jada.comp.CRUDDuplicateKeyException;
import it.gov.fatturapa.EsitoRicezioneType;
import it.gov.fatturapa.FileSdIConMetadatiType;
import it.gov.fatturapa.FileSdIType;
Expand Down Expand Up @@ -876,8 +878,18 @@ private void elaboraFattura(FatturaElettronicaType fatturaElettronicaType, BigIn
try {
docTrasmissione = (DocumentoEleTrasmissioneBulk) component.creaDocumento(userContext, docTrasmissione);
component.completaDocumento(userContext, docTrasmissione);
} catch (CRUDDuplicateKeyException _ex) {
LOGGER.warn("WS della ricezione delle fatture fattura gia presente !Identificativo: {}", identificativoSdI);
try {
DocumentoEleTrasmissioneBulk doc = (DocumentoEleTrasmissioneBulk) component.findByPrimaryKey(userContext, docTrasmissione);
doc.setToBeUpdated();
doc.setCmisNodeRef(storeService.getStorageObjectByPath(path).getKey());
component.modificaConBulk(userContext, doc);
} catch (ComponentException|RemoteException e) {
LOGGER.error("Errore nel WS della ricezione delle fatture!Identificativo:{}",identificativoSdI, e);
}
} catch (Exception e) {
LOGGER.error("Errore nel WS della ricezione delle fatture!Identificativo:" + identificativoSdI, e);
LOGGER.error("Errore nel WS della ricezione delle fatture!Identificativo:{}",identificativoSdI, e);
java.io.StringWriter sw = new java.io.StringWriter();
e.printStackTrace(new java.io.PrintWriter(sw));
SendMail.sendErrorMail("Errore nel WS della ricezione delle fatture!Identificativo:" + identificativoSdI, sw.toString());
Expand Down

0 comments on commit f99e39a

Please sign in to comment.