文件未通过HTTP连接器移动到目录Mule ESB

时间:2015-03-18 06:57:45

标签: file http mule esb connector

我试图将文件从一个端点发送到另一个端点(例如,在一个端点下面有两个流)。

文件成功结束,但没有移动到备份目录。在这种情况下,他们会在超时后再次出门。一次又一次。怎么了?使用FTP连接器的相同配置效果最佳。

<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:file="http://www.mulesoft.org/schema/mule/file" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
    xmlns:spring="http://www.springframework.org/schema/beans" version="CE-3.5.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/current/mule-file.xsd">
    <flow name="temptestFlow1" doc:name="temptestFlow1">
        <file:inbound-endpoint path="/Data/Input" moveToDirectory="/Data/Backup" responseTimeout="10000" doc:name="File"/>
        <logger level="INFO" doc:name="Logger"/>
        <http:outbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" method="POST" doc:name="HTTP"/>
    </flow>
    <flow name="temptestFlow2" doc:name="temptestFlow2">
        <http:inbound-endpoint exchange-pattern="one-way" host="localhost" port="8081" doc:name="HTTP"/>
        <file:outbound-endpoint path="/Data/Output" responseTimeout="10000" doc:name="File"/>
    </flow>
</mule>

1 个答案:

答案 0 :(得分:0)

尝试将文件连接器配置添加到您的mule配置。

 <file:connector name="myFileConnector" autoDelete="true" streaming="false" validateConnections="true"></file:connector>   

希望这有帮助。