new ClassPathXmlApplicationContext("/META-INF/spring/integration/orderProcessingSample.xml",
BookOrderProcessingTestApp.class);
MessageChannel messageChannel = (MessageChannel) applicationContext.getBean("ordersChannel");
GenericMessage<Document> orderMessage =
createXmlMessageFromResource("META-INF/spring/integration/order.xml");
messageChannel.send(orderMessage);
applicationContext.close();
}
private static GenericMessage<Document> createXmlMessageFromResource(String path) throws Exception {
Resource orderRes = new ClassPathResource(path);