I have a JAX-RS client in CXF created via JAXRSClientFactoryBean.create. How can I set the connection/receive timeouts?
I assume I need to get hold of the conduit but can't work out how to. This project is not using Spring.
Here's the code I use:
service = JAXRSClientFactory.create(url, serviceClass, providers);
HTTPConduit conduit = WebClient.getConfig(service).getHttpConduit();
HTTPClientPolicy policy = new HTTPClientPolicy();
policy.setReceiveTimeout(300000); //5 minutes
conduit.setClient(policy);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With