Spring Integration WS入站网关删除Soap空标头(Spring Integration WS inbound gateway Remove Soap empty header)

编程入门 行业动态 更新时间:2024-10-06 09:21:32
Spring Integration WS入站网关删除Soap空标头(Spring Integration WS inbound gateway Remove Soap empty header)

我的项目使用Spring集成ws-inbound-gateway。

<int-ws:inbound-gateway id="shop-inbound-gateway" error-channel="shopCoreErrorChannel" request-channel="shopRequestChannel" reply-channel="shopResponseChannel" />

响应:

<SOAP-ENV:Envelope xmlns:SOAP- ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <SOAP-ENV:Body> <shop:RailShopAPIResponse> ...... ...... </shop:RailShopAPIResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>

即使我没有映射任何mapped-reply-headers / mapped-request-headers但响应将始终有空的soap头。

为什么这个肥皂空头来了? 这是默认行为吗? 如果是这样,那么如何删除空的肥皂头?

My project using Spring integration ws-inbound-gateway.

<int-ws:inbound-gateway id="shop-inbound-gateway" error-channel="shopCoreErrorChannel" request-channel="shopRequestChannel" reply-channel="shopResponseChannel" />

Response:

<SOAP-ENV:Envelope xmlns:SOAP- ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <SOAP-ENV:Body> <shop:RailShopAPIResponse> ...... ...... </shop:RailShopAPIResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>

Even though I didn't map any mapped-reply-headers/mapped-request-headers but the response will always have the empty soap header.

Why is this soap empty header is coming? Is it a default behavior? If so then how to remove the empty soap header?

最满意答案

考虑将一些自定义EndpointInterceptor添加到您的EndpointMapping并在handleResponse实现清理逻辑:

/** * Processes the outgoing response message. Called after {@link EndpointAdapter} actually invoked the endpoint. Can * manipulate the response, if any, by adding new headers, etc.

Consider to add some custom EndpointInterceptor to your EndpointMapping and implement clean up logic in the handleResponse:

/** * Processes the outgoing response message. Called after {@link EndpointAdapter} actually invoked the endpoint. Can * manipulate the response, if any, by adding new headers, etc.

更多推荐

soap,<SOAP-ENV,响应,mapped-reply-headers,电脑培训,计算机培训,IT培训"/> <met

本文发布于:2023-07-09 10:26:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1085621.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:网关   Soap   WS   Spring   Integration

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!