public DSBServiceServerImpl(ComponentContext componentContext) { this.componentContext = componentContext; try { this.channel = this.componentContext.getDeliveryChannel(); } catch (MessagingException e) { e.printStackTrace(); } try { this.logger = this.componentContext.getLogger("", null); } catch (MissingResourceException e) { e.printStackTrace(); } catch (JBIException e) { e.printStackTrace(); } }
public JBIClient(ComponentContext componentContext) { this.componentContext = componentContext; // TODO : initialize somewhere else try { this.messageExchangeFactory = this.componentContext.getDeliveryChannel() .createExchangeFactory(); } catch (MessagingException e) { e.printStackTrace(); } try { this.logger = this.componentContext.getLogger("", null); } catch (MissingResourceException e) { e.printStackTrace(); } catch (JBIException e) { e.printStackTrace(); } }
fault.setContent(createSource(state.content)); } catch (MessagingException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); message.setContent(createSource(state.content)); } catch (MessagingException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace();
public void dispatch(MessageExchange exchange) { // create a Message from the message exhange and send it to the // listener... if (getListener() == null) { return; } // TODO : Check faults and errors... if (exchange != null && exchange.getMessage("in") != null) { Message message = Adapter.transform(exchange.getMessage("in")); Message out = getListener().onMessage(message); if (out != null) { // set the out message in the exchange try { exchange.setMessage(Adapter.transform(out), "out"); } catch (MessagingException e) { e.printStackTrace(); } } } } }
fault.setContent(createSource(state.content)); } catch (MessagingException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); message.setContent(createSource(state.content)); } catch (MessagingException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace();