'Set receivetimeout for HTTPS endpoint at client side in CXF

I am trying to set the receivetimeout value for my webservice endpoint which is using tls/ssl over haporxy with https protocol. i had tried below code and it works fine for http url and not for https. Could someone please help me on this.

HTTPConduit conduit = (HTTPConduit) client.getConduit();
        HTTPClientPolicy policy = new HTTPClientPolicy();
        // You can setup the timeout option here
        policy.setReceiveTimeout(60000);
        policy.setConnectionTimeout(30000);
        conduit.setClient(policy);


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source