2016-11-28 69 views

回答

0

您需要從計時器或其他「觸發器」開始,才能從http站點「獲取」該文件。默認情況下,'from uri =「http ..」'告訴駱駝在http端口上監聽。此外,投票消費者可能會有所幫助。

裁判:http://camel.apache.org/timer.html

裁判:http://camel.apache.org/polling-consumer.html

僞代碼:

from("timer:...") 
.setHeader(Exchange.HTTP_METHOD, constant(org.apache.camel.component.http4.HttpMethods.GET)) 
.to("https4:www....") <-- Note: the return is now the ${body} in Camel 
.to("sftp://...") 
+0

好,actualy我需要將文件從HTTPS服務器傳輸到SFTP服務器,我需要獲得方法那? – user3317519

+0

我編輯我的答案,以提供更多描述性的僞代碼 –

+0

有幫助,我是否需要將https4添加到我的上下文中?我把它作爲depaudency在pom.xml中。 – user3317519