use of com.consol.citrus.samples.incident.exception.ServiceException in project citrus-samples by christophd.
the class FieldForceJmsConsumer method onMessage.
@Override
public void onMessage(Message message) {
try {
if (message instanceof TextMessage) {
OrderNotification notification = (OrderNotification) unmarshaller.unmarshal(new StringSource(((TextMessage) message).getText()));
fieldForceService.process(notification);
}
} catch (JMSException e) {
throw new ServiceException("Failed to convert field force notification message", e);
} catch (IOException e) {
throw new ServiceException("Failed to read field force notification message", e);
}
}
Aggregations