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));
System.out.println("sending message: " + i);
DeliveryChannel deliveryChannel = context.getDeliveryChannel();
System.out.println("sync send on deliverychannel: " + deliveryChannel);
if (sync) {
deliveryChannel.sendSync(exchange);