Prerequisites Oracle File Adapter Complex Structure

Oracle JCA Adapter for FilesFTP 4-177 ■ artifactsschemaspo.xsd ■ artifactsxslInvToPo.xsl ■ artifactsinputinvoice.txt You can obtain the Adapters-104FileAdapterComplexStructure sample by accessing the Oracle SOA Sample Code site, and selecting the Adapters tab.

4.5.8.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-ComplexStructure in the Application Name field, and click Next.

The Create Generic Application - Name your project page is displayed.

3. Enter ComplexStructure in the Project Name field.

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 Create BPEL Process - BPEL Process page is displayed.

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

from the Template box.

8. Click OK. The SOA-ComplexStructure application and the ComplexStructure

project appears in the design area, as shown in Figure 4–140 . Figure 4–140 The JDeveloper - Composite.xml 4-178 Oracle Fusion Middleware Users Guide for Technology Adapters

9. Copy the invoice-nxsd.xsd and po.xsd files to the schema directory in your project

see Section 4.5.8.1, Prerequisites for the location of these files.

10. Copy InvToPo.xsl to the xsl directory of your project see

Section 4.5.8.1, Prerequisites for the location of this file.

4.5.8.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 Complex Structure In 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 click Next. The File Directories page is displayed.

7. Enter the physical path for the input directory and click Next. 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, invoice-nxsd.xsd, and invoice.

12. Click OK. The URL field in the Messages page is populated with the

invoice-nxsd.xsd file.

13. Click Next. The Finish page is displayed.

14. Click Finish. The inbound Oracle File Adapter is now configured and

composite.xml appears, as shown in Figure 4–141 .