我们可以使用 WSO2ESB 将数据附加到单个文本文件中吗? [英] Can we append the data in single text file using WSO2ESB?
本文介绍了我们可以使用 WSO2ESB 将数据附加到单个文本文件中吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我从移动应用程序或任何前端的某个地方收到错误消息.
I am getting error message from mobile app or somewhere any of front end.
我需要将该消息保存在一个文本文件中.该文件可以存储在我的本地系统中.
I need keep that message in one single text file. That file could be stored in my local system.
如何使用 WSO2ESB 执行此操作?
How can I do this using WSO2ESB?
<proxy xmlns="http://ws.apache.org/ns/synapse" name="AppendFile" transports="https,http" statistics="disable" trace="disable" startOnLoad="true">
<target>
<inSequence onError="fault">
<property name="error_TYPE" expression="//error/text()" scope="axis2" type="STRING"/>
<property name="HTTP_METHOD" value="POST" scope="axis2" type="STRING"/>
<payloadFactory>
<format>
<error></error>
</format>
<args>
<arg expression="get-property('error')"/>
</args>
</payloadFactory>
<send>
<endpoint>
<address uri="//home/desktop/append.txt"/>
</endpoint>
</send>
</inSequence>
<outSequence>
<property name="CONTENT_TYPE" value="application/json" scope="axis2"/>
<log level="full"/>
<send/>
</outSequence>
</target>
<description></description>
</proxy>
但是它给出了传输错误.
But its giving transport error.
我们怎样才能做到这一点?请提出建议.
How can we do this? Please suggest.
推荐答案
您遇到的错误是什么?无论如何,您给出的端点看起来是错误的.它应该以传输协议开头 vfs://
what is the error you got?
Anyway the endpoint you gave looks wrong. It should start with the transport protocol as vfs://
eg: vfs:file:///home/desktop/append.txt
这篇关于我们可以使用 WSO2ESB 将数据附加到单个文本文件中吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文