Document doc = container.getRegistry().getEndpointDescriptor(se);
String wsdl = new SourceTransformer().toString(doc);
log.info(wsdl);
DefaultServiceMixClient client = new DefaultServiceMixClient(container);
Destination dest = client.createDestination("service:http://jsr181.servicemix.apache.org/EchoWithAttachment");
InOut me = dest.createInOutExchange();
me.getInMessage().setContent(new StringSource(
"<echo xmlns:xop='http://www.w3.org/2004/08/xop/include'><msg>"
+ "hello world</msg><binary><xop:Include href='binary'/></binary></echo>"));
me.getInMessage().addAttachment("binary", new DataHandler(
new ByteArrayDataSource(new byte[] {0, 1, 2}, "image/jpg")));