file adapter murali

41
Configuring File-Adapter In SOA Suite The File adapter enables a BPEL process or Oracle Mediator to exchange (read and write) files from a local Directory on the File System to another Local directory. The file contents can be in both XML and non-XML data formats. Steps for reading a FILE 1) Creating new SOA project 2)Select empty console so that we can use any composite

Upload: murali-konduru

Post on 10-Nov-2015

236 views

Category:

Documents


0 download

DESCRIPTION

used for file adapter configuration

TRANSCRIPT

Configuring File-Adapter In SOA SuiteThe File adapter enables a BPEL process or Oracle Mediator to exchange (read and write) files from a local Directory on the File System to another Local directory. The file contents can be in both XML and non-XML data formats.

Steps for reading a FILE1) Creating new SOA project

2)Select empty console so that we can use any composite

3) Drop File-Adapter to the exposed services then we will get below screen.

4) Give any service name

5) If WSDL is there choose second option otherwise go with first option.

6) Select the required operation and give an operation name

7) Give the incoming Directory path from where the file is read.

8) Giving the file pattern which we are reading.

9) File polling : In how much time we have to get the response will be decided by using polling frequency option, default it is one minute.

10)If we dont know what exactly the schema we need to select Define schema for native format which is shown in below screen shot, otherwise browse for the schema location in the URL text field given.

Based on our file content we need to choose one of the option below.

Next we need to browse the text file which we want to read.

Enter element name containing multiple records and name for element that will represent record.

Change the delimiter based on the content present in the file.

Change the name, type and delimiter by clicking in the particular field.

Generated native format schema.

Testing the schema.

File Adapter created.

Now Dragging the BPEL process into the components to make a connection with the File Adapter, Select template based on the requirement i.e., either synchronous, asynchronous, one way BPEL process or Based on WSDL. Deselect Expose as a SOAP service.

Connect File Adapter and BPEL process with a wire.

Double click on BPEL process and write the logic you want over there here is the sample logic.

There are two ways in which we can deploy an application.1) Deploying the application in the console by generating the jar file of the project.Right click on a project and select deploy as project name then follow these steps

After deploying jar file will be generated in the deploy folder of the project.DEPLOYMENT IN CONSOLE

Project deployed successfully..

Instance created.

2)Deploying directly from Jdeveloper

Deployment successful.

TROUBLESHOOTING STEPS1) Input File not in the specified formatProblem:If the input file does not contain the delimiters as specified while declaration then there will be a Translation Exception raised. Polling will be done and Instance will not be created.

Solution:Make sure that the Input file should be as mentioned in delimiters.2) File Moved and instance not CreatedFile copied into the location.

When we refreshed the above screen after 1minute file disappears.

Even though no instance is created in the em-console for the project.

This is because some other applications might have accessing i.e, polling to the same location see that every other application that is polling to the same location should be in shutdown mode.Below two projects are polling to the same location and are in active mode.

SOLUTIONShut downing the other projects polling to same location.

After shut downing all other projects place the file in the same location instance will be created.

ABOUT AUTHORNaresh NukalaSoftware Engineer TraineeSunera Technologies.

Software Engineer Trainee undergoing Training in Fusion Middleware. Well versed with C, OOPS.Interested to learn and understand new things. Hobbies are Playing Cricket, Chess.