use of eu.europa.ec.fisheries.schema.exchange.module.v1.GetServiceListRequest in project UVMS-ExchangeModule-APP by UnionVMS.
the class ExchangeEventIncomingServiceBean method getPluginListByTypes.
@Override
public void getPluginListByTypes(@Observes @PluginConfigEvent ExchangeMessageEvent message) {
try {
TextMessage jmsMessage = message.getJmsMessage();
GetServiceListRequest request = JAXBMarshaller.unmarshallTextMessage(jmsMessage, GetServiceListRequest.class);
log.info("Get plugin config LIST_SERVICE:{}", request);
List<ServiceResponseType> serviceList = exchangeService.getServiceList(request.getType());
producer.sendModuleResponseMessage(message.getJmsMessage(), ExchangeModuleResponseMapper.mapServiceListResponse(serviceList));
} catch (ExchangeException e) {
log.error("[ Error when getting plugin list from source {}] {}", message, e);
exchangeErrorEvent.fire(new ExchangeMessageEvent(message.getJmsMessage(), ExchangeModuleResponseMapper.createFaultMessage(FaultCode.EXCHANGE_MESSAGE, "Excpetion when getting service list")));
}
}
Aggregations