Creating the Outbound Oracle FTP Adapter Service Wiring Services Creating the Routing Rule

Oracle JCA Adapter for FilesFTP 4-127 Figure 4–84 The JDeveloper - Composite.xml

4.5.3.7 Creating the Routing Rule

Perform the following steps to create a routing service:

1. Double-click the ReadFile_RS routing service. The Read operation is listed in the

Operations pane, as shown in Figure 4–85 . 4-128 Oracle Fusion Middleware Users Guide for Technology Adapters Figure 4–85 The JDeveloper - ReadFile_RS Routing Service Page 2. Click the + sign to the left of Filter Expressionto expand the routing rule.

3. Click the icon that appears at the end of the Transform Using field. The Request

Transformation Map dialog is displayed, as shown in Figure 4–86 . Figure 4–86 The Request Transformation Map Dialog

4. Select Create New Mapper File and click OK.

A Root-Element_To_Root-Element.xsl tab is added to JDeveloper. This tab enables you to graphically create a document transformation file to convert the structure of the file data to a canonical data structure.

5. Drag and drop the imp1:Address source element to the imp1:Address target

element. The Auto Map Preferences dialog is displayed.

6. From the During Auto Map options, deselect Match Elements Considering their

Ancestor Names.

7. Click OK.

8. From the File menu, click Save.

Oracle JCA Adapter for FilesFTP 4-129

4.5.3.8 Deploying with JDeveloper

You must deploy the application profile for the SOA project and the application you created in the preceding steps. To deploy the application profile using JDeveloper, perform the following steps:

1. Create an application server connection. For more information, see

Section 2.7, Creating an Application Server Connection for Oracle JCA Adapters.

2. Deploy the application. For more information, see

Section 2.8, Deploying Oracle JCA Adapter Applications from JDeveloper.

4.5.3.9 Run-Time Task

At run time, copy a text file to the polling directory. Once the Oracle File Adapter picks the file, the file is written to the directory that you specified at design time.

4.5.4 Oracle File Adapter Scalable DOM

This use case demonstrates how a scalable DOM process uses the streaming feature to copymove huge files from one directory to another. The streaming option is not supported with DB2 hydration store. This use case includes the following sections: ■ Section 4.5.4.1, Prerequisites ■ Section 4.5.4.2, Designing the SOA Composite ■ Section 4.5.4.3, Creating the Inbound Oracle File Adapter Service ■ Section 4.5.4.4, Creating the Outbound Oracle File Adapter Service ■ Section 4.5.4.5, Wiring Services and Activities ■ Section 4.5.4.6, Deploying with JDeveloper ■ Section 4.5.4.7, Monitoring Using Fusion Middleware Control Console

4.5.4.1 Prerequisites

To perform the streaming large payload process, you require the following files from the artifacts.zip file contained in the Adapters-103FileAdapterScalableDOM sample: ■ artifactsschemasaddress-csv.xsd ■ artifactsinputaddress-csv-large.txt You can obtain the Adapters-103FileAdapterScalableDOM sample by accessing the Oracle SOA Sample Code site, and by selecting Adapters tab:

4.5.4.2 Designing the SOA Composite

You must create a JDeveloper application to contain the SOA composite. To create an application and a project for the use case, perform the following:

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

Generic Application - Name your application page is displayed.

2. Enter SOA-ScalableDOM in the Application Name field, and click Next. The

Create Generic Application - Name your project page is displayed.

3. Enter ScalableDOM in the Project Name field.

4-130 Oracle Fusion Middleware Users Guide for Technology Adapters

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

it to the Selected list.

5. Click Next. The Configure SOA settings dialog appears.

6. Select Composite With BPEL in the Composite Template box, and click Finish.

The SOA-ScalableDOM application and ScalableDOM project appears in the Application Navigator and the Create BPEL Process - BPEL Process page is displayed.

7. Enter BPELScalableDOM in the Name field, select Define Service Later from the

Template box.

8. Click OK. The SOA-ScalableDOM application and the ScalableDOM project

appears in the design area.

9. Copy the address-csv.xsd file to the xsd directory in your project see

Section 4.5.4.1, Prerequisites for the location of this file.

4.5.4.3 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 and drop File Adapter from the Component Palette to the Exposed Services

swim lane. The Adapter Configuration Wizard Welcome page is displayed.

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

3. Enter ScalableDOMIn 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

Operation page is displayed.

6. Select Read File, and check Use File Streaming, and click Next. The File

Directories page is displayed.

7. Enter the physical path for the input directory. The File Filtering page is displayed.

8. Enter .txt in the Include Files With Name Pattern field, click Next. The File

Polling page is displayed.

9. Click Next. The Messages page is displayed.

10. Click Browse For Schema File that appears at the end of the URL field. The Type

Chooser dialog is displayed.

11. Click Project Schema Files, address-csv.xsd, and Root-Element, as shown in

Figure 4–87 .