This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
<dependency org="org.springframework" name="org.springframework.transaction" rev="2.5.6" conf="compile->runtime"/>
|
||||
<dependency org="org.springframework.integration" name="org.springframework.integration" rev="latest.integration" conf="compile->compile"/>
|
||||
<dependency org="org.springframework.integration" name="org.springframework.integration.ws" rev="latest.integration" conf="compile->compile"/>
|
||||
<dependency org="org.springframework.integration" name="org.springframework.integration.xml" rev="latest.integration" conf="compile->compile"/>
|
||||
</dependencies>
|
||||
|
||||
</ivy-module>
|
||||
@@ -34,20 +34,12 @@ import org.w3c.dom.Document;
|
||||
public class BookOrderProcessingSample {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
AbstractApplicationContext applicationContext = new ClassPathXmlApplicationContext(
|
||||
"orderProcessingSample.xml", BookOrderProcessingSample.class);
|
||||
MessageChannel messageChannel = (MessageChannel) applicationContext.getBean("ordersChannel");
|
||||
GenericMessage<Document> orderMessage = createXmlMessageFromResource("org/springframework/integration/samples/xml/order.xml");
|
||||
messageChannel.send(orderMessage);
|
||||
applicationContext.close();
|
||||
}
|
||||
catch (Throwable t){
|
||||
t.printStackTrace();
|
||||
}
|
||||
finally {
|
||||
System.exit(0);
|
||||
}
|
||||
AbstractApplicationContext applicationContext = new ClassPathXmlApplicationContext("orderProcessingSample.xml",
|
||||
BookOrderProcessingSample.class);
|
||||
MessageChannel messageChannel = (MessageChannel) applicationContext.getBean("ordersChannel");
|
||||
GenericMessage<Document> orderMessage = createXmlMessageFromResource("org/springframework/integration/samples/xml/order.xml");
|
||||
messageChannel.send(orderMessage);
|
||||
applicationContext.close();
|
||||
}
|
||||
|
||||
private static GenericMessage<Document> createXmlMessageFromResource(String path) throws Exception {
|
||||
|
||||
@@ -12,17 +12,12 @@
|
||||
http://www.springframework.org/schema/util
|
||||
http://www.springframework.org/schema/util/spring-util.xsd">
|
||||
|
||||
|
||||
|
||||
<si:annotation-config />
|
||||
|
||||
<si:channel id="ordersChannel" />
|
||||
<si:channel id="stockCheckerChannel" />
|
||||
<si:channel id="orderRoutingChannel" />
|
||||
<si:channel id="warehouseDispatchChannel" />
|
||||
<si:channel id="outOfStockChannel" />
|
||||
<si:channel id="resupplyOrderChannel" />
|
||||
|
||||
|
||||
<!-- map of namespace prefix to URI -->
|
||||
<util:map id="orderNamespaceMap">
|
||||
|
||||
@@ -5,6 +5,12 @@ Bundle-ManifestVersion: 2
|
||||
Import-Template:
|
||||
org.springframework.integration.*;version="[1.0.0, 1.0.1)",
|
||||
org.springframework.beans.*;version="[2.5.6, 3.0.0)",
|
||||
org.springframework.context.support;version="[2.5.6, 3.0.0)",
|
||||
org.springframework.stereotype;version="[2.5.6, 3.0.0)"
|
||||
|
||||
org.springframework.context.*;version="[2.5.6, 3.0.0)",
|
||||
org.springframework.stereotype;version="[2.5.6, 3.0.0)",
|
||||
org.springframework.core.*;version="[2.5.6, 3.0.0)",
|
||||
org.springframework.xml.*;version="[1.5.5.A, 2.0.0)"
|
||||
Unversioned-Imports:
|
||||
org.w3c.dom,
|
||||
javax.xml.*,
|
||||
org.xml.sax.*
|
||||
|
||||
Reference in New Issue
Block a user