Search code examples
cxfjax-ws

Set Timeout on CXF Proxy Client


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.


Solution

  •     HTTPClientPolicy clientConfig = WebClient.getConfig(service).getHttpConduit().getClient();
        clientConfig.setReceiveTimeout(10000);