1

私の問題は、エラーの詳細を含むデータ、json、または文字列をフロントエンドまたはモバイルアプリから取得していることです。ローカルシステムの単一のtxtファイルにすべての詳細を追加する必要があります。これを行うにはどうすればよいですか? vfs trnsport を使用して、このコードで試してみましたが、エラーが発生しました。私の設定は次のとおりです。

<proxy xmlns="http://ws.apache.org/ns/synapse" name="FileWrite" transports="https,http" statistics="disable" trace="disable" startOnLoad="true">
  <target>
     <inSequence>
        <log level="custom">
           <property name="sequence" value="fileWriteSequence"/>
        </log>
        <log>
           <property name="transport.vfs.ReplyFileName" expression="fn:substring-after(get-property('MessageID'), 'urn:uuid:')"/>
           <property name="OUT_ONLY" value="true"/>
        </log>
        <send>
           <endpoint>
              <address uri="///home/youtility2/Desktop/Errorlog"/>
           </endpoint>
        </send>
     </inSequence>
     <outSequence>
        <send/>
     </outSequence>
  </target>
  <parameter name="transport.vfs.ContentType">text/plain</parameter>
  <description></description>
</proxy>

esb 側からのエラースロー

2013-04-01 15:58:04,707] ERROR - ClientUtils The system cannot infer the transport information from the ///home/youtility2/Desktop/Errorlog URL.
[2013-04-01 15:58:04,708] ERROR - Axis2Sender Unexpected error during sending message out
org.apache.axis2.AxisFault: The system cannot infer the transport information from the ///home/youtility2/Desktop/Errorlog URL.
       at org.apache.axis2.description.ClientUtils.inferOutTransport(ClientUtils.java:81

) 参考文献を教えてください。

4

2 に答える 2

1

既存のファイルにデータを追加するには、out-file URI に「transport.vfs.Append=true」を追加する必要があります... これに関するスレッドが stackoverflow にあります [1] を参照してください。VFS に関する詳細については、[2] を参照してください。

[1]応答メッセージをテキスト ファイルに追加する方法は?

[2] http://docs.wso2.org/wiki/display/ESB403/VFS+Transport

よろしく、

モハン

于 2013-04-01T12:57:18.240 に答える