How to append response message to a text file?

喜你入骨 提交于 2019-12-25 18:23:30

问题


I need write the response message to a "response.xml" file. And the response should be appended to this file, I set parameter "Append" true, but no use, is completely overwritten every time. Anyone can help me? Thanks and best regards.

<proxy xmlns="http://ws.apache.org/ns/synapse" name="EndpointTest" transports="https,http" statistics="disable" trace="disable" startOnLoad="true">
   <target>
      <inSequence>
         <log level="full" />
      </inSequence>
      <outSequence>
         <log level="full" />
         <send>
            <endpoint>
               <address uri="vfs:file:///usr/local/wso2esb-4.0.3/Log" format="pox" />
               <property name="OUT_ONLY" value="true" />
               <property name="transport.vfs.Append" value="true" />
               <property name="transport.vfs.ReplyFileName" value="response.xml" />
            </endpoint>
         </send>
         <send />
      </outSequence>
      <endpoint>
         <address uri="http://172.21.13.151:18989/aaadc/services/receiveMsg" format="pox" />
      </endpoint>
   </target>
</proxy>

回答1:


Remove the append= true parameter from service level and use with endpoint url eg:

vfs:file:///usr/local/wso2esb-4.0.3/Log?transport.vfs.Append=true 


来源:https://stackoverflow.com/questions/11964965/how-to-append-response-message-to-a-text-file

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!