Search in sources :

Example 1 with FACatchSummaryReportRequest

use of eu.europa.ec.fisheries.uvms.activity.model.schemas.FACatchSummaryReportRequest in project UVMS-ActivityModule-APP by UnionVMS.

the class ActivityEventServiceBean method getFACatchSummaryReport.

@Override
public void getFACatchSummaryReport(@Observes @GetFACatchSummaryReportEvent EventMessage message) {
    log.info(GOT_JMS_INSIDE_ACTIVITY_TO_GET + "FACatchSummaryReport:");
    try {
        log.debug("JMS Incoming text message: {}", message.getJmsMessage().getText());
        FACatchSummaryReportRequest baseRequest = JAXBMarshaller.unmarshallTextMessage(message.getJmsMessage(), FACatchSummaryReportRequest.class);
        FACatchSummaryReportResponse faCatchSummaryReportResponse = faCatchReportService.getFACatchSummaryReportResponse(FishingActivityRequestMapper.buildFishingActivityQueryFromRequest(baseRequest));
        String response = JAXBMarshaller.marshallJaxBObjectToString(faCatchSummaryReportResponse);
        producer.sendResponseMessageToSender(message.getJmsMessage(), response);
    } catch (ActivityModelMarshallException | JMSException | ServiceException | MessageException e) {
        sendError(message, e);
    }
}
Also used : ActivityModelMarshallException(eu.europa.ec.fisheries.uvms.activity.model.exception.ActivityModelMarshallException) ServiceException(eu.europa.ec.fisheries.uvms.commons.service.exception.ServiceException) MessageException(eu.europa.ec.fisheries.uvms.commons.message.api.MessageException) FACatchSummaryReportRequest(eu.europa.ec.fisheries.uvms.activity.model.schemas.FACatchSummaryReportRequest) JMSException(javax.jms.JMSException) FACatchSummaryReportResponse(eu.europa.ec.fisheries.uvms.activity.model.schemas.FACatchSummaryReportResponse)

Aggregations

ActivityModelMarshallException (eu.europa.ec.fisheries.uvms.activity.model.exception.ActivityModelMarshallException)1 FACatchSummaryReportRequest (eu.europa.ec.fisheries.uvms.activity.model.schemas.FACatchSummaryReportRequest)1 FACatchSummaryReportResponse (eu.europa.ec.fisheries.uvms.activity.model.schemas.FACatchSummaryReportResponse)1 MessageException (eu.europa.ec.fisheries.uvms.commons.message.api.MessageException)1 ServiceException (eu.europa.ec.fisheries.uvms.commons.service.exception.ServiceException)1 JMSException (javax.jms.JMSException)1