While calling soap service from spring integration how to add timeout ? Below is the code where I'm calling a soap service using Ws.marshallingOutboundGateway().
@Bean
public IntegrationFlow flow() {
return flow ->
flow.handle(Ws.marshallingOutboundGateway(webServiceTemplate()).uri(someSOAPUrl));
};
}
@Bean
public WebServiceTemplate webServiceTemplate() throws Exception {
WebServiceTemplate webServiceTemplate = new WebServiceTemplate();
R123Marshaller marshaller = new R123Marshaller();
marshaller.setContextPath("com.example.request.soap123");
webServiceTemplate.setMarshaller(marshaller);
Jaxb2Marshaller unmarshaller = new Jaxb2Marshaller();
unmarshaller.setContextPath("com.example.request.soap123");
webServiceTemplate.setUnmarshaller(unmarshaller);
return webServiceTemplate;
}
Is there a way I can do something like below -
.handle(Http.outboundGateway(someURL, restTemplateConfig.restTemplate())
Here I have added timeout in the resttemplate that I've passed.