diff --git a/src/com/rjconsultores/ventaboletos/service/impl/PuntoVentaServiceImpl.java b/src/com/rjconsultores/ventaboletos/service/impl/PuntoVentaServiceImpl.java index e7d543118..ad6943c21 100644 --- a/src/com/rjconsultores/ventaboletos/service/impl/PuntoVentaServiceImpl.java +++ b/src/com/rjconsultores/ventaboletos/service/impl/PuntoVentaServiceImpl.java @@ -206,21 +206,31 @@ public class PuntoVentaServiceImpl implements PuntoVentaService { String entid = ""; String fator = ""; + Exception respEx = null; + try { + log.info(" ------------- INICIO INTEGRACION FORNECEDOR TOTVS ------------- "); + TotvsService.cadastrarFornecedor(endpointFornecedor, nomeEmpresa, nomeFilial, bairro, cep, cgc, cnae, codmun, codpais, complemen, conta, ddd, email, endereco, est, inscr, inscrm, naturez, nome, nreduz, simpnac, tel, tipo, tpessoa); } catch (Exception e) { log.error("", e); - throw new IntegracionException("integracion.totvs"); + respEx = e; } try { + log.info(" ------------- INICIO INTEGRACION CLIENTE TOTVS ------------- "); + TotvsService.cadastrarCliente(endpointCliente, bairro, cep, cgc, codmun, codpais, complemen, conta, contrib, ddd, email, nomeEmpresa, endereco, entid, fator, fax, inscr, inscrm, naturez, nome, nreduz, obs, pais, tpessoa, tel, tipo, est); } catch (Exception e) { log.error("", e); + respEx = e; + } + + if (respEx != null) { throw new IntegracionException("integracion.totvs"); }