use of eu.europa.ec.fisheries.uvms.activity.model.schemas.FishingTripRequest in project UVMS-ActivityModule-APP by UnionVMS.
the class ActivityEventServiceBean method getFishingTripList.
@Override
public void getFishingTripList(@Observes @GetFishingTripListEvent EventMessage message) {
log.info(GOT_JMS_INSIDE_ACTIVITY_TO_GET + "FishingTripIds:");
try {
log.debug("JMS Incoming text message: {}", message.getJmsMessage().getText());
FishingTripRequest baseRequest = JAXBMarshaller.unmarshallTextMessage(message.getJmsMessage(), FishingTripRequest.class);
log.debug("FishingTriId Request Unmarshalled");
FishingTripResponse baseResponse = fishingTripService.filterFishingTripsForReporting(FishingActivityRequestMapper.buildFishingActivityQueryFromRequest(baseRequest));
log.debug("FishingTripResponse ::: " + FACatchSummaryHelper.printJsonstructure(baseResponse));
String response = JAXBMarshaller.marshallJaxBObjectToString(baseResponse);
log.debug("FishingTriId response marshalled");
producer.sendResponseMessageToSender(message.getJmsMessage(), response);
log.debug("Response sent back.");
} catch (ActivityModelMarshallException | JMSException | ServiceException | MessageException e) {
sendError(message, e);
}
}
Aggregations