-
Notifications
You must be signed in to change notification settings - Fork 9
FAQ IPF
Quentin Ligier edited this page Apr 4, 2024
·
1 revision
How to specify the HTTP timeout (CXF)?
- Create a Spring bean of the type
org.apache.cxf.transports.http.configuration.HTTPClientPolicy. In this bean, set the attributesconnectionRequestTimeoutand/orreceiveTimeoutto 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;
}- 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!