如何使用代理的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