Problem:
Files which do not adhere to input file schemas should be rejected or moved to specified folder other than archive folder in ESB.
Solution:
For this, first create an ESB project. Add a Read file Adapter to it. Now to set the rejectedMessageHandlers property, we need to open the <Read adapter name>.esbsvc file. This file should be present under ESB project folder.
Add the following code just after the closing tag of invocation i.e. </invocation> and just before the </service> tag.
<endpointProperties>
<property name="rejectedMessageHandlers" value="file://C:\SOADir\reject"/>
</endpointProperties>
Here,
C:\SOADir\reject is my directory where I want my rejected files to come.
Note: If at anytime you try to refresh anything in the project, this property gets omitted automatically. So be sure to add it again in .esbsvc file if you are refreshing anything in the project.
No comments:
Post a Comment