0

複数の異なるアドレスにリクエストを送信する必要があります。成功するものもあれば、エラーを返すものもあります。この応答のログを書き込む必要があります。応答メッセージを1つずつ処理する必要があると思います。これを順不同で行う方法。私のサービス構成は次のとおりです。

<proxy xmlns="http://ws.apache.org/ns/synapse" name="CloneTest" transports="https,http" statistics="disable" trace="disable" startOnLoad="true">
   <target>
      <inSequence>
         <clone id="12345">
            <target>
               <endpoint>
                  <address uri="address1" format="pox" />
               </endpoint>
            </target>
            <target>
               <endpoint>
                  <address uri="address2" format="pox" />
               </endpoint>
            </target>
            <target>
               <endpoint>
                  <address uri="address3" format="pox" />
               </endpoint>
            </target>
         </clone>
      </inSequence>
      <outSequence>
         <log level="full" />
         <send />
      </outSequence>
   </target>
</proxy>

よろしくお願いします。

4

1 に答える 1

0

次の方法を試すことができます。まず、複製されたリクエストの送信先となる3つの宛先に対応して、ESBに「ep1」、「ep2」、「ep3」の3つのエンドポイントを作成します。次に、以下に示すように、プロキシサービス構成内のこれらのエンドポイントを参照します。

<proxy xmlns="http://ws.apache.org/ns/synapse" name="CloneTest" transports="https,http" statistics="disable" trace="disable" startOnLoad="true">
   <target>
      <inSequence>
         <clone id="12345">
            <target endpoint="ep1">
            <target endpoint="ep2">
            <target endpoint="ep3">
         </clone>
      </inSequence>
      <outSequence>
         <log level="full" />
         <send />
      </outSequence>
   </target>
</proxy>
于 2012-07-29T18:49:26.993 に答える