Prerequisites Creating a Mediator Application and Project

Oracle JCA Adapter for FilesFTP 4-125

6. Select Composite With Mediator in the Composite Template box.

7. Click Finish. The Create Mediator - Mediator Component page is displayed.

8. Enter FileRead_RS in the Name field.

9. Select Define Interface Later in the Template list, and then click OK. The

FileFTP_RW application and the FileRead_FTPWrite project appear in the design area.

4.5.3.3 Importing the Schema Definition .XSD Files

Perform the following steps to import the XSD files that define the structure of the messages:

1. Create a Schema directory and copy the address-csv.xsd file to this directory

see Section 4.5.3.1, Prerequisites for the location of this file.

2. In the Application Navigator, select FileRead_FTPWrite.

3. From the File menu, select Import. The Import dialog is displayed.

4. From the Select What You Want to Import list, select Web Source, and then click

OK. The Web Source dialog is displayed.

5. To the right of the Copy From field, click Browse. The Choose Directory dialog is

displayed.

6. Navigate to the Schema directory and click Select. The Web Source dialog with

the directory is displayed.

7. Click OK.

4.5.3.4 Creating the Inbound Oracle File Adapter Service

Perform the following steps to create an inbound Oracle File Adapter service to read the file from a local directory 1. Drag a File Adapter service from Components Palette to the design area. The Adapter Configuration Wizard Welcome page is displayed.

2. Click Next. The Service Name page is displayed.

3. Enter ReadFile in the Service Name field.

4. Click Next. The Adapter Interface page is displayed.

5. Click Next. The Operation page is displayed.

6. Select Read File and click Next. The File Directories page is displayed.

7. Select Physical Path option, and click Browse and select a polling directory.

8. Click Next. The File Filtering page is displayed.

9. Enter .txt in the Include Files with Name Pattern field and click Next. The File

Polling page is displayed.

10. Click Next. The Messages page is displayed.

11. Click the Browse For Schema File button at the end of the URL field. The Type

Chooser dialog is displayed.

12. Select Project Schema Files, address-csv.xsd, and then Root-Element.

13. Click OK.

14. Click Next in the Messages page. The Finish page is displayed.

4-126 Oracle Fusion Middleware Users Guide for Technology Adapters

15. Click Finish. A ReadFile adapter service is created.

4.5.3.5 Creating the Outbound Oracle FTP Adapter Service

Perform the following steps to create an outbound Oracle FTP Adapter service to write the file to an FTP server:

1. Drag an FTP Adapter service from Components Palette to the design area. The

Adapter Configuration Wizard Welcome page is displayed.

2. Click Next. The Service Name page is displayed.

3. Enter WriteFTP in the Service Name field.

4. Click Next. The Adapter Interface page is displayed.

5. Select Define from operation and schema specified later, and click Next. The

FTP Server Connection page is displayed.

6. Specify the JNDI Name of the FTP Server in the FTP Server JNDI Name field and

click Next. The Operation page is displayed. 7. Select Ascii option as File Type. 8. Select Put File option as the Operation Type and click Next. The File Configuration page is displayed.

9. Specify the directory to which file must be written in the Directory for Outgoing

Files physical path field.

10. Specify the naming convention for the output file name in the File Naming

Convention field. For example, po_SEQ.txt.

11. Click Next. The Messages page is displayed.

12. Click the Browse For Schema File button at the end of the URL field. The Type

Chooser dialog is displayed.

13. Select Project Schema Files, address-csv.xsd, and then Root-Element.

14. Click OK.

15. Click Next in the Messages page. The Finish page is displayed.

16. Click Finish. A WriteFTP adapter service is created.

4.5.3.6 Wiring Services

You have to assemble or wire the three components that you have created: Inbound Oracle File Adapter service, Mediator component, Outbound Oracle FTP Adapter reference. Perform the following steps to wire the components: 1. Drag the small triangle in the ReadFile in the Exposed Services area to the drop zone that appears as a green triangle in the Mediator component in the Components area. 2. Drag the small triangle in the Mediator component in the Components area to the drop zone that appears as a green triangle in the WriteFTP in the External References area. The JDeveloper composite.xml appears, as shown in Figure 4–84 .