Note that WSO2 EI is shipped with the following changes to what is mentioned in this documentation :
repository/samples/directory that includes all Integration profile samples is changed to
repository/samples/resources/directory that includes all artifacts related to the Integration profile samples is changed to
This sample demonstrates how to use the file system as an input medium via the inbound file listener.
- Create 3 new directories named
originalin a test directory (e.g., /home/user/test) in the local file system. Then, open the
<EI_HOME>/samples/service-bus/synapse_sample_900.xmlfile in a text editor and change the
transport.vfs.MoveAfterFailureparameter values to the in, out, and original directory locations respectively.
Building the sample
The XML configuration for this sample is as follows:
This configuration file
synapse_sample_900.xml is available in the
To build the sample
Start the ESB with the sample 900 configuration. For instructions on starting a sample ESB configuration, see Starting the ESB with a sample configuration.
The operation log keeps running until the server starts, which usually takes several seconds. Wait until the server has fully booted up and displays a message similar to "WSO2 Carbon started in n seconds."
Start the Axis2 server. For instructions on starting the Axis2 server, see Starting the Axis2 server.
Deploy the back-end service SimpleStockQuoteService. For instructions on deploying sample back-end services, see Deploying sample back-end services.
Executing the sample
To execute the sample client
Copy the <
EI_HOME>/samples/service-bus/resources/vfs/test.xmlfile to the location specified in
transport.vfs.FileURIin the configuration (i.e., the in directory).
test.xmlfile contains a simple stock quote request and is as follows:
Analyzing the output
You will see that the inbound polling file listener picks the file from
in directory and sends it to the Axis2 service, and that the request XML file is moved to the