sequence - wso2 : ESB faultsequence

标签 sequence fault wso2-esb

如何在esb中使用proxy的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>

请指导我!

最佳答案

当您的端点 1 处于非事件状态时,它会返回一个 soap 错误,您希望它转到错误序列。但目前故障序列被视为响应并发送给客户端(soap ui)。

在 WSO2 ESB 4.5.0 之后,添加了一个新属性 FORCE_ERROR_ON_SOAP_FAULT。通过设置此属性,soap 错误将被定向到错误序列。您可以在故障序列中执行下一个逻辑(例如调用另一个序列)。

引用 [1] 示例代理服务。

[1] http://maharachchi.blogspot.com/2012/09/now-you-can-send-soapfaults-to-fault.html

关于sequence - wso2 : ESB faultsequence,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16119195/

相关文章:

memory - 判断内存位置是否在 CPU 缓存中

WSO2 响应二进制文件为什么?

wso2 - 如果请求正文中不存在属性,是否可以为属性中介器设置默认值?

string - String类型不符合协议(protocol)sequencetype

arrays - swift 初学者 3 : How to find pairs in array that add up to given number

c - 是什么导致我出现段错误(核心已转储)

c - 用C语言打开文件时出现段错误?

php - 根据另一列的值按不同列排序

angular - 如何在 Angular 7 中使用管道强制执行 http 请求中的顺序

java - WSO2ESB 突触处理程序