骡子 - 需要在我的骡子请求者中将路径作为变量的FTP端点

时间:2015-08-12 13:03:06

标签: path ftp mule

我还有一个问题,我在Mule Requester项目中无法解决。

我正在尝试根据请求从指定路径中的FTP服务器请求文件。 该路径带有请求,我只需要在/ Incoming / Company123文件夹中获取文件。代码在这里:

    <ftp:endpoint name="ftp_For_Requester_Json" host="${ftp.host}" port="${ftp.port}" path="#['/Incoming/' + flowVars.companyFolder]" user="${ftp.user}" password="${ftp.pwd}" responseTimeout="10000" doc:name="FTP" connector-ref="FTPGlobalConnector"> 
        <file:filename-wildcard-filter pattern="*.json"> </file:filename-wildcard-filter>  
    </ftp:endpoint>
    <mulerequester:request-collection config-ref="Mule_Requester" resource="ftp_For_Requester_Json" doc:name="Mule Requester"></mulerequester:request-collection>  

不幸的是,我还没有做到这一点。代码有什么问题,或者这是对端点或请求者的限制?如果是的话,是否有任何关于如何使其工作的建议?

更新: 我也以这种方式尝试了请求者:

<set-variable variableName="reqesterReference" value="ftp://user:pwd@localhost#[flowVars.folderSource]" doc:name="Variable requestor reference"></set-variable>
<mulerequester:request-collection config-ref="Mule_Requester" resource="#[flowVars.reqesterReference]" doc:name="Mule Requester"></mulerequester:request-collection>

这&#34;出现&#34;工作,但没有返回任何结果,并在超时期限后抛出此异常:

  

org.mule.api.MessagingException:无法接收事件:   DefaultInboundEndpoint {endpointUri = ftp://user:@本地/来电/ 123_Folder,   connector = EEFtpConnector {name = FTPGlobalConnector lifecycle = start   this = 4825372 numberOfConcurrentTransactedReceivers = 4
  createMultipleTransactedReceivers = true connected = true
  supportedProtocols = [ftp] serviceOverrides =},   name =&#39; endpoint.ftp.localhost.Incoming.123.Folder&#39;,mep = ONE_WAY,   properties = {},transactionConfig = Transaction {factory = null,   action = INDIFFERENT,timeout = 0},deleteUnacceptedMessages = false,   initialState = started,responseTimeout = 10000,endpointEncoding = UTF-8,   disableTransportTransformer = false}(超时= 1000)   (org.mule.api.transport.ReceiveException)。消息有效负载的类型为:   NullPayload

0 个答案:

没有答案