我想使用WSO2 ESB從Web站點下載XML文件。爲了簡單起見,假定URL是靜態的。WSO2 ESB:如何通過HTTP下載文件?
我已經嘗試過VFS作爲代理服務和單個序列沒有成功,並且無法在Internet上找到任何相關資料。
這裏是序列XML:
<sequence xmlns="http://ws.apache.org/ns/synapse" name="download">
<in>
<log level="headers">
<property name="?" value="[download] in: started"/>
</log>
<property name="OUT_ONLY" value="true" scope="default" type="STRING"/>
<property name="transport.vfs.ContentType" value="text/xml" scope="transport" type="STRING"/>
<property name="transport.vfs.FileURI" value="http://static.nvd.nist.gov/feeds/xml/cve/nvdcve-2.0-2013.xml" scope="transport" type="STRING"/>
<log level="headers">
<property name="?" value="[download] in: sending over vfs"/>
</log>
<send>
<endpoint>
<address uri="http://static.nvd.nist.gov/feeds/xml/cve/nvdcve-2.0-2013.xml"/>
</endpoint>
</send>
<log level="headers">
<property name="?" value="[download] in: ended"/>
</log>
</in>
<out>
<log level="headers">
<property name="?" value="[download] out: started"/>
</log>
<send/>
<log level="headers">
<property name="?" value="[download] out: ended"/>
</log>
</out>
</sequence>
那麼,如何通過HTTP下載大文件,WSO2 ESB?
嗨@Inigo Fernandez我有一個要求是我需要允許用戶下載文件,這是我的本地系統,我已經嘗試了上述API,但未能下載文件 我把這個API稱爲 curl - v http:// localhost:8282/services/ecorest/file.xml即使我給出有效的文件名,過程也會進入故障序列 給出的響應爲{「jsonObject」:{「descError」:「」, 「錯誤」: 「真正的」}} – user4045063 2016-02-08 11:08:07