wso2 - Can we store a string in a text file in wso2esb? -


i have text file on local system wish append data in particular file synchronously.

i have tried many ways, it's not working.

esb has future in oracle soa. can add in file adapter. in esb it's neither giving errors nor expected result.

my configuration this:

<proxy xmlns="http://ws.apache.org/ns/synapse" name="filewrite" transports="http,vfs" statistics="disable" trace="disable" startonload="true">   <target>      <insequence>         <log>            <property name="out_only" value="true"/>         </log>      </insequence>      <outsequence>         <log>            <property name="out_only" value="true"/>         </log>         <payloadfactory>            <format>               <error>error404</error>            </format>         </payloadfactory>         <send>            <endpoint>               <address uri="vfs:file:///home/youtility2/desktop/errorlog"/>            </endpoint>         </send>      </outsequence>   </target>   <parameter name="transport.vfs.replyfileuri">file:///home/user/test/out? transport.vfs.append=true</parameter>   <parameter name="transport.pollinterval">10</parameter>   <parameter name="transport.vfs.filenamepattern">errorlog.text</parameter>   <parameter name="transport.vfs.contenttype">text/xml</parameter>   <parameter name="transport.vfs.actionafterfailure">move</parameter>   <parameter name="transport.vfs.replyfilename">errorlog.xml</parameter>   <description></description> </proxy> 

actually kept log mediator in outsequence. insequence mediator not sending data in outsequence process not forwarding outsequence. that's why think above configuration not working.

any reference this?

i tried above configuration in insequence also. it's giving errors this:

error - axis2sender unexpected error during sending message out org.apache.axis2.axisfault: vfs transport doesn't support synchronous responses. please use appropriate (out only) message exchange pattern

please refer link.

the issue is, setting property inside log mediator predefined property, (ie:out_only) used indicate request "out-only" request. so, system, wont expect response back. why, not getting in outsequence. not use predefined properties in log mediator,which cause issues.

keep text in log meditaor indictae flow of message. eg:

  <insequence>         <log>            <property name="insequenceeeeeee" value="********"/>         </log>      </insequence> 

like wise keep different descriptive log in outsequence , see whether getting message there, without issue.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -