我创建使用由Spring配置CXF Web服务客户端,如下图所示:CXF超时工作不
<!-- HTTP Conduit -->
<http-conf:conduit name="*.http-conduit">
<http-conf:client ConnectionTimeout="30000"
ReceiveTimeout="30000" />
</http-conf:conduit>
<!-- Client Proxies -->
<jaxws:client name="wsClient" serviceName="..."
serviceClass="..."
address="..." wsdlLocation="...">
</jaxws:client>
现在当服务已启动,一切都工作正常,但问题是,当服务已关闭在HTTPConduit超时值被忽略了,我在1秒钟后收到以下错误:
org.apache.cxf.interceptor.Fault: Could not send Message.
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:570)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:479)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:382)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:335)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:136)
Caused by: java.net.ConnectException: Tried all: '1' addresses, but could not connect over HTTP to server: '192.168.80.55', port: '24004'
at weblogic.net.http.HttpClient.openServer(HttpClient.java:333)
at weblogic.net.http.HttpClient.openServer(HttpClient.java:425)
at weblogic.net.http.HttpClient.New(HttpClient.java:252)
at weblogic.net.http.HttpURLConnection.connect(HttpURLConnection.java:213)
at weblogic.net.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:279)
at org.apache.cxf.transport.http.HTTPCon2014-08-30 13:06:59 ERROR: javax.xml.ws.WebServiceException: Could not send Message.
任何线索,为什么消费者不提出这个错误之前停留的超时时间?
服务关闭,我的意思是主机关闭或服务未在该端口上运行。 – 2014-08-30 11:27:30