Search code examples
javaspringhttpcxf

CXF - http-conf:conduit timeout is being ignored


I have a CXF client, configured through Spring as follows:

<jaxws:client name="myWsService"
              serviceClass="${myws.serviceInterface}"
              address="${myws.wsdlDocumentUrl}"
              username="${myws.username}" password="${myws.password}">
</jaxws:client>

<!-- Configure timeout -->
<http-conf:conduit name="{http://127.0.0.1:9090/}MyWSSOAP.http-conduit">
    <http-conf:client ConnectionTimeout="${myws.timeout}" ReceiveTimeout="${myws.timeout}"/>
</http-conf:conduit>

The address for the webservice is

http://127.0.0.1:9090/MyWS

The problem is that when I set the timeout to a small value (e.g. 1000), it is still being ignored. Am I missing some configuration somewhere please?

Edit: I am using CXF version 2.4.1. I have tried updating to the latest version, 2.6.15, but still the http-conf:conduit's timeout value is ignored.

Note also that I have set <http-conf:conduit name="*.http-conduit"> and this works correctly, i.e. the timeout is respected.

Is there a way to identify which conduit is used at runtime?


Solution

  • Sorted this one out by using the regex version of the conduit:

    <http-conf:conduit name="http://127.0.0.1:9090/.*">
    

    Hope you'll find this answer useful.