Deploying with JDeveloper Monitoring Using Oracle Fusion Middleware Control Console

4-124 Oracle Fusion Middleware Users Guide for Technology Adapters

8. Click the Flow tab to view the process flow. Additionally, click an activity such as

invoke, receive to view the details of an activity.

9. Click ReceiveCSV to display the activity details.

4.5.3 Flat Structure for Mediator

In this use case, Mediator receives the customer data from a file system as a text file, through an inbound Oracle File Adapter service named ReadFile. The ReadFile adapter service sends the message to a routing service named ReadFile_RS. The ReadFile_RS sends the message to the outbound adapter service WriteFTP. The WriteFTP service delivers the message to its associated external application. This use case includes the following sections: ■ Section 4.5.3.1, Prerequisites ■ Section 4.5.3.2, Creating a Mediator Application and Project ■ Section 4.5.3.3, Importing the Schema Definition .XSD Files ■ Section 4.5.3.4, Creating the Inbound Oracle File Adapter Service ■ Section 4.5.3.5, Creating the Outbound Oracle FTP Adapter Service ■ Section 4.5.3.6, Wiring Services ■ Section 4.5.3.7, Creating the Routing Rule ■ Section 4.5.3.8, Deploying with JDeveloper ■ Section 4.5.3.9, Run-Time Task

4.5.3.1 Prerequisites

This example assumes that you are familiar with basic Mediator constructs, such as services, routing service, and JDeveloper environment for creating and deploying Mediator services. To perform the flat structure for Mediator business process, you require the following files from the artifacts.zip file contained in the Adapters-101FileAdapterFlatStructure sample: ■ artifactsschemasaddress-csv.xsd You can see the = Adapters-101FileAdapterFlatStructure sample by accessing the Oracle SOA Sample Code site, and selecting the Adapters tab.

4.5.3.2 Creating a Mediator Application and Project

To create an application and a project for the use case, follow these steps:

1. In the Application Navigator of JDeveloper, click New Application. The Create

Generic Application - Name your application page is displayed.

2. Enter FileFTP_RW in the Application Name field and click Next. The Create

Generic Application - Name your project page is displayed.

3. Enter FileRead_FTPWrite in the Project Name field.

4. In the Available list in the Project Technologies tab, double-click SOA to move it to

the Selected list.

5. Click Next. The Create Generic Application - Configure SOA settings page is

displayed. 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.