public void testSendSync() throws Exception {
AbstractXmlApplicationContext ctx = new ClassPathXmlApplicationContext("org/apache/servicemix/jbi/nmr/flow/jms/client.xml");
try {
ServiceMixClient client = (ServiceMixClient) ctx.getBean("client");
Thread.sleep(2000);
InOut exchange = client.createInOutExchange();
exchange.setService(new QName("http://www.habuma.com/foo", "pingService"));
NormalizedMessage in = exchange.getInMessage();
in.setContent(new StringSource("<ping>Pinging you</ping>"));
LOGGER.info("SENDING; exchange.status={}", exchange.getStatus());
client.sendSync(exchange);