Unable to send file in out directory WSO2 ESB - proxy

I have a simple vfs based proxy service. I want to poll file "DiscardedContracts.csv" and I want to add time with file name and move it to Out directory.
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="ContractsDiscardedFileReader"
startOnLoad="true"
statistics="disable"
trace="disable"
transports="vfs">
<target>
<inSequence>
<property expression="fn:concat('DiscardedContracts', get-property('SYSTEM_DATE', 'yyMMddHHmmss'), '.csv')"
name="transport.vfs.ReplyFileName"/>
<log separator="==-------Going to move discarded contract file in out directory---------=="/>
<log level="custom" separator="==-------File--------==">
<property expression="fn:concat('DiscardedContracts', get-property('SYSTEM_DATE', 'yyMMddHHmmss'), '.csv')"
name="transport.vfs.ReplyFileName"/>
</log>
<property name="OUT_ONLY" scope="default" type="STRING" value="true"/>
<send>
<endpoint name="FileEpr">
<address uri="vfs:file:///opt/file/contracts/Out/"/>
</endpoint>
</send>
</inSequence>
<faultSequence>
<sequence key="DeliveriesFileProcessingFaultSequence"/>
</faultSequence>
</target>
<parameter name="transport.vfs.ContentType">text/plain</parameter>
<parameter name="transport.vfs.ActionAfterProcess">MOVE</parameter>
<parameter name="transport.vfs.CreateFolder">true</parameter>
<parameter name="transport.vfs.MoveAfterFailure">vfs:file:///opt/file/contracts/Fail</parameter>
<parameter name="sequential">true</parameter>
<parameter name="transport.vfs.LockReleaseSameNode">false</parameter>
<parameter name="transport.vfs.Build">false</parameter>
<parameter name="transport.vfs.MoveAfterProcess">vfs:file:///opt/file/contracts/Out/</parameter>
<parameter name="coordination">true</parameter>
<parameter name="transport.vfs.Streaming">true</parameter>
<parameter name="transport.PollInterval">30</parameter>
<parameter name="transport.vfs.FileURI">vfs:file:///opt/file/mysql</parameter>
<parameter name="transport.vfs.ActionAfterFailure">MOVE</parameter>
<parameter name="transport.vfs.AutoLockRelease">false</parameter>
<parameter name="transport.vfs.FileSortAttribute">lastmodifiedtimestamp</parameter>
<parameter name="transport.vfs.FileSortAscending">true</parameter>
<parameter name="transport.vfs.DistributedLock">false</parameter>
<parameter name="transport.vfs.FileNamePattern">.*.csv</parameter>
<parameter name="transport.vfs.Locking">disable</parameter>
<description/>
</proxy>
But Problem is I am able to concat datetime with file name but file is not moving to Out directory properly. It create a response.xml Which contains my data. I don't know how file name and extension is changing. Need help, Thanks.

I believe this is because you have not set transport.vfs.ReplyFileName. (You have only logged it.) Its default value is response.xml.
If you take transport.vfs.ReplyFileName property out of the log mediator, it should work.
Ref: https://docs.wso2.com/display/ESB500/VFS+Transport
Update: Set scope="transport" to the property like below.
<property expression="fn:concat('DiscardedContracts', get-property('SYSTEM_DATE', 'yyMMddHHmmss'), '.csv')"
scope="transport"
name="transport.vfs.ReplyFileName"/>

Related

To move Folder from one location to another in WSO2 EI 6.1.1

