Page 1
Mediator example….
My project aim is to read data file(example txt) from one file directory and put in to another file directory…
For reading txt file( Incoming file)I am creating one directory
Ex: D:\krishna
My data file is student.txt
Page 4
Ur composite will look like this
Page 5
Take one file adapter at exposed service side…..
Page 8
You need to add directory for Incoming files…
Page 9
Click on Browse for add directory…
Page 13
Click on native format builder…
To convert txt file to xsd
Page 16
For file name click on browse..
Page 24
Finally click on finish…
Make a wire to file adapter to mediator like this…
For put outgoing data file into directory we will create one directory..
Like
Page 25
D:/write
Take a one more file adapter at reference side,….
Page 30
Now click on browse for schema file…
Page 34
Make a wire to mediator to write file adapter…
Now our task is to route the data by using mediator…
Now double click on mediator…
Page 35
IN filter Expression I am writing condition here…
Page 37
Expand the all root nodes…
Page 38
Now click on Insert into Expression
Page 42
Now we need to transfer the data by using Transformation
Page 43
Save all ….
Now go and deploy …
You can go and check the input directory and output directory…