Skip to Content
Jul 19, 2019 at 09:57 AM

How to tell Spring to wait longer for REST response? - OutboundService falsely throws SocketTimeOutException


Hi experts,

I'm using the standard API to export an order to a backend system via SCPI. By standard I mean

  1. Extension: CPI Order Exchange OMS: SapCpiOmsOrderOutboundAction.executeAction()

  2. Extension: CPI Adapter: SapCpiOutboundService.sendOrder()

  3. Extension: Outbound Services: DefaultOutboundServiceFacade.send()

The DefaultOutboundServiceFacade.send() calls internally restTemplate.postForEntity() which throws ResourceAccessException with underlying exception with message 'Read timed out'. However, the case is that the SCPI sometimes needs a bit more time and in that case I get the exception although SCPI processed everything without any errors.

Is there a way to configure timeout configuration, i.e. to tell Spring to wait a bit more before throwing the exception?

Cheers, Filip