Recursive Processing of Files Within Directories in Oracle FTP Adapter

Oracle JCA Adapter for FilesFTP 4-27 For Microsoft Windows NT FTP servers, the defaultDateFormat is MM-dd-yy hh:mma, for example, 03-24-09 08:06AM DIR oracle. ■ recentDateFormat : This parameter specifies the recent date format value. On the FTP server, this is the value for files that were recently created. The default value for this parameter is MMM d HH:mm as most UNIX-type FTP servers return the last modified date for recently created files in MMM d HH:mm format, for example, Jan 31 21:32. You can find the default date format for your FTP server by using the ls -l command from an FTP command-line client. For example, ls -l on a vsftpd server running on Linux returns the following: 150 Here comes the directory listing. -rw-r--r-- 1 500 500 377 Jan 30 21:32 address.txt -rw-r--r-- 1 500 500 580 Jan 3121:32 container.txt ............................................................................... ...... For Microsoft Windows NT FTP servers, the recentDateFormat parameter is in the MM-dd-yy hh:mma, format, for example, 03-24-09 08:06AM DIR oracle. ■ serverTimeZone : The server time zone, for example, AmericaLos_Angeles. If this parameter is set to blank, then the default time zone of the server running the Oracle FTP Adapter is used. ■ listParserKey: Directs the Oracle FTP Adapter on how it should parse the response from the LIST command. The default value is UNIX, in which case the Oracle FTP Adapter uses a generic parser for UNIX-like FTP servers. Apart from UNIX, the other supported values are WIN and WINDOWS, which are specific to the Microsoft Windows NT FTP server. ■ serverLocaleLanguage : This parameter specifies the locale construct for language. ■ serverLocaleCountry : This parameter specifies the locale construct for country. ■ serverLocaleVariant : This parameter specifies the locale construct for variant. Configure the Parameters in the Deployment Descriptor The standard date formats of an FTP server are usually configured when the FTP server is installed. If your FTP server uses a format MMM d yyyy for defaultDateFormat and MMM d HH:mm for recentDateFormat, then your Oracle FTP Adapter must use the same formats in its corresponding deployment descriptor. If you enter ls -l from a command-line FTP, then you can see the following: 200 PORT command successful. Consider using PASV. 150 Here comes the directory listing. -rw-r--r-- 1 500 500 377 Jan 22 21:32 1.txt -rw-r--r-- 1 500 500 580 Jan 22 21:32 2.txt ................................................................................. Note: The locale language for the FTP server can be different from the locale language for the operating system. Do not assume that the locale for the FTP server is the same as the locale for the operating system it is running on. You must set the serverLocaleLanguage, serverLocaleCountry, and serverLocaleVariant parameters in such cases. 4-28 Oracle Fusion Middleware Users Guide for Technology Adapters This is the recentDateFormat parameter for your FTP server, for example MMM d HH:mm Jan 22 21:32. Similarly, if your server has an old file, then the server does not show the hour and minute part and it shows the following: -rw-r--r-- 1 500 500 377 Jan 22 2005 test.txt This is the default date format, for example MMM d yyyy Jan 22 2005. Additionally, the serverTimeZone parameter is used to by the Oracle FTP Adapter to parse time stamps for FTP server running in a specific time zone. The value for this is either an abbreviation such as PST or a full name such as AmericaLos_Angeles. Additionally, the FTP server might be running on a different locale. The serverLocaleLanguage, serverLocaleCountry, and serverLocaleVariant parameters are used to construct a locale from language, country, variant where ■ language is a lowercase two-letter ISO-639 code, for example, en ■ country is an uppercase two-letter ISO-3166 code, for example, US ■ variant is a vendor and browser-specific code. If these locale parameters are absent, then the Oracle FTP Adapter uses the system locale to parse the time stamp. Additionally, if the FTP server is running on a different system than the SOA suite, then you must handle the time zone differences between them. You must convert the time difference between the FTP server and the system running the Oracle FTP Adapter to milliseconds and add the value as a binding property:timestampOffset in the composite.xml. For example, if the FTP server is six hours ahead of your local time, you must add the following endpoint property to your service or reference: service name=FTPDebatchingIn interface.wsdl interface=http:xmlns.oracle.compcbpeladapterftpFTPDebatchingInwsdl.interf aceGet_ptt binding.jca config=DebatchingIn_ftp.jca property name= timestampOffset type=xs:string many=false source= override=may 21600000property binding.jca service. Some FTP servers do not work well with the LIST command. In such cases, use the NLST command for listing, but you cannot process directories recursively with NLST. If you want to use the NLST command, then you must add the following property to the JCA file, for example: ?xml version=1.0 encoding=UTF-8? adapter-config name=FTPDebatchingIn adapter=Ftp Adapter xmlns=http:platform.integration.oracleblocksadapterfwmetadata connection-factory location=eisFtpFtpAdapter UIincludeWildcard=.txt adapterRef= activation-spec className=oracle.tip.adapter.ftp.inbound.FTPActivationSpec ………………………………………….. ………………………………………….. property name=UseNlst value=true activation-spec endpoint-activation adapter-config Oracle JCA Adapter for FilesFTP 4-29

4.2.22 Securing Enterprise Information System Credentials

When a resource adapter makes an outbound connection with an Enterprise Information System EIS, it must sign on with valid security credentials. In accordance with the J2CA 1.5 specification, Oracle WebLogic Server supports both container-managed and application-managed sign-on for outbound connections. At runtime, Oracle WebLogic Server determines the chosen sign-on mechanism, based on the information specified in either the invoking client components deployment descriptor or the res-auth element of the resource adapter deployment descriptor. This section describes the procedure for securing the user name and password for Oracle JCA Adapters by using Oracle WebLogic Server container-managed sign-on. Both, Oracle WebLogic Server and EIS maintain independent security realms. A container-managed sign-on enables you to sign on to Oracle WebLogic Server and also be able to use applications that access EIS through a resource adapter without having to sign on separately to the EIS. Container-managed sign-on in Oracle WebLogic Server uses credential mappings. The credentials user namepassword pairs or security tokens of Oracle WebLogic security principals authenticated individual users or client applications are mapped to the corresponding credentials required to access EIS. You can configure credential mappings for applicable security principals for any deployed resource adapter. To configure credential mappings, you can specify the user names and passwords in the weblogic-ra.xml file for the corresponding adapter or perform the following procedure by accessing the Oracle WebLogic Server Administration Console: 1. Log in to the Oracle WebLogic Server Administration Console.

2. Click Deployments in the Domain Structure pane. The deployed applications and

adapters are displayed, as shown in Figure 4–10 . Figure 4–10 The Oracle WebLogic Server Administration Console - Summary of Deployments Page 4-30 Oracle Fusion Middleware Users Guide for Technology Adapters 3. Click the adapter for which you must create the security credentials. For example, click FtpAdapter. The Settings for FtpAdapter page is displayed, as shown in Figure 4–11 . Figure 4–11 The Oracle WebLogic Server Administration Console - Settings for FTPAdapter Page

4. Click the Security tab. The Settings for FTPAdapter page with the Stand-Alone

Resource Adapter Roles pane displayed, as shown in Figure 4–12 .