Examples of MessageProcessingException


Examples of ca.uhn.hl7v2.hoh.api.MessageProcessingException

      Transportable received = new TransportableImpl(theMessage.getMessage(), new HashMap<String, Object>(theMessage.getMetadata()));
      Transportable response;
      try {
        response = myApplicationRouter.processMessage(received);
      } catch (HL7Exception e) {
        throw new MessageProcessingException(e);
      }

      return new RawSendable(response.getMessage());
    }
View Full Code Here

Examples of com.google.gwt.i18n.server.MessageProcessingException

  public KeyGenMessage(JMethod method) {
    this.method = method;
  }

  public void accept(MessageVisitor v) throws MessageProcessingException {
    throw new MessageProcessingException("unsupported");
  }
View Full Code Here

Examples of com.google.gwt.i18n.server.MessageProcessingException

    throw new MessageProcessingException("unsupported");
  }

  public void accept(MessageVisitor v, GwtLocale locale)
      throws MessageProcessingException {
    throw new MessageProcessingException("unsupported");
  }
View Full Code Here

Examples of es.emergya.comunications.exceptions.MessageProcessingException

    // Divide el datagram
    String[] campos = StringUtils.splitPreserveAllTokens(entrada
        .getDatagramaTetra(), LogicConstants.FIELD_SEPARATOR);

    if (entrada.getOrigen() == null)
      throw new MessageProcessingException("No sabemos el origen",
          entrada);
    if (entrada.getDatagramaTetra() == null)
      throw new MessageProcessingException(
          "El mensaje no tenia contenido", entrada);

    /*
     * Server format: Datagram structure: ID_MESSAGE (0) | ID_MESSAGE_TYPE
     * (1) | MESSAGE BODY (2 .. n)
View Full Code Here

Examples of es.emergya.comunications.exceptions.MessageProcessingException

            historicoGPS.setMarcaTemporal(entrada.getMarcaTemporal());

            final Recurso recurso = RecursoConsultas.getbyDispositivo(entrada.getOrigen());
            if (recurso == null) {
                throw new MessageProcessingException("No encuentro el recurso "
                        + entrada.getOrigen());
            }

            if (recurso.getHabilitado()) {
                historicoGPS.setTipoRecurso(recurso.getTipo());
                if (recurso.getFlotas() == null) {
                    throw new MessageProcessingException("El recurso "
                            + recurso + " no tiene asignada ninguna flota.");
                }
                historicoGPS.setSubflota(recurso.getFlotas().getNombre());
                historicoGPS.setRecurso(recurso.getIdentificador());

                Double y = new Double(campos[2].substring(0, campos[2].indexOf(',')));
                Double x = new Double(campos[3].substring(0, campos[3].indexOf(',')));

                // Las posiciones 0.0 se descartan.
                // Deshabilitado por instrucciones de MCGarcia.
//                if (x.equals(0.0d) || y.equals(0.0d)) {
//                    if (log.isTraceEnabled()) {
//                        log.trace("Posicón 0.0N,0.0W recibida de " + recurso.getDispositivo() + "recibida y descartada.");
//                    }
//                    return;
//                }

                if (campos[2].endsWith("S")) {
                    y = -y;
                }
                if (campos[3].endsWith("W")) {
                    x = -x;
                }

                final GeometryFactory factory = new GeometryFactory();
                final com.vividsolutions.jts.geom.Geometry geom = factory.createPoint(new Coordinate(x, y));
                geom.setSRID(4326);
                //
                // final String sourceSRID = "EPSG:4326";
                // final String targetSRID = "EPSG:3395";
                //
                // Geometry geom = transform(geom, sourceSRID, targetSRID);

                historicoGPS.setGeom(geom);
                historicoGPS.setPosX(geom.getCentroid().getX());
                historicoGPS.setPosY(geom.getCentroid().getY());

                HistoricoGPSAdmin.saveOrUpdate(historicoGPS);
                recurso.setHistoricoGps(historicoGPS);
                RecursoAdmin.saveOrUpdate(recurso);
                if (log.isDebugEnabled()) {
                    log.debug("Guardada posicion" + historicoGPS);
                }
            } else {
                log.error("Hay un recurso deshabilitado enviando posiciones: "
                        + recurso);
            }
        } catch (Throwable t) {
            log.error(t, t);
            throw new MessageProcessingException(
                    "Error al procesar un mensaje de posicion" + t, entrada);
        } finally {
            if (log.isDebugEnabled()) {
                log.debug("Finalizado procesamiento de " + entrada);
            }
View Full Code Here

Examples of es.emergya.comunications.exceptions.MessageProcessingException

         */
        String confirmacion = LogicConstants.get("SDS_NO",
                "Error al asignar el recurso.");
        TipoMensaje tmensaje = null;
        Recurso recurso = null;
        MessageProcessingException exception = null;
        try {
            tmensaje = TipoMensajeConsultas.getTipoByCode(SDS_CODE);
            recurso = RecursoConsultas.getbyDispositivo(entrada.getOrigen());
            if (recurso == null) {
                throw new MessageProcessingException("No encuentro el recurso "
                        + entrada.getOrigen());
            }

            if (!recurso.getHabilitado()) {
                throw new MessageProcessingException(
                        "El recurso está deshabilitado ('"
                        + recurso.getDispositivo() + "')");
            }
            recurso.setMalAsignado(true);

            Patrulla p = PatrullaConsultas.find(campos[2]);
            if (p == null) {
                throw new MessageProcessingException(
                        "No encuentro la patrulla " + campos[2]);
            }

            recurso.setPatrullas(p);
            recurso.setMalAsignado(false);
            confirmacion = LogicConstants.get("SDS_SI", "Recurso asignado.");

        } catch (Throwable t) {
            log.error(t, t);
            exception = new MessageProcessingException(
                    "Error al procesar un mensaje de asignacion de patrulla: "
                    + t, entrada);
        } finally {
            try {
                if (recurso != null) {
                    RecursoAdmin.saveOrUpdate(recurso);
                }
                MessageGenerator.sendMessage(tmensaje.getCodigo(), tmensaje.getTipoTetra(), tmensaje.getPrioridad(), confirmacion,
                        entrada.getOrigen());
            } catch (MessageGeneratingException e) {
                log.error(e, e);
                throw new MessageProcessingException(
                        "Error al enviar el mensaje " + e, entrada);
            } finally {
                if (exception != null) {
                    throw exception;
                }
View Full Code Here

Examples of es.emergya.comunications.exceptions.MessageProcessingException

            BandejaEntradaConsultas.processPosiconActual(entrada, geom);

        } catch (Throwable t) {
            log.error(t, t);
            throw new MessageProcessingException(
                    "Error al procesar un mensaje de posicion" + t, entrada);
        } finally {
            log.debug("Finalizado procesamiento de " + entrada);
            System.out.println("TIEMPO " + entrada.getOrigen() + ": "
                    + (System.currentTimeMillis() - time) + " ms");
View Full Code Here

Examples of es.emergya.comunications.exceptions.MessageProcessingException

    historicoGPS.setMarcaTemporal(entrada.getMarcaTemporal());

    RecursoBean recurso = RecursoConsultas.findByDispositivoSQL(entrada
        .getOrigen());
    if (recurso == null) {
      throw new MessageProcessingException("No encuentro el recurso "
          + entrada.getOrigen());
    }

    if (recurso.getHabilitado()) {
      historicoGPS.setTipoRecurso(recurso.getTipoRecurso());
      if (recurso.getSubflota() == null) {
        throw new MessageProcessingException("El recurso " + recurso
            + " no tiene asignada ninguna flota.");
      }
      historicoGPS.setSubflota(recurso.getSubflota());
      historicoGPS.setRecurso(recurso.getIdentificador());
View Full Code Here

Examples of javax.ws.rs.MessageProcessingException

                        entity = null;
                    }
                   
                    return castLastEntity();
                } catch (Exception ex) {
                    throw new MessageProcessingException(ex);
                }
            } else {
                throw new MessageProcessingException("No message body reader for class: " + cls);
            }
        } else if (entity != null && cls.isAssignableFrom(entity.getClass())) {
            lastEntity = entity;
            return castLastEntity();
        }
View Full Code Here

Examples of javax.ws.rs.MessageProcessingException

                InputStream oldEntity = (InputStream)entity;
                entity = IOUtils.loadIntoBAIS(oldEntity);
                oldEntity.close();
                entityBufferred = true;
            } catch (IOException ex) {
                throw new MessageProcessingException(ex);
            }
        }
        return entityBufferred;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.