![](/img/trans.png)
[英]Exception on apache cxf when calling JaxWsProxyFactoryBean.create() (in maven project)
[英]How to increase Apache CXF timeout using XML configuration and JaxWsProxyFactoryBean?
我正在使用JAX-WS
apache CXF
实现。 我的Web服务是使用JaxWsProxyFactoryBean
通过spring
xml配置配置的:
<bean id="myWSClient" class="my.package.MyWSClient"
factory-bean="clientFactory"
factory-method="create" />
<bean id="clientFactory" class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
<property name="serviceClass" value="my.package.MyWSClient"/>
<property name="address" value="http://some.url"/>
</bean>
然后我通过以下方式注入它:
@Resource(name = "myWSClient")
MyWSClient myWSClient;
我如何设法增加MyWSClient的timeout
?
要使用spring configuration
来配置客户端超时,请使用以下命令:
<http-conf:conduit name="*.http-conduit">
<http-conf:client
ConnectionTimeout="600000"
ReceiveTimeout="600000"/>
</http-conf:conduit>
在此示例中,响应和连接超时设置为600秒。
参考:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.