valdevir 2016-09-29 19:49:31 +00:00
parent 5a42085280
commit 60c232f973
1 changed files with 56 additions and 54 deletions

View File

@ -120,15 +120,15 @@ public class PuntoVentaServiceImpl implements PuntoVentaService {
respEx = new IntegracionException(Atributos.MSG_ERRO_GENERICA + e.getMessage()); respEx = new IntegracionException(Atributos.MSG_ERRO_GENERICA + e.getMessage());
} }
} }
entidad = puntoVentaDAO.suscribir(entidad);
if (respEx != null) { if (respEx != null) {
if (respEx instanceof IntegracionException) { if (respEx instanceof ValidacionCampoException) {
throw (IntegracionException) respEx;
} else if (respEx instanceof ValidacionCampoException) {
throw (ValidacionCampoException) respEx; throw (ValidacionCampoException) respEx;
} else if (respEx instanceof IntegracionException) {
entidad = puntoVentaDAO.suscribir(entidad);
throw (IntegracionException) respEx;
} }
} }
entidad = puntoVentaDAO.suscribir(entidad);
return entidad; return entidad;
} }
@ -492,8 +492,10 @@ public class PuntoVentaServiceImpl implements PuntoVentaService {
* *
* link artigo:http://stackoverflow.com/questions/9710185/how-to-deal-with-invalid-characters-in-a-ws-output-when-using-cxf * link artigo:http://stackoverflow.com/questions/9710185/how-to-deal-with-invalid-characters-in-a-ws-output-when-using-cxf
* *
* @param text The String to clean * @param text
* @param replacement The string to be substituted for each match * The String to clean
* @param replacement
* The string to be substituted for each match
* @return The resulting String * @return The resulting String
*/ */
private String removerCaracteresInvalidosXml(String s) { private String removerCaracteresInvalidosXml(String s) {