Appreciate any help on this since I tried a few options and none seem to
work. I need to HTTP *receiveTimeout* to work so that my client can have
longer time outs.

Client context:

<http-conf:conduit name="*.http-conduit">
    <http-conf:authorization>
        <sec:AuthorizationType>Negotiate</sec:AuthorizationType>
    </http-conf:authorization>
    <http-conf:client ReceiveTimeout="0"></http-conf:client>
</http-conf:conduit>

This does not work in the sense that client still times out after 60000 ms,
which is the default timeout value.

Tried the following approach to get it work programmatically:

    ClientProxyImpl client = (ClientProxyImpl) myService;
    Client proxy = ClientProxy.getClient(myService);

    HTTPConduit conduit = (HTTPConduit) proxy.getConduit();

    HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
    httpClientPolicy.setConnectionTimeout(30000);
    httpClientPolicy.setReceiveTimeout(30000);
    conduit.setClient(httpClientPolicy);

Got the below exception.

Exception in thread "main" java.lang.ClassCastException:
org.apache.cxf.jaxrs.client.ClientProxyImpl cannot be cast to
org.apache.cxf.frontend.ClientProxy
at org.apache.cxf.frontend.ClientProxy.getClient(ClientProxy.java:120)

Is there anyway I can get this working in both Spring and non-Spring
clients?

Thanks

--
View this message in context: 
http://cxf.547215.n5.nabble.com/Need-help-in-getting-HTTP-timeout-to-work-for-JAX-RS-tp5629866p5629866.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to