【问题标题】:Spring Integration WS Gateway with Empty Response具有空响应的 Spring 集成 WS 网关
【发布时间】:2015-10-29 16:13:03
【问题描述】:

我正在使用具有以下属性的“ws:outbound-gateway”,

ignore-empty-responses="false" reply-channel="processReplyChannel"

我也试过了

ignore-empty-responses="FALSE" reply-channel="processReplyChannel"

其实WS回复如下是空的,

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body />
</soap:Envelope>

我的问题是频道有一个 ServiceActivator,它会在出现非肥皂故障回复消息的情况下执行某些操作。但似乎可能缺少某些东西,因为 ws 处理永远不会到达“processReplyChannel”,有没有人暗示如何在没有响应主体的情况下处理成功的 WS 调用?

使用示例配置进行更新。

<int:chain input-channel="inputChainChannel"   id="chainId">
        <int:transformer id="firsttransformer"
            ref="firsttransformer" ></int:transformer>
        <int:transformer ref="beanTramsformer" method="someMethod"></int:transformer>
        <int:transformer id="sencondMarshallingTransfomer" ref="sencondMarshallingTransfomer"></int:transformer>
        <int:object-to-string-transformer></int:object-to-string-transformer>
        <ws:header-enricher>
            <ws:soap-action value="theSoapAction" />
        </ws:header-enricher>
        <ws:outbound-gateway 
            uri="${wsEndpoint}"
            interceptor="anInterceptor" ignore-empty-responses="false" reply-channel="processReplyChannel">
            <ws:request-handler-advice-chain>
                    <ref bean="retryAdvice" />
            </ws:request-handler-advice-chain>  
        </ws:outbound-gateway>  
    </int:chain>

问候,

【问题讨论】:

  • 这可能是由于其中一个底层库发生了变化;在调试器中,我看到为空主体返回 null 而不是空 String。正在调查...

标签: java spring web-services soap spring-integration


【解决方案1】:

这看起来像一个错误;我开了一个JIRA issue,你可以看。

【讨论】:

  • 嗨,Gary,问题似乎有点复杂。我做了另一个测试,更改 EndPoint 以返回消息(实际上 WS 将返回与发送的消息相同的消息!),并且没有调用回复通道。现在我不知道“回复频道”是否可以在链中使用。当我将回复通道移动到输出通道(链输出通道)时,一切正常。
  • 没错;您不能在链中添加reply-channel;回复转到链中的下一个元素,如果网关是最后一个元素,则返回链的output-channel
猜你喜欢
  • 1970-01-01
  • 2016-11-26
  • 1970-01-01
  • 1970-01-01
  • 2012-03-07
  • 2022-10-25
  • 2012-09-21
  • 2020-07-10
  • 1970-01-01
相关资源
最近更新 更多