【问题标题】:how get payload in int-http:outbound-gateway in call to rest/json service如何在 int-http:outbound-gateway 中获取有效负载以调用 rest/json 服务
【发布时间】:2015-01-21 15:47:12
【问题描述】:

从带有有效负载调用的通道到 一个 int-http:outbound-gateway 调用 url 以返回 JSON 响应

如何从调用方获取初始有效载荷以获取初始有效载荷, 我需要它在聚合器中使用

这就是场景

message --> channel --> 服务激活器 --> outputchannel

outputchannel--->int-http:outbound-gateway(call rest service1) -->响应*

outputchannel--->int-http:outbound-gateway(call rest service2) -->响应*

  • 聚合器

【问题讨论】:

    标签: spring-integration


    【解决方案1】:

    你应该把它放到MessageHeaders:

    <header-enricher>
       <header name="requestPayload" expression="payload"/>
    </header-enricher>
    

    在那些 &lt;int-http:outbound-gateway&gt; 调用之前并将其从 aggregator 逻辑中的标头中提取。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-10-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多