-
1. Problem with adding post-suffix to file after coping
tfennelly Jan 28, 2011 5:29 AM (in response to amigo111)I think I follow you Mind posting your ESB config please.
Also... take a look at this page re implementing a custom listener... http://community.jboss.org/wiki/WritingCustomListenersforJBossESB4x
-
2. Problem with adding post-suffix to file after coping
amigo111 Jan 28, 2011 6:26 AM (in response to tfennelly)Thanks.
I use now such jboss-esb configuration
<listeners>
<fs-listener name="FileGateway" busidref="helloFileChannel" is-gateway="true"
schedule-frequency="10">
<fs-message-filter
directory="${input}"
input-suffix=".txt"
work-suffix=".esbWorking"
post-delete="false"
post-directory="${output}"
post-suffix=""
error-delete="false"
error-directory="D:\Projects2\FileCopyESB\dirs\error"
error-suffix=".IN_ERROR"
post-rename="true"
/>
</fs-listener>
</listeners>
<actions mep="OneWay">
<action name="action6"
class="ru.csbi.esb.listener.MyAction"
process="process"
/>
<action name="BuildFilename" class="org.jboss.soa.esb.actions.naming.FileNameGeneratorAction">
<property name="strategies" value="">
<strategies>
<strategy class="org.jboss.soa.esb.actions.naming.strategy.ChangeSuffixNamingStrategy"
newSuffix="txt"/>
</strategies>
</property>
</action>
<action name="notificationAction" class="org.jboss.soa.esb.actions.Notifier">
<property name="okMethod" value="notifyOK"/>
<property name="notification-details">
<NotificationList type="ok">
<target class="NotifyFiles">
<file append="false"
URI="D:\Projects2\FileCopyESB\dirs\out\{org.jboss.soa.esb.naming.result}"/>
</target>
</NotificationList>
<NotificationList type="err">
<target class="NotifyFiles">
<file append="false"
URI="D:\Projects2\FileCopyESB\dirs\out\{org.jboss.soa.esb.naming.result}_error"/>
</target>
</NotificationList>
</property>
</action>
But i'll try with new listener.
-
3. Re: Problem with adding post-suffix to file after coping
bvoleti Jul 19, 2012 4:20 PM (in response to amigo111)Hi Tom,
I had the similar issue, please see my configuration. I'm able to SFTP file from remote to my local machince without problem.
if you see my provider i'm accepting all types of file and want to transfer same file to my local, can you please let me know how do i mention in my notifer to transfer same file with same name and type to my local. Thank you for you help in Adavance ... Bala
<providers>
<ftp-provider hostname="...." name="FTPProviderLAB11">
<ftp-bus busid="LAB11ChannelID">
<ftp-message-filter directory="/opt/sw/jboss/target/receive"
input-suffix=".*" password="password" post-delete="true"
post-rename="false" protocol="sftp" username="jboss"/>
</ftp-bus>
</ftp-provider>
</providers>
<services>
<service category="SFTPToLocalCategory"
description="Transfer file from SFTP server to your local box or remote box"
invmScope="GLOBAL" invmTransacted="true" name="SFTPToLocalService">
<listeners>
<ftp-listener busidref="LAB11ChannelID" is-gateway="true" name="LAB11Listener"/>
</listeners>
<actions mep="OneWay">
<action class="org.jboss.soa.esb.actions.Notifier" name="notificationAction">
<property name="okMethod" value="notifyOK"/>
<property name="destinations">
<NotificationList type="ok">
<target class="NotifyFiles">
<file URI="E:\testing\done\Successful.pptx" append="false"/>
</target>
</NotificationList>
<NotificationList type="err">
<target class="NotifyFiles">
<file URI="E:\testing\exception\Error.pptx" append="false"/>
</target>
</NotificationList>
</property>
</action>
</actions>
</service>
</services>
</jbossesb>