Wednesday, May 28, 2008

Oracle AS ESB File FTP Adapter Part 1

We are prototyping how Oracle ESB File Transfer with Transformations works. This involves setting up File adapter and FTP (SFTP) adapter.

As always, I like to tackle a smaller piece before moving on. So I went with setting up ESB File adapter first.

Getting ESB File adapter set up is pretty smooth experience. Most of the time was spent on figuring out the exact off set for fix-length file transformation. Setting up ESB File adapter allows me to see how Oracle AS supports Unicode and what file format it supports. The Unicode test is successful. The native format builder works well with CSV file, fixed-length file. ESB console provides Processing Time statistics for each process.

I started out creating a schema file for validating incoming file format. I created a sample file (comma delimited) “sample_input_files\Student_Records_File_utf.csv” which contains all the fields that both output files require, and then feed this sample file into the Native Format Builder.

I then created a schema file for validating outgoing Josten system file format. I created a sample file (comma delimited) “sample_files_for_create_schema\Josten_File.csv” and then feed this sample file into the Native Format Builder. The output file produced is comma delimited Josten_TIMESTAMP.xls.

I also created a schema file for validating outgoing ParisDegree system file format. I created a sample file (fix length) “sample_files_for_create_schema\PARIS_Degree_File.txt” and then feed this sample file into the Native Format Builder. The output file produced is fix length delimited paris_degree_TIMESTAMP.txt.

Now it is time to move on to ESB FTP adapter.

Oracle FTP adapter documentation only provides instruction for setting up FTPS, which is not widely used anymore. UMS doesn’t have any FTP SSL in-house. After more googling and checking around, I decided to fiddle with the $ORACLE_HOME/j2ee/home/application-deployments/default/FtpAdapter/oc4j-ra.xml settings. I discovered that there is option to set useSFTP.

Instead of setting up a SSH server, I decided to test against Trillian SSH server.
The test is done with ESB FTP adapter. I turned on the logging output level to finest for oracle.tip.esb.server.service.impl.inadapter, That is very helpful.

The result is:
I am able to connect using FTP but getting some handshaking errors using SFTP. I checked the SSH config setting on trillion, it seems to allow publickey or password as AllowedAuthentications. I choose using password since it is easier to set up. The error I am getting is:
JCA: Settting up the SFTP connection with Transport provider=[socket]
JCA: Postcall, Closing managed connection.
JCA: The connection variable is null in postCall. This could be because of a call postCall w/o a preceeding call to preCall”

Continued to next blog article...

No comments: