public void onMessage(MessageExchange messageExchange) throws MessagingException {
try {
UMOMessageDispatcher dispatcher = endpoint.getConnector().getDispatcher(endpoint.getEndpointURI().getAddress());
NormalizedMessage out = getOutMessage(messageExchange);
UMOMessage message = JbiUtils.createMessage(out);
UMOEvent event = new MuleEvent(message, endpoint, new MuleSession(), endpoint.isSynchronous());
if (endpoint.isSynchronous()) {
UMOMessage result = dispatcher.send(event);
//todo send result back
} else {
dispatcher.dispatch(event);