Spring Integration WS Response Soap Headers

一世执手 提交于 2019-12-11 01:33:57

问题


I have the below use case.

  1. Request is received by the ws-inbound gateway of service1.
  2. Service1 Passes the request to another ws-outbound gateway service2
  3. Service2 ws inbound gateway has an interceptor configured, which adds a custom soap header to the response
  4. the response from service 2 is passed to the output channel of service 1 (Final response).

I am able to see that soap header is added by printing the soap envelope in interceptor (service2), but it is not present in the final response. Any pointers to solve this issue will be helpful


回答1:


The <int-ws:outbound-gateway> uses DefaultSoapHeaderMapper by default. And its logic to populate source.getSoapAction(); and source.getSoapHeader();. But for that purpose you should configure mapped-reply-headers for your desired headers on the <int-ws:outbound-gateway>.



来源:https://stackoverflow.com/questions/34778794/spring-integration-ws-response-soap-headers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!