Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jquery-ui/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java spring集成的使用';s模式验证器?_Java_Spring_Spring Integration - Fatal编程技术网

Java spring集成的使用';s模式验证器?

Java spring集成的使用';s模式验证器?,java,spring,spring-integration,Java,Spring,Spring Integration,我不熟悉spring集成。我有以下要求 轮询文件夹(文件系统) 获取XML文件 根据XSD进行验证 如果无效,请将其移动到其他文件夹 如果有效,则调用服务激活器,它将xml文件作为输入发送到rest-ful web服务 我有以下代码: <int-file:inbound-channel-adapter auto-create-directory="true" channel="contentChannel" id="inBoundChannelAdapter" directory="${

我不熟悉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分。请帮助我如何实现它


    谢谢

    步骤4+5正是验证过滤器的丢弃通道和输出通道的用途。只需将出站通道适配器与discard通道连接,即可将无效文档写入文件夹。将service activator连接到输出通道