I have developed API which is used to download images to local path with Specific Folder name which works fine. My requirement here is to move folder with Files(Images) to SFTP Location. Nothing happened, File resides in the same Input path. Can anyone please help me?
Download Folder Name: Stock001 which has image File(.jpg )
Proxy Code:
VFS:
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="SFTP_Proxy"
startOnLoad="true"
statistics="disable"
trace="disable"
transports="http,https">
<target>
<inSequence>
<log level="custom">
<property name="STATUS:" value="---------SFTP Proxy Invoked-------------------"/>
</log>
</inSequence>
<outSequence/>
<faultSequence/>
</target>
<parameter name="transport.PollInterval">15</parameter>
<parameter name="transport.vfs.FileURI">file:///D:/Test/CarSalesStockImages/Input/</parameter>
<parameter name="transport.vfs.ContentType">text/plain</parameter>
<parameter name="transport.vfs.ActionAfterProcess">MOVE</parameter>
<parameter name="transport.vfs.MoveAfterFailure">file:///D:/Test/CarSalesStockImages/Failed/</parameter>
<parameter name="transport.vfs.ActionAfterFailure">MOVE</parameter>
<parameter name="transport.vfs.FileNamePattern">.*.*</parameter>
<parameter name="transport.vfs.MoveAfterProcess">vfs:sftp://test-dev:U46A0hTf2vhjytqq#3.109.0.212/wso2/QRSagProcess/VB/CarSalesStockImages</parameter>
<description/>
</proxy>
FileConnetor:
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="SFTP_Proxy"
startOnLoad="true"
statistics="disable"
trace="disable"
transports="http,https">
<target>
<inSequence>
<log level="custom">
<property name="STATUS:" value="---------SFTP Proxy Invoked-------------------"/>
</log>
<fileconnector.copy>
<source>file:///D:/Test/CarSalesStockImages/Input/</source>
<destination>sftp://test-dev:pwd#ipaddress/wso2/QRSagProcess/VB/CarSalesStockImages/</destination>
</fileconnector.copy>
<log level="custom">
<property name="STATUS:" value="---------File Copied-------------------"/>
</log>
<fileconnector.delete>
<source>file:///D:/Test/CarSalesStockImages/Input/</source>
<setUserDirIsRoot>true</setUserDirIsRoot>
</fileconnector.delete>
<log level="custom">
<property name="STATUS:"
value="---------File Deleted from Source-------------------"/>
</log>
<fileconnector.create>
<source>file:///D:/Test/CarSalesStockImages/Input/</source>
</fileconnector.create>
</inSequence>
<outSequence/>
<faultSequence>
<log level="custom">
<property name="STATUS:"
value="------------faultSequence Invoked----------------"/>
</log>
<log level="full"/>
</faultSequence>
</target>
<description/>
</proxy>
Error:
[2020-05-29 10:59:23,145] [] ERROR - VFSTransportListener Error resolving directory to move after processing : sftp://qrs-dev":***#"3.109.0.212/wso2/QRSagProcess/VB/CarSalesStockI
ages/
org.apache.commons.vfs2.FileSystemException: Could not connect to SFTP server at "sftp://test-dev:***#3.109.0.212/".
at org.apache.commons.vfs2.provider.sftp.SftpFileProvider.doCreateFileSystem(SftpFileProvider.java:108)
at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.getFileSystem(AbstractOriginatingFileProvider.java:155)
at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:119)
at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:88)
at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:747)
at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:626)
at org.apache.synapse.transport.vfs.VFSTransportListener.moveOrDeleteAfterProcessing(VFSTransportListener.java:662)
at org.apache.synapse.transport.vfs.VFSTransportListener.scanFileOrDirectory(VFSTransportListener.java:499)
at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:188)
at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:134)
at org.apache.axis2.transport.base.AbstractPollingTransportListener$1$1.run(AbstractPollingTransportListener.java:67)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.commons.vfs2.FileSystemException: Could not connect to SFTP server at "3.105.0.247".
at org.apache.commons.vfs2.provider.sftp.SftpClientFactory.createConnection(SftpClientFactory.java:268)
at org.apache.commons.vfs2.provider.sftp.SftpFileProvider.doCreateFileSystem(SftpFileProvider.java:97)
... 14 more
Caused by: com.jcraft.jsch.JSchException: Auth fail
at com.jcraft.jsch.Session.connect(Session.java:512)
at com.jcraft.jsch.Session.connect(Session.java:183)
at org.apache.commons.vfs2.provider.sftp.SftpClientFactory.createConnection(SftpClientFactory.java:264)
... 15 more
[2020-05-29 10:59:23,150] [] ERROR - VFSTransportListener File object 'file:///D:/Test/CarSalesStockImages/Input/Test.txt'cloud not be moved, will remain in "locked" state
Would you be able to verify the syntax of the destination? A sample I came across this: http://mrmalakasilva.blogspot.com/2016/07/automating-file-processing-with-wso2.html
Thanks,

