}
};
myMessageComposer.setContextMapper(new CamelContextMapper());
QName serviceName = new QName(_serviceDomain.getName().getNamespaceURI(), "MessageComposerService");
_serviceDomain.registerService(serviceName,
new InOutService(),
new OutboundHandler(bindingModel, (SwitchYardCamelContext) context, myMessageComposer, _serviceDomain) {
{
setState(State.STARTED);
}
}
);
_service = _serviceDomain.registerServiceReference(serviceName, new InOutService());
Exchange exchange = _service.createExchange();
exchange.send(exchange.createMessage().setContent("foo"));
assertThat((Boolean)exchange.getContext().getProperty("decomposeInvoked").getValue(), is(true));
assertThat((Boolean)exchange.getContext().getProperty("composeInvoked").getValue(), is(true));
}