1
我正在尝试使用gzip压缩我正在写入系统磁盘的xml文件。这可以通过使用WSO2 ESB来实现吗?我目前的配置是这样的:如何使用WSO2 ESB从xml文件制作gzip?
<api xmlns="http://ws.apache.org/ns/synapse" name="test" context="/test">
<resource methods="GET" uri-template="/test*">
<inSequence>
<call>
<endpoint template="TestEndpoint"/>
</call>
<property name="transport.vfs.ReplyFileName"
value="test.xml')"
scope="transport"/>
<property name="OUT_ONLY" value="true"/>
<property name="FORCE_SC_ACCEPTED" value="true" scope="axis2"/>
<property name="Content-Encoding" value="gzip" scope="transport"/>
<call>
<endpoint>
<address uri="vfs:file:///home/esb/test"/>
</endpoint>
</call>
<property name="OUT_ONLY" value="true"/>
<property name="FORCE_SC_ACCEPTED" value="true" scope="axis2"/>
<send/>
</inSequence>
</resource>
</api>
配置似乎没问题。你有错误吗? –
不,这个配置只生成xml文件,我希望它被归档为gzip。 – zygimantus
所以你需要创建一个gz归档文件,里面有test.xml文件。 –