2012-08-04 25 views
2

我使用克隆向不同的服務器發送請求,並在outSequence中使用聚合。它可以收到所有回覆。有些可能會成功,有些可能會迴應錯誤。但我不知道哪個服務器響應錯誤。我想我需要得到URL任何響應消息。如何在outSequence中獲取URL?

任何人都可以幫到我嗎?

我的服務配置代碼是在這裏:

<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="http://172.21.11.21:28888/usm/services/receiveMsg" format="pox" /> 
       </endpoint> 
      </target> 
      <target> 
       <endpoint> 
        <address uri="http://172.21.11.22:28888/usm/services/receiveMsg" format="pox" /> 
       </endpoint> 
      </target> 
     </clone> 
     </inSequence> 
     <outSequence> 
      <aggregate> 
       <completeCondition> 
        <messageCount min="10" max="10"/> 
       </completeCondition> 
       <send/> 
     </outSequence> 
    </target> 
</proxy> 

最好的問候。

回答

0

您可以使用以下屬性檢索遠程地址/主機。用於根據這些值進行過濾。

<property name="Remote address --> " expression="get-property('axis2','REMOTE_ADDR')"/> 
    <property name=" Remote host ---->" expression="get-property('axis2','REMOTE_HOST')"