I have the following http outbound gateway. How can I do this configuration with Java Config or Spring DSL?
@Bean
public IntegrationFlow httpOut() {
return IntegrationFlows.from("inputChannel")
.handle(Http.outboundGateway("http://localhost:8080/")
.charset("UTF-8")
.httpMethod(HttpMethod.POST)
.headerMapper(soapHeaderMapper())
.requestFactory(requestFactory()), e -> e.id("test"))
.get();
}
Or
@ServiceActivator(inputChannel="inputChannel")
@Bean(name="test")
public MessageHandler httpout() {
HttpRequestExecutingMessageHandler handler = new ...
...
return handler;
}