Versions Compared

Key

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

...

  • Start the Axis2 server and deploy the SimpleStockQuoteService if not already done
  • Create three new directories in a test directory, for example, in, out, original in /home/user/test. Open ESB_HOME/repository/samples/synapse_sample_900.xml and edit the following values. Change transport.vfs.FileURI, transport.vfs.MoveAfterProcess, transport.vfs.MoveAfterFailure parameter values to the above in, original, original directories respectively. 
  • Start the Synapse configuration numbered 900: wso2esb-samples.sh -sn 900
  • Copy ESB_HOME/repository/samples/resources/vfs/test.xml to the directory given in transport.vfs.FileURI above.
Code Block
languagehtml/xml
linenumberstrue
<definitions xmlns="http://ws.apache.org/ns/synapse">
   <registry provider="org.wso2.carbon.mediation.registry.WSO2Registry">
      <parameter name="cachableDuration">15000</parameter>
   </registry>
   <taskManager provider="org.wso2.carbon.mediation.ntask.NTaskTaskManager">
      <parameter name="cachableDuration">15000</parameter>
   </taskManager>
   <inboundEndpoint xmlns="http://ws.apache.org/ns/synapse" name="file_inbound" sequence="request" onError="fault"  
                                                                           protocol="file" suspend="false">
      <parameters>
         <parameter name="interval">1000</parameter>
         <parameter name="sequential">true</parameter>
         <parameter name="transport.vfs.FileURI">file:///home/user/test/in</parameter>
         <!--CHANGE-->
         <parameter name="transport.vfs.ContentType">text/xml</parameter>
         <parameter name="transport.vfs.FileNamePattern">.*\.xml</parameter>
         <parameter name="transport.vfs.MoveAfterProcess">file:///home/user/test/original</parameter>
         <!--CHANGE-->
         <parameter name="transport.vfs.MoveAfterFailure">file:///home/user/test/original</parameter>
         <!--CHANGE-->
         <parameter name="transport.vfs.ActionAfterProcess">MOVE</parameter>
         <parameter name="transport.vfs.ActionAfterFailure">MOVE</parameter>
      </parameters>
   </inboundEndpoint>
   <sequence name="request" onError="fault">
      <call>
         <endpoint>
            <address format="soap12" uri="http://localhost:9000/services/SimpleStockQuoteService"/>
         </endpoint>
      </call>
      <drop/>
   </sequence>
</definitions>

...