Skip to content

FAQ IPF

Quentin Ligier edited this page Apr 4, 2024 · 1 revision
How to specify the HTTP timeout (CXF)?
  1. Create a Spring bean of the type org.apache.cxf.transports.http.configuration.HTTPClientPolicy. In this bean, set the attributes connectionRequestTimeout and/or receiveTimeout to the desired values in milliseconds, or 0 (zero) for an infinite timeout. Example using Spring Boot:
@Bean
public HTTPClientPolicy myHttpClientPolicy() {
    var policy = new HTTPClientPolicy();
    policy.setConnectionRequestTimeout(0L);
    policy.setReceiveTimeout(0L);
    return policy;
}
  1. Reference this bean in the client endpoint URL parameter httpClientPolicy, e.g.:
.to("hpd-iti58://localhost:7078/services/iti58Endpoint?secure=true&sslContextParameters=#clientSslContextParameters&httpClientPolicy=#myHttpClientPolicy")

Thanks @unixoid for the tip!

Clone this wiki locally