Objective: Switching from FTP transport listener to mail transport sender.
- You will need access to an FTP server and an SMTP server to try this sample.
- Start the Axis2 server and deploy the
SimpleStockQuoteServiceif not already done.
- Enable mail transport sender in the ESB
- Create a new test directory in the FTP server. Open ESB_HOME/repository/samples/synapse_sample_255.xml and edit the following values. Change transport.vfs.FileURI parameter value point to the test directory at the FTP server. Change outSequence endpoint address URI email address to a working email address. Values you have to change are marked with "
- Start the Synapse configuration numbered 255:
wso2esb-samples.sh -sn 255
ESB_HOME/repository/samples/resources/vfs/test.xmlto the ftp directory given in
VFS transport listener will pick the file from the directory in the FTP server and send it to the Axis2 service. The file in the FTP directory will be deleted. The response will be sent to the given e-mail address.
Setting up Mail Transport Sender
To enable the mail transport sender for samples, you need to uncomment the mail transport sender configuration in the
repository/conf/axis2/axis2.xml. Uncomment the mail transport sender sample configuration and make sure it points to a valid SMTP configuration for any actual scenarios.