Hello,
I'm new to Spring integration so please forgive me if I am missing something obvious.
I'm using Spring integration 2.0 to pull a file from a remote server and I want to do the equivalent of the following:
Code:ftp remoteServer cd remoteDiretory ls
In my Spring config, I have used this to configured the session factory:
I know that when injected into a test class, this connects successfully.Code:<bean id="ftpClientFactory" class="org.springframework.integration.ftp.session.DefaultFtpSessionFactory"> <property name="port" value="22" /> <property name="password" value="PASSWORD" /> <property name="clientMode" value="0" /> <property name="fileType" value="2" /> <property name="username" value="USERNAME" /> <property name="host" value="remoteServer" /> <property name="remoteWorkingDirectory" value="remoteDiretory" /> </bean>
However, when I tried to configure the input channel adapter
It tells me that the "remoteDirectory must not be null"Code:<int-ftp:inbound-channel-adapter id="ftpInbound" channel="ftpChannel" session-factory="ftpClientFactory" charset="UTF-8" auto-create-local-directory="true" delete-remote-files="false" filename-pattern="*.CSV" remote-directory="" local-directory="LOCALDIRECTORY"> <int:poller cron="CRON"/> </int-ftp:inbound-channel-adapter>
How do I specify the adapter to list the current directory?
I've tried the obvious "." but that does not seem to work
Thanks in advance, David


Reply With Quote
