我面临一个问题,我需要将一个特定 Web 服务的超时设置为所有其他服务的默认值以外的值。现在我需要找到一种方法,我可以以某种方式以编程方式覆盖我的服务的 http Conduit 超时。有人可以指导我如何实现这一目标吗?这是我当前的配置和服务:
<http:conduit name="*.http-conduit">
<http:client ConnectionTimeout="${httpConduit.connectionTimeout:30000}" ReceiveTimeout="${httpConduit.receiveTimeout:30000}" />
<http:tlsClientParameters disableCNCheck="${httpConduit.ssl.disableCNCheck:false}">
<sec:keyManagers keyPassword="${httpConduit.ssl.keyPassword}">
<sec:keyStore type="${httpConduit.ssl.keyStoreType}" password="${httpConduit.ssl.keyStorePassword}" file="${httpConduit.ssl.keyStoreFile}" />
</sec:keyManagers>
<sec:trustManagers>
<sec:keyStore type="${httpConduit.ssl.trustStoreType}" password="${httpConduit.ssl.trustStorePassword}" file="${httpConduit.ssl.trustStoreFile}" />
</sec:trustManagers>
<sec:cipherSuitesFilter>
<sec:include>.*_EXPORT_.*</sec:include>
<sec:include>.*_EXPORT1024_.*</sec:include>
<sec:include>.*_WITH_DES_.*</sec:include>
<sec:include>.*_WITH_AES_.*</sec:include>
<sec:include>.*_WITH_NULL_.*</sec:include>
<sec:exclude>.*_DH_anon_.*</sec:exclude>
</sec:cipherSuitesFilter>
</http:tlsClientParameters>
</http:conduit>
<jaxrs:client id="testProxy" address="${test.endpoint}" threadSafe="true" serviceClass="foo.TestProxy">
<jaxrs:headers>
<entry key="Accept-Encoding" value="gzip,deflate" />
<entry key="Content-Type" value="application/json;charset=UTF-8" />
<entry key="Content-Length" value="92" />
<entry key="Connection" value="Keep-Alive" />
</jaxrs:headers>
<jaxrs:providers>
<ref bean="jsonProvider" />
</jaxrs:providers>
<jaxrs:features>
<!-- Enables logging of the 'on-the-wire' request/response -->
<bean class="org.apache.cxf.feature.LoggingFeature" />
</jaxrs:features>
</jaxrs:client>