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
发布评论