【发布时间】:2012-12-05 12:51:41
【问题描述】:
我是 Spring 集成的新手。我有以下要求。
- 轮询文件夹(文件系统)
- 获取 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 点以上。请帮助我如何实现它?
谢谢!
【问题讨论】:
标签: java spring spring-integration