Sync Read and write using DB Adapter
This is the second post about the file adapter, please refer the first post of the file adapter to get more information about the file adapter. We are going to talk about the sync read property of the file adapter.
File adapter use poll mechanism to observe if any file been uploaded to the current folder or not. But there could be cases when we need file to read only when user initiate the process.
Here we need sync property of the file adapter to rescue. Sync property allow file adapter to work as a service which start when its been called. Please download the application from the url for more info.
In Sync read file adapter need exact file name (No pattern) to read. Which make sense as during the sync read operation it should have to provide the file name.
Here are some screenshots of the file adapter.
Here are screenshots of adding a file adapter in sync mode to composite.
1. Adding file adapter to composite.
2. Name your adapter.
3. Keep default and click next.
4. Keep the default and say next.
5. This is important here we need to choose Sync Read file.
6. Now provide file where we need to read and where to archive.
7. Now give exact file name here.
8. Now choose the xsd which will be driven from the file.
Please revisit the application and see the different component there.
Now you can put the sample from the testSuite to the input folder and post that you can instantiate the process from EM or from the SOAPUI.
it will read the records and will provide you total number of count.
Execution & Testing
1. During the execution you can see the file trace as given below. This will reflect as normal service call.
2. If you open up the reply of the program it will tell you total number of employee in the file.
Please let us know feedback also, we want to know the area of issues we will definitely cover in next blogs.
No comments:
Post a Comment