default timeout for JAX-WS client
Asked Answered
P

1

7

We are calling web service for which using cxf-codegen-plugin for code generation from WSDL and have configured JAX-WS client in Spring xml as follows:

<jaxws:client id="abcApiInterface" serviceClass="abc.api.AbcApi" address="${xyz.abcApi.endpoint}" />

And we have our webservice interface generated by Apache CXF 3.0.3. We are seeing timed-out when calling that service, we have not specified any timeout on client side so just want to know what's the default value for timeout for JAX-WS client?

Plaid answered 15/6, 2017 at 19:46 Comment(0)
I
7

Default value is 30 seconds for connection timeout and 60 seconds for receive timeout.

See: http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html#ClientHTTPTransport(includingSSLsupport)-Theclientelement

Imes answered 26/6, 2017 at 13:24 Comment(5)
One more clarification: can we keep the ConnectionTimeout to default value of 30 seconds and increase the ReceiveTimeout to 300 seconds?Plaid
Sure that's possibleImes
You could find an example here (cwiki.apache.org/confluence/pages/…) how to set different Connection and Receive Timeouts. This has worked for my SOAP Service. Client client = ClientProxy.getClient(greeter); HTTPConduit http = (HTTPConduit) client.getConduit(); HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy(); httpClientPolicy.setConnectionTimeout(36000); httpClientPolicy.setAllowChunking(false); httpClientPolicy.setReceiveTimeout(32000);Palmore
@Palmore Will this override settings that may have been set in some other way/wipe the defaults? I want everything to remain the same, just with a different receive timeout.Radford
@Radford for the Client client Object yes. You will set directly the values of the Receive Timeout. i have changed Connection Timeout and ReceiveTimeout in my case.Palmore

© 2022 - 2024 — McMap. All rights reserved.