Error while creating JMS configuration in wso2esb

I'm using wso2esb4.7.0 and wso2mb-2.2.0. I wish to create jms proxy service using wso2mb. For this i have configured the wso2mb as well as wso2esb like :
Wso2esb configuration :
(changes in jndi.properties)
# register some connection factories
# connectionfactory.[jndiname] = [ConnectionURL]
connectionfactory.QueueConnectionFactory = amqp://admin:admin#clientID/carbon?brokerlist='tcp://localhost:5673'
connectionfactory.TopicConnectionFactory = amqp://admin:admin#clientID/carbon?brokerlist='tcp://localhost:5673'
# register some queues in JNDI using the form
# queue.[jndiName] = [physicalName]
queue.MyQueue = MyQueue
changes in axis2.xml :
uncomment following code :
<transportSender name="jms" class="org.apache.axis2.transport.jms.JMSSender"/>
<transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">
<parameter name="myTopicConnectionFactory" locked="false">
<parameter name="java.naming.factory.initial" locked="false">org.wso2.andes.jndi.PropertiesFileInitialContextFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">repository/conf/jndi.properties</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">TopicConnectionFactory</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">topic</parameter>
</parameter>
<parameter name="myQueueConnectionFactory" locked="false">
<parameter name="java.naming.factory.initial" locked="false">org.wso2.andes.jndi.PropertiesFileInitialContextFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">repository/conf/jndi.properties</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">QueueConnectionFactory</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
</parameter>
<parameter name="default" locked="false">
<parameter name="java.naming.factory.initial" locked="false">org.wso2.andes.jndi.PropertiesFileInitialContextFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">repository/conf/jndi.properties</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">ConnectionFactory</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
</parameter>
</transportReceiver>
also copied andes-client-*.jar and geronimo-jms_1.1_spec-*.jar from $MB_HOME/client-lib to $ESB_HOME/repository/components/lib
re-started servers.Till it's working fine.
Now wish to create a service with jms port. it is creating a service but immediately it goes to faulty service and esb logs it showing error like :
ERROR - JMSListener Unexpected error when configuring service SampleJMS for the JMS transport. It will be disabled for this transport and marked as faulty.
java.lang.NullPointerException
at org.apache.axis2.transport.jms.JMSListener.getConnectionFactory(JMSListener.java:132)
at org.apache.axis2.transport.jms.JMSEndpoint.loadConfiguration(JMSEndpoint.java:193)
at org.apache.axis2.transport.base.AbstractTransportListenerEx.startListeningForService(AbstractTransportListenerEx.java:153)
at org.apache.axis2.transport.base.AbstractTransportListener.internalStartListeningForService(AbstractTransportListener.java:213)
at org.apache.axis2.transport.base.AbstractTransportListener$2.serviceAdded(AbstractTransportListener.java:126)
at org.apache.axis2.transport.base.tracker.AxisServiceTracker.serviceAdded(AxisServiceTracker.java:212)
at org.apache.axis2.transport.base.tracker.AxisServiceTracker.start(AxisServiceTracker.java:188)
at org.apache.axis2.transport.base.AbstractTransportListener.start(AbstractTransportListener.java:178)
at org.apache.axis2.transport.base.AbstractTransportListenerEx.start(AbstractTransportListenerEx.java:83)
also while restarting it showing error like :
ERROR - BaseUtils JNDI lookup of name ConnectionFactory returned a org.wso2.andes.client.AMQQueue while a interface javax.jms.ConnectionFactory was expected
[2015-01-20 10:22:27,709] ERROR - ListenerManager Couldn't initialize the jmstransport listener
org.apache.axis2.transport.base.BaseTransportException: JNDI lookup of name ConnectionFactory returned a org.wso2.andes.client.AMQQueue while a interface javax.jms.ConnectionFactory was expected
My proxy configuration is :
<target>
<inSequence>
<property name="Action"
value="urn:placeOrder"
scope="default"
type="STRING"/>
<log level="full"/>
<send>
<endpoint>
<address uri="http://localhost:9000/services/SimpleStockQuoteService"/>
</endpoint>
</send>
</inSequence>
<outSequence>
<drop/>
</outSequence>
Why so? is their any problem with jms configuration? Please guide me.
in jndi.properties, you've defined :
QueueConnectionFactory
TopicConnectionFactory
and in axis.xml, you use :
QueueConnectionFactory
TopicConnectionFactory
AND, in the default part, a "ConnectionFactory"
I don't use WSO2MB by I wonder if this would not be your problem

