My requirement is to call siebel soap webservice, In the process handle request and response on a same method call, so that I can add token to the request header from the apache common pool and once get the response with token, grab the token from response and send it to pool. Here I have mechanism to verify old token too, I need request token and response token on same class.
Future planning to add retry mechanism.
Currently I am using SI Http outbound gateway.
Any thoughts, appreciate it.
Thanks
So, what you need is named pre- and post-process. Not sure why you don't use Spring Integration WS support for calling that Siegel service, but even with the HTTP you can get a gain via Interceptor
abstraction.
What I mean that you can inject RestTemplate
into HTTP Outbound Gateway supplied with the ClientHttpRequestInterceptor
implementation to provide a desired logic.
If you'd use WS Outbound Gateway, you could do that in the similar ClientInterceptor
abstraction.
Of course, you can achieve that via HeaderMapper
implementation, but that has different responsibility...
I found the way to achieve this, Created a class to extends HttpRequestExecutingMessageHandler than overrided handleRequestMessage()
http://docs.spring.io/spring-integration/reference/html/http.html#http-outbound
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.