0

多くの添付ファイルをファイル システムに保存するのが好きです。このために、私はこのチュートリアルで説明されている方法を使用しています: http://wso2.com/library/knowledge-base/2011/06/ Saving-mtom-attachments-using-vfs-transport

動作していますが、アレルファイルを同じファイル名で保存しても意味がないと思います。すべてのファイルに新しいファイル名が必要なため、これは機能しません。

 <send>
   <endpoint name="endpoint_urn_uuid_121B17550AB61F010217054386886961-1720160132">
      <address uri="vfs:file:///home/amila/temp/vfs/woden-impl-dom-1.0-SNAPSHOT.jar"/>
   </endpoint>
 </send>

次に、エンドポイント テンプレートに関するこの質問を見つけました: WSO2 の動的エンドポイント

<send>
  <endpoint template="TemplateEndPoint">
    <parameter name="uri" value="http://localhost:8080/axis2/services/TaskService.TaskServiceHttpEndpoint/getTask" />
    <parameter name="name" value="Testing" />
  </endpoint>
</send>

うまくいけば、このエンドポイントにいくつかのパラメーターを与えることができますが、値のみで式はありませんか? たとえば、ファイル名をプロパティに保存し、このファイル名をエンドポイント URI として使用できるように、URI の式を指定する必要があります。これは可能ですか?たとえば、次のようなものです。

<send>
  <endpoint template="TemplateEndPoint">
    <parameter name="uri" expression="get-property('fileendpoint')" />
    <parameter name="name" value="Testing" />
  </endpoint>
</send>
4

1 に答える 1

0

次のコードを試してください。

<property name="transport.vfs.ReplyFileName"
                  expression="fn:concat(get-property('ID'), '.xml')"
                  scope="transport"/>
        <property name="OUT_ONLY" value="true"/>
        <send>
           <endpoint>
              <address uri="vfs:file:///D:/Test/files/output/"/>
           </endpoint>
        </send>
于 2013-07-09T08:51:14.297 に答える