Synchronous Read File
Operation reads the current contents of a file.
Create a new SOA Project
Provide Project Name as
SynchRead
As Synchronous read file is an Outbound Operation,
right click on external references select
Insert->File Adapter as shown below.
Then you will see welcome page of file adapter
configuration wizard.
Provide Service Name as SynchRead.
Select Operation Type as Synchronous Read File and
click on Next.
Browse for the Directory in which your file is there to read, also browse for
the archive folder and click on Next.
Provide the file name that you want to read and click
on Next.
Now, you need to build XML using Native formant Builder.
Select as shown below.
Browse for the file that you want to read as shown below.
As the file contains only one record select
1st option and click on next.
Provide Target Namespace and enter a name for element that will represent
record as shown below.
Specify Delimiters and click on next.
Provide proper names for the elements as shown
below.
Test the schema as shown.
We have completed generating native format.
We have finished defining the File Adapter Service.
Click On Finish.
Create an XML Schema as shown below and click on
OK.
Provide filename, Target namespace, prefix as shown below.
Create BPEL Process .
Provide Name, and select template as synchronous BPEL
Process,Browse for the Input and Output XSD’s
Inside the Bpel Drag and drop Invoke activity as shown below.
Create Input and output variables by clicking on “+”
symbol
Drag & drop Assign activity as shown.
For triggering this service just map the input
variable to invoke input variable as shown.
<!--[endif]-->
Drag and drop transform activity to map the elements
from Invoke output variable to output variable.
Map the elements as shown below.
Now Deploy this Project,Give Input as SynchRead to trigger the
service.
Now we can see that the file has been read and the
file will be deleted successfully from File Read folder and will be
placed in File Archive Folder.
HappyLearning
By DeepthiReddy
No comments:
Post a Comment