Issue
I am trying to proxy my soap service using spring integration
What I want to do is:
- Receive a SOAP request on a certain endpoint
- Intercept request header and body, log them
- And without modification, forward this request to the soap service
I read the answer to almost same question here, in which it is said:
@Bean
public IntegrationFlow httpProxyFlow() {
return IntegrationFlows
.from(Http.inboundGateway("/service"))
.handle(Http.outboundGateway("/service/internal")
.expectedResponseType(String.class))
.get();
}
but I could not find any hint with #2 (request header and body)
How can I intercept request body and header? And is it possible to generate wsdl for proxy service as well?
Any help is appreciated
Solution
See if .log()
before your .handle()
can help you. There are plenty of overridden variants.
I'm not sure that WSDL generation is somehow valid functionality for this kind of service. Perhaps you mean to expose a WSDL url as it is possible with Spring WS. I guess you proxy solution still can delegate and propagate that functionality.
Answered By - Artem Bilan
Answer Checked By - David Goodson (JavaFixing Volunteer)