我是春季集成的新手。我有以下要求。
- 轮询文件夹(文件系统)
- 获取 XML 文件
- 针对 XSD 进行验证
- 如果它无效将其移动到不同的文件夹。
- 如果它有效,则调用服务激活器,它将 xml 文件作为输入发送到 rest ful web 服务。
我有以下代码:
<int-file:inbound-channel-adapter auto-create-directory="true" channel="contentChannel" id="inBoundChannelAdapter" directory="${someFolder}" prevent-duplicates="true">
<int:poller max-messages-per-poll="1" fixed-rate="10000"/>
</int-file:inbound-channel-adapter>
<int:channel id="contentChannel"/>
<int-xml:validating-filter id="schemaValidator" output-channel="someOutPutChannel" throw-exception-on-rejection="false" schema-location="${schema.location}" input-channel="contentChannel" discard-channel=""/>
在这里,我坚持以上 4 和 5 点。请帮助我如何实现它?
谢谢!