Friday, December 19, 2014

#361 SOA 12c FTP adapter example

Here is a very simple example of using the ftp adapter.

I begin by downloading FileZilla Server and Client.

I then create 2 groups of the ftp server - admins and users

Then come 2 users - niall and admin
Passwords: welcome1

I also set up the shared folders -

Here is my file structure - I added the folder SharedFolder with its two sub-directories.

Configure the FTP Adapter via the WLS console.

I create a new outbound connection eis/Ftp/ncFTPAdapter

Here I added/changed the following -

Here I set Password to welcome1 (The ftp user password)
Regarding ListParserKey - default in UNIX, I changed this to win.

Note: Port defaults to 21

Here I set
ServerType to win
Username to niall

I then update the FTP Adapter -

Now I create the composite in JDeveloper -

This will be a simple BPEL process that "puts" an input order to the ftp server.

The xsd -

I now add the ftp adapter -

Now Invoke from the BPEL process -

Deploy and Test

Check the ftp Server directory /SOAFTPOut

Next level - FTP in and FTP Out

I will read from the /SOAFTPIn directory and write to the /SOAFTPOut directory on my FTP Server.

I created the ftpService on the left and a new BPEL process ProcessFTPOrder.

The service is configured as follows -

All the BPEL process does is read in the file and then put it to the out directory on the FTP Server

I test by copying one of the output files from the /SOAFTPOut directory to the
/SOAFTPIn directory.

Kudos to whoever wrote the following - it was a great start.

No comments: