Delete *.project* file in sample project: * control-bus * http Delete also: * applications/cafe/.springBeans * applications/loan-broker/.springBeans * applications/loanshark/.springBeans * basic/feed/.springBeans * basic/file/.springBeans * basic/ftp/.springBeans * basic/helloworld/.springBeans * basic/http/.springBeans * basic/jms/.springBeans * basic/jmx/.springBeans * basic/mail/.springBeans * basic/oddeven/.springBeans * basic/quote/.springBeans * basic/sftp/.springBeans * basic/tcp-client-server/.springBeans * basic/twitter/.springBeans * basic/ws-inbound-gateway/.springBeans * basic/ws-outbound-gateway/.springBeans * basic/xml/.springBeans * basic/xmpp/.springBeans * intermediate/async-gateway/.springBeans * intermediate/errorhandling/.springBeans * intermediate/file-processing/.springBeans * intermediate/multipart-http/.springBeans * intermediate/travel/.springBeans
XML Sample
This example demonstrates the following aspects of the XML support available with Spring Integration:
- XPath Splitter - to split an order with multiple items into several order messages for separate processing.
- XPath Router - to route messages according to the evaluation of an XPath expression which tests to see if the order item is in stock.
- XPath Expression - which tests to see if the order item is in stock
- XSLT Transformer - to transform the payload of the order message into a resupply message where the order item is found to be out of stock.
To run sample simply execute BookOrderProcessingTest. You should see the following output:
INFO : org.springframework.integration.samples.xml.WarehouseDispatch - Warehouse dispatching orderItem:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<orderItem in-stock="true" xmlns="http://www.example.org/orders">
<isbn>0321200683</isbn>
<quantity>2</quantity>
</orderItem>
INFO : org.springframework.integration.samples.xml.ExternalResupply - Placing resupply order:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<bb:bigBooksOrder xmlns:bb="http://www.example.org/orders-bigbooks"
xmlns:sb="http://www.example.org/orders">
<bb:order>
<bb:purchaser>smallbooks</bb:purchaser>
<bb:quantity>5</bb:quantity>
<bb:isbn>1590596439</bb:isbn>
</bb:order>
</bb:bigBooksOrder>