如何使用代理的faultsequence在ESBWSO2:ESB faultsequence
我想,當發生在端點的故障使用faultsequence。例如,我停止使用jconsole的service1,並希望在呼叫代理服務時將消息路由到service2。但是當我使用的soapUI調用代理就顯示故障此消息:系統試圖訪問無效的服務..
<target>
<inSequence >
<send>
<endpoint name="cal" >
<address uri="http://localhost:9763/services/service1/"/>
</endpoint>
</send>
</inSequence>
<faultSequence>
<log level="custom">
<property name="text" value="An unexpected error occured for service"/>
<property name="message" expression="get-property('ERROR_MESSAGE')"/>
</log>
<send>
<endpoint>
<address uri="http://localhost:9763/services/service2/"/>
</endpoint>
</send>
</faultSequence>
請指導我!
謝謝親愛的Dharshana。是的,這是正確的你的假設,但我的次要端點的地址是動態的,我需要一個新的序列(錯誤序列),它加載類中介,並將消息路由到由中介指定的新目標。所以我認爲需要一個錯誤序列。這是真的嗎?因爲故障轉移中的端點是靜態的! – 2013-04-21 06:04:27
可以在故障序列內調用另一個序列。對於您的情況,您需要使用故障順序。您可以設置targer故障序列如下<目標faultSequence =「測試」> outSequence> 那麼你就可以實現測試序列 –
Dharshana
2013-04-21 21:40:38