java - Mule - 重试与基本流程的连接

标签 java http soap exception-handling mule

我有一个基本的骡子流程:

HTTP => SOAP => JAVA 类

<mule xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
    xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.6.1"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/cxf http://www.mulesoft.org/schema/mule/cxf/current/mule-cxf.xsd">
    <http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8081" doc:name="HTTP Listener Configuration"/>
    <flow name="test_dynamicsFlow">
        <http:listener config-ref="HTTP_Listener_Configuration" path="/" doc:name="HTTP"/>
        <cxf:jaxws-service doc:name="CXF"/>
        <component doc:name="Java"/>
    </flow>
</mule>

我想在超时重试连接到 SOAP,但我不知道是否可行。

我一直在寻找错误处理连接器:

enter image description here

我应该使用这些连接器来实​​现吗?或者我该如何实现?

最佳答案

您需要使用 until-successful 范围包装您的 HTTP 调用。

例子:

<until-successful objectStore-ref="objectStore" maxRetries="5" secondsBetweenRetries="60" >
    <http:request config-ref="HTTP_Request_Configuration" path="submit" method="POST" />
</until-successful>

引用:https://developer.mulesoft.com/docs/display/current/Until+Successful+Scope

关于java - Mule - 重试与基本流程的连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30562679/

相关文章:

java - 从 HashMap 初始化 EnumMap

java - 在 hibernate 中使用合并后刷新实体实例?

asp.net - 为什么我发送 201 状态,但在客户端收到 302 状态

c# - 在现有 WCF SOAP 服务中添加 Http header 不起作用

javascript - 是否可以使用 jQuery xml 处理程序解析 SOAP 响应?

java - Spring 4.3.0.RELEASE + Hibernate 5.2.0.Final + JPA 存储库

java - 随着线程数量的增加,Levenshtein 距离的并行实现速度会变慢

python - HTTP 引用问题

java - Apache Http 组件 - 设置 cookie

php - wsdl模式和非wsdl模式web服务有什么区别?