Proxy Service: AdminProxy Admin Exception in wso2 esb 4.8.1

I have defined a simple proxy service in WSO2 ESB(4.8.1) which is listening over a QUEUE via JMS. This service after reading the message send it to another queue.
Problem:
When i define inline endpoint then it works fine, but if i refer to a registry endpoint then WSO2 ESB gives me error and does not allow me to modify the service.
Proxy Service:
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="FailOverTest"
transports="jms"
statistics="disable"
trace="disable"
startOnLoad="true">
<target>
<inSequence>
<property name="OUT_ONLY" value="true" scope="default" type="STRING"/>
<log level="full"/>
<property name="ClientApiNonBlocking" action="remove" scope="axis2"/>
<send>
<endpoint key="gov:/repository/Endpoints/EndpointFailover.xml"/>
</send>
<log level="full"/>
</inSequence>
<faultSequence>
<property name="SET_ROLLBACK_ONLY"
value="true"
scope="axis2"
type="STRING"/>
<log level="custom">
<property name="ERROR_CODE" expression="get-property('ERROR_CODE')"/>
<property name="ERROR_MESSAGE" expression="get-property('ERROR_MESSAGE')"/>
<property name="ERROR_DETAIL" expression="get-property('ERROR_DETAIL')"/>
<property name="ERROR_EXCEPTION" expression="get-property('ERROR_EXCEPTION')"/>
<property name="Transaction Action" value="Rollbacked"/>
</log>
</faultSequence>
</target>
<parameter name="transport.jms.ContentType">
<rules>
<jmsProperty>contentType</jmsProperty>
<default>application/xml</default>
</rules>
</parameter>
<parameter name="transport.jms.ConnectionFactory">myQueueConnectionFactory</parameter>
<parameter name="transport.jms.DestinationType">queue</parameter>
<parameter name="transport.jms.Destination">FailOverRequest</parameter>
<parameter name="originator">ServiceAdmin</parameter>
<description/>
</proxy>
Registry Endpoint XML:
<?xml version="1.0" encoding="UTF-8"?>
<endpoint>
<address uri="jms:/FailOverResponse?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&java.naming.provider.url=tcp://localhost:61616&transport.jms.DestinationType=queue" format="pox">
</address>
</endpoint>
Error WSO2 ESB Displaying:
This error may occur if you are attempting to modify the endpoint through Source View. The Design-View endpoint modification has a nice feature that allows browsing of the registry, and it will format the link to registry endpoints successfully every time. Please try that Design-view to modify your endpoint.

Configure WSO2 ESB JMS Transport with IBM Messagesight

