ayan117
ayan117

Reputation: 171

How to append response message to a text file?

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>

Upvotes: 0

Views: 632

Answers (1)

Ratha
Ratha

Reputation: 9692

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 

Upvotes: 1

Related Questions