如何在 spring 集成中获取 ResponseEntity 主体

How to get ResponseEntity body in spring-integration

我正在使用基于 xml 的配置 - 到 trii=gger 休息服务的 http 出站网关,响应是 ResponseEntity,我不知道该服务的详细信息。我收到的输出应该放在 JMS 队列中。

如何更新以下内容以仅提取响应实体的主体并传递到输出通道?如果有变压器,请举例说明。是否可以使用配置?

<int:chain input-channel="gsInChannel" output-channel="dest-channel">
<int-http:outbound-gateway          
               url="https://ia-zatie.str13.tst.belst.nu/ia-zaatie/rest/signal/v2"
               http-method="POST"  
               header-mapper="headerMapper"
               request-factory="sslFactory"                
               >
</int-http:outbound-gateway>
    </int:chain>

dest-channel 是 jms:outbound-channel-adapter

引导版本 1.4.3 和集成版本 4.3.6

Error: org.springframework.messaging.MessageHandlingException: error occurred in message handler [org.springframework.integration.jms.JmsSendingMessageHandler#0]; nested exception is org.springframework.jms.support.converter.MessageConversionException: Cannot convert object of type [org.springframework.http.ResponseEntity] to JMS message. Supported message payloads are: String, byte array, Map, Serializable object.

我使用的是 HTTP POST 方法,所以没想到会有响应。 SoO 没有包含预期响应类型,returns 正文

<int-http:outbound-gateway          
               url="https://ia-zatie.str13.tst.belst.nu/ia-zaatie/rest/signal/v2"
               http-method="POST"  
               header-mapper="headerMapper"
               request-factory="sslFactory"  

               expected-response-type="java.lang.String">