Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Deploy the back-end service (SimpleStockQuoteService) in the Axis2 server. For instructions on deploying sample back-end services, see Deploying sample back-end services.

  2. Start the Axis2 server. For instructions on starting the Axis2 server, see Starting the Axis2 server.
  3. Enable the plain text message builder in the axis2.xml file (found in the <ESB_HOME>/repository/conf/axis2 directory) as shown below.


    Code Block
    languagehtml/xml
    <messageBuilder contentType="text/plain" class="org.apache.axis2.format.PlainTextBuilder"/>
  4. Enable the vfs transport in the axis2.xml file by uncommenting the vfs transport sender and receiver configurations as shown below.
    Code Block
    <transportReceiver name="vfs" class="org.apache.synapse.transport.vfs.VFSTransportListener"/>
    <transportSender name="vfs" class="org.apache.synapse.transport.vfs.VFSTransportSender"/>
  5. Create three folders on your computer for the following purposes:

    • To store the original text file with the EDI message.

    • To store the text file with the EDI message after the file has been successfully processed by the Smooks mediator.
    • To store the text file with the EDI message if the file processing fails.
  6. Update the sample configuration file (which is the synapse_sample_654.xml file found in the <ESB_HOME>/repository/samples/ directory) with the paths to the folders created in the previous step. Listed below are the parameters you need to update:

    • transport.vfs.FileURI: This parameter specifies the path to the folder that stores the text file with the EDI message.
    • transport.vfs.MoveAfterProcess: This specifies the path to the folder that stores the same text file after it is successfully converted by the Smooks mediator.
    • transport.vfs.ActionAfterFailure: This specifies the path to the folder that stores the same text file if an error occurs during the processing.

    See the following example of the sample configuration:

    Code Block
    <parameter name="transport.vfs.FileURI">file:///home/user/test/in</parameter>
    <parameter name="transport.vfs.MoveAfterProcess">file:///home/user/test/original</parameter>
    <parameter name="transport.vfs.MoveAfterFailure">file:///home/user/test/original</parameter>

...