I was wondering how to configure a JMS transport to work with IBM MessageSight, similar to: http://docs.wso2.org/display/ESB460/Configure+with+ActiveMQ
Right now, I have the following in axis2.xml:
<transportReceiver name="ibmMsgSightJMS" class="org.apache.axis2.transport.jms.JMSListener">
<parameter name="myTopicConnectionFactory" locked="false">
<parameter name="java.naming.factory.initial" locked="false">com.ibm.ima.jms.ImaJmsFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">tcp://192.168.154.128:1883</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">TopicConnectionFactory</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">topic</parameter>
</parameter>
<parameter name="myQueueConnectionFactory" locked="false">
<parameter name="java.naming.factory.initial" locked="false">com.ibm.ima.jms.ImaJmsFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">tcp://192.168.154.128:1883</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">QueueConnectionFactory</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
</parameter>
<parameter name="default" locked="false">
<parameter name="java.naming.factory.initial" locked="false">com.ibm.ima.jms.ImaJmsFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">tcp://192.168.154.128:1883</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">QueueConnectionFactory</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
</parameter>
</transportReceiver>
And I have something like this in an ESB proxy service:
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="esbProcessMqttJMSPS" statistics="disable" trace="disable" transports="ibmMsgSightJMS">
<parameter name="transport.jms.ConcurrentConsumers">1</parameter>
<parameter name="transport.jms.ConnectionFactory">myTopicConnectionFactory</parameter>
<parameter name="transport.jms.DestinationType">B</parameter>
<parameter name="transport.jms.Destination">B</parameter>
</proxy>
When I startup the ESB server, I get the following error: Cannot acquire JNDI context, JMS Connection factory : TopicConnectionFactory or default destination : null for JMS CF
Any help would be greatly appreciated. Thanks!
Okay so I figured this out.
The jms config in axis2.xml should be:
<transportReceiver name="ibmMsgSightJMS" class="org.apache.axis2.transport.jms.JMSListener">
<parameter name="myTopicConnectionFactory">
<parameter name="java.naming.factory.initial" locked="false">com.sun.jndi.fscontext.RefFSContextFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">file:/C:/path/to/wso2/repository/conf/jndi</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">connFactory1</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">topic</parameter>
</parameter>
<parameter name="myQueueConnectionFactory">
<parameter name="java.naming.factory.initial">com.sun.jndi.fscontext.RefFSContextFactory</parameter>
<parameter name="java.naming.provider.url">file:/C:/path/to/wso2/repository/conf/jndi</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName">connFactory1</parameter>
<parameter name="transport.jms.ConnectionFactoryType">queue</parameter>
</parameter>
<parameter name="default">
<parameter name="java.naming.factory.initial">com.sun.jndi.fscontext.RefFSContextFactory</parameter>
<parameter name="java.naming.provider.url">file:/C:/path/to/wso2/repository/conf/jndi</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName">connFactory1</parameter>
<parameter name="transport.jms.ConnectionFactoryType">topic</parameter>
</parameter>
</transportReceiver>
And I have a jndi properties file named .bindings with the following:
connFactory1/ClassName=com.ibm.ima.jms.impl.ImaConnectionFactory
connFactory1/FactoryName=com.ibm.ima.jms.impl.ImaConnectionFactory
connFactory1/RefAddr/0/Encoding=String
connFactory1/RefAddr/0/Type=Port
connFactory1/RefAddr/0/Content=16102
connFactory1/RefAddr/1/Encoding=String
connFactory1/RefAddr/1/Type=Server
connFactory1/RefAddr/1/Content=192.168.154.128
connFactory1/RefAddr/2/Encoding=String
connFactory1/RefAddr/2/Content=common
connFactory1/RefAddr/2/Type=ObjectType
RequestTopic/ClassName=com.ibm.ima.jms.impl.ImaTopic
RequestTopic/FactoryName=com.ibm.ima.jms.impl.ImaTopic
RequestTopic/RefAddr/0/Encoding=String
RequestTopic/RefAddr/0/Type=Name
RequestTopic/RefAddr/0/Content=testRequestTopic
ResponseTopic/ClassName=com.ibm.ima.jms.impl.ImaTopic
ResponseTopic/FactoryName=com.ibm.ima.jms.impl.ImaTopic
ResponseTopic/RefAddr/0/Encoding=String
ResponseTopic/RefAddr/0/Type=Name
ResponseTopic/RefAddr/0/Content=testResponseTopic
Also, don't forget to put the ImaJmsClient.jar inside components/lib.
I am still having issues where every service is creating topics/queues, and because they are not defined in .bindings, the server is puking. I have worked around this by removing the jms transport protocol on every data service and jar service.

WSO2 ESB: Using external parameter definition for proxy?

We are using several proxies that are listening to different locations. But during develpment, we aren't having the same URI as in the production environment. Is it possible to have the URI (transport.vfs.File.URI) external defined? (Maybe local-entry or another property?)
Following line should be able to load external definition of the actual URI:
<parameter name="transport.vfs.FileURI">get-property('myURI')</parameter>
Full Proxy Example (not working):
<proxy xmlns="http://ws.apache.org/ns/synapse" name="getRN100xml"
statistics="disable" trace="disable" transports="vfs">
<target>
<inSequence>
<send>...</send>
</inSequence>
</target>
<parameter name="transport.vfs.ActionAfterProcess">MOVE</parameter>
<parameter name="transport.PollInterval">5</parameter>
<parameter name="transport.vfs.MoveAfterProcess">C:/WSO2/In/saved</parameter>
<parameter name="transport.vfs.FileURI">get-property('myURI')</parameter>
<parameter name="transport.vfs.FileNamePattern">.*.xml</parameter>
<parameter name="transport.vfs.ContentType">application/xml</parameter>
<parameter name="transport.vfs.MoveTimestampFormat">yyMMddHHmmss</parameter>
You can check out this post WSO2 ESB - Dynamic value for proxy parameters (transport) for an example how to dynamically set values in a proxy sequence.
A simple way to do this is to make a sequence template and set your parameters in that template. You read this template as the first action in your inSequence.
Your proxy definition looks like:
<proxy xmlns="http://ws.apache.org/ns/synapse" name="getRN100xml"
statistics="disable" trace="disable" transports="vfs">
<target>
<inSequence>
<call-template target="transport_vfs_parameter_settings"/>
<send>...</send>
/<inSequence>
</target>
The template difinition looks sg. like:
<template xmlns="http://ws.apache.org/ns/synapse" name="transport_vfs_parameter_settings">
<sequence>
<property xmlns:ns="http://org.apache.synapse/xsd" name="transport.vfs.FileNamePattern" expression="test.xml"></property>
<property xmlns:ns="http://org.apache.synapse/xsd" name="transport.PollInterval" expression="15" scope="transport"></property>
<property xmlns:ns="http://org.apache.synapse/xsd" name="transport.vfs.ActionAfterProcess" expression="MOVE" scope="transport"></property>
<property xmlns:ns="http://org.apache.synapse/xsd" name="transport.vfs.FileURI" expression="//localhost/D:/Test/in" scope="transport"></property>
<property xmlns:ns="http://org.apache.synapse/xsd" name="transport.vfs.MoveAfterProcess" expression="//localhost/D:/Test/processed" scope="transport"></property>
<property xmlns:ns="http://org.apache.synapse/xsd" name="transport.vfs.MoveAfterFailure" expression="//localhost/D:/Test/failure" scope="transport"></property>
<property xmlns:ns="http://org.apache.synapse/xsd" name="transport.vfs.ContentType" expression="text/xml" scope="transport"></property>
<property xmlns:ns="http://org.apache.synapse/xsd" name="transport.vfs.ActionAfterFailure" expression="MOVE" scope="transport"></property>
</sequence>
</template>
In this way transporting your proxy definition to another environment means using a different template.
Naturally, you can only set in the inSequence those parameters, whose values can be determined at the beginning of the inSequence. For example, if you want the replyFilename contain the reply messageID, set it in the outSequence.

Resources