container.activateComponent(jms, "servicemix-jms");
ReceiverComponent receiver = new ReceiverComponent();
container.activateComponent(receiver, "receiver");
DefaultServiceMixClient client = new DefaultServiceMixClient(container);
DocumentFragment epr = URIResolver.createWSAEPR("jms://queue/foo.bar.myqueue?jms.soap=true");
ServiceEndpoint se = client.getContext().resolveEndpointReference(epr);
assertNotNull(se);
InOnly inonly = client.createInOnlyExchange();
inonly.setEndpoint(se);
inonly.getInMessage().setContent(new StringSource("<hello>world</hello>"));
client.sendSync(inonly);
assertEquals(ExchangeStatus.DONE, inonly.getStatus());
receiver.getMessageList().assertMessagesReceived(1);
List msgs = receiver.getMessageList().flushMessages();
NormalizedMessage msg = (NormalizedMessage) msgs.get(0);