diff --git a/src/reference/asciidoc/ftp.adoc b/src/reference/asciidoc/ftp.adoc
index f09bdaa5d5..6014d6156c 100644
--- a/src/reference/asciidoc/ftp.adoc
+++ b/src/reference/asciidoc/ftp.adoc
@@ -20,7 +20,7 @@ To use the _FTP_ namespace, add the following to the header of your XML file:
----
xmlns:int-ftp="http://www.springframework.org/schema/integration/ftp"
xsi:schemaLocation="http://www.springframework.org/schema/integration/ftp
- http://www.springframework.org/schema/integration/ftp/spring-integration-ftp.xsd"
+ http://www.springframework.org/schema/integration/ftp/spring-integration-ftp.xsd"
----
@@ -137,7 +137,7 @@ Convenience methods have been added so this can easily be done from a message fl
-
+
@@ -247,7 +247,7 @@ Here is an example that uses a custom Filter implementation.
filter="customFilter"
local-directory="file:/my_transfers">
remote-directory="some/remote/path"
-
+
@@ -299,25 +299,27 @@ This will work for any `ResettableFileListFilter`.
[source, xml]
----
-
-
-
+ session-factory="ftpSessionFactory"
+ channel="requestChannel"
+ remote-directory-expression="'/sftpSource'"
+ local-directory="file:myLocalDir"
+ auto-create-local-directory="true"
+ filename-pattern="*.txt"
+ local-filter="acceptOnceFilter">
+
+
+
-
+
-
+
-
+
----
[[ftp-outbound]]
@@ -428,23 +430,23 @@ The following shows an example of consuming a file as a stream:
[source, xml]
----
+ request-channel="inboundGetStream"
+ command="get"
+ command-options="-stream"
+ expression="payload"
+ remote-directory="ftpTarget"
+ reply-channel="stream" />
-
-
-
-
+
+
+
+
+ expression="payload.mark.toString().equals('END') ? headers['file_remoteSession'].close() : null"/>
----
The file lines are sent to the channel `output`.
diff --git a/src/reference/asciidoc/sftp.adoc b/src/reference/asciidoc/sftp.adoc
index 55904238d2..0f3c2b9d40 100644
--- a/src/reference/asciidoc/sftp.adoc
+++ b/src/reference/asciidoc/sftp.adoc
@@ -25,10 +25,8 @@ xsi:schemaLocation="http://www.springframework.org/schema/integration/sftp
IMPORTANT: Starting with version 3.0, sessions are no longer cached by default.
See <>.
-Before configuring SFTP adapters, you must configure an _SFTP Session
- Factory_.
-You can configure the _SFTP Session
- Factory_ via a regular bean definition:
+Before configuring SFTP adapters, you must configure an _SFTP Session Factory_.
+You can configure the _SFTP Session Factory_ via a regular bean definition:
[source,xml]
----
@@ -195,7 +193,7 @@ Convenience methods have been added so this can easily be done from a message fl
-
+
@@ -269,18 +267,18 @@ The _SFTP Inbound Channel Adapter_ is a special listener that will connect to th
[source,xml]
----
-
+ session-factory="sftpSessionFactory"
+ channel="requestChannel"
+ filename-pattern="*.txt"
+ remote-directory="/foo/bar"
+ preserve-timestamp="true"
+ local-directory="file:target/foo"
+ auto-create-local-directory="true"
+ local-filename-generator-expression="#this.toUpperCase() + '.a'"
+ local-filter="myFilter"
+ temporary-file-suffix=".writing"
+ delete-remote-files="false">
+
----
@@ -346,12 +344,12 @@ If you need a custom filter implementation simply include a reference in your ad
[source,xml]
----
-
+ channel="receiveChannel"
+ session-factory="sftpSessionFactory"
+ filter="customFilter"
+ local-directory="file:/local-test-dir"
+ remote-directory="/remote-test-dir">
+
@@ -384,25 +382,27 @@ This will work for any `ResettableFileListFilter`.
[source, xml]
----
-
-
-
+ session-factory="sftpSessionFactory"
+ channel="requestChannel"
+ remote-directory-expression="'/sftpSource'"
+ local-directory="file:myLocalDir"
+ auto-create-local-directory="true"
+ filename-pattern="*.txt"
+ local-filter="acceptOnceFilter">
+
+
+
-
+
-
+
-
+
----
[[sftp-outbound]]
@@ -627,12 +627,12 @@ Here is an example of a gateway configured for an ls command...
[source,xml]
----
+ session-factory="ftpSessionFactory"
+ request-channel="inbound1"
+ command="ls"
+ command-options="-1"
+ expression="payload"
+ reply-channel="toSplitter"/>
----