// Provider side
InOut mep = (InOut) provider.getChannel().accept(10000L);
assertNotNull(mep);
assertEquals(ExchangeStatus.ACTIVE, mep.getStatus());
NormalizedMessage m = mep.createMessage();
m.setContent(new StringSource(RESPONSE));
mep.setOutMessage(m);
provider.getChannel().sendSync(mep);
assertEquals(ExchangeStatus.DONE, mep.getStatus());
} catch (Exception e) {
e.printStackTrace();
fail();
}
}
});
t.start();
// Send message exchange
MessageExchangeFactory mef = consumer.getChannel().createExchangeFactoryForService(new QName("provider"));
InOut mec = mef.createInOutExchange();
NormalizedMessage m = mec.createMessage();
m.setContent(new StringSource(PAYLOAD));
mec.setInMessage(m);
consumer.getChannel().sendSync(mec, 10000L);
assertEquals(ExchangeStatus.ACTIVE, mec.getStatus());
mec.setStatus(ExchangeStatus.DONE);
consumer.getChannel().send(mec);