我的项目使用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标题。
答案 0 :(得分:0)
考虑向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.