ServiceEndpoint endpoint = endpoints[0];
System.out.println("Sending to endpoint: " + endpoint);
for (int i = 0; i < messageCount; i++) {
InOnly exchange = context.getDeliveryChannel().createExchangeFactory().createInOnlyExchange();
NormalizedMessage message = exchange.createMessage();
exchange.setEndpoint(endpoint);
exchange.setInMessage(message);
// lets set the XML as a byte[], String or DOM etc
String xml = "<s12:Envelope xmlns:s12='http://www.w3.org/2003/05/soap-envelope'><s12:Body> <foo>Hello!</foo> </s12:Body></s12:Envelope>";
message.setContent(new StringSource(xml));