我有一个CXF客户端,通过Spring配置如下:
<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>
网络服务的地址是
http://127.0.0.1:9090/MyWS
问题是当我将超时设置为较小的值(例如 1000)时,它仍然被忽略。请问我在某处缺少一些配置吗?
编辑:我使用的是 CXF 2.4.1 版。我已经尝试更新到最新版本 2.6.15,但 http-conf:conduit 的超时值仍然被忽略。
另请注意,我已设置 <http-conf:conduit name="*.http-conduit">
这可以正常工作,即遵守超时。
有没有办法识别在运行时使用了哪个管道?
最佳答案
使用管道的正则表达式版本解决了这个问题:
<http-conf:conduit name="http://127.0.0.1:9090/.*">
希望您会发现此答案有用。
关于java - CXF-http-conf :conduit timeout is being ignored,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24430313/