2010-2-23 21:36:45 org.apache.commons.httpclient.HttpMethodDirector executeWithRetry 信息: I/O exception (java.net.ConnectException) caught when processing request: Connection refused: connect 2010-2-23 21:36:45 org.apache.commons.httpclient.HttpMethodDirector executeWithRetry 信息: Retrying request 2010-2-23 21:36:46 org.apache.commons.httpclient.HttpMethodDirector executeWithRetry 信息: I/O exception (java.net.ConnectException) caught when processing request: Connection refused: connect 2010-2-23 21:36:46 org.apache.commons.httpclient.HttpMethodDirector executeWithRetry 信息: Retrying request 2010-2-23 21:36:47 org.apache.commons.httpclient.HttpMethodDirector executeWithRetry 信息: I/O exception (java.net.ConnectException) caught when processing request: Connection refused: connect 2010-2-23 21:36:47 org.apache.commons.httpclient.HttpMethodDirector executeWithRetry 信息: Retrying request 2010-2-23 21:36:48 org.codehaus.xfire.transport.http.HttpChannel sendViaClient 严重: java.net.ConnectException: Connection refused: connect Exception in thread "main" org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Couldn't send message. org.codehaus.xfire.fault.XFireFault: Couldn't send message. at org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89) at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:30) at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131) at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79) at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114) at org.codehaus.xfire.client.Client.invoke(Client.java:336) at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77) at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57) at $Proxy12.addMember(Unknown Source) at org.hhb.jsrws.client.MemberCliement.main(MemberCliement.java:44) Caused by: org.codehaus.xfire.XFireException: Couldn't send message. at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:145) at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48) at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26) ... 8 more Caused by: java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:519) at java.net.Socket.connect(Socket.java:469) at java.net.Socket.<init>(Socket.java:366) at java.net.Socket.<init>(Socket.java:240) at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:79) at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:121) at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:706) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1321) at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:386) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396) at org.codehaus.xfire.transport.http.CommonsHttpMessageSender.send(CommonsHttpMessageSender.java:369) at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:123) ... 10 more?
<beans xmlns="http://xfire.codehaus.org/config/1.0"> <service> <serviceClass>org.hhb.jsrws.service.MemberServiceImpl</serviceClass> <wsdlURL>file:/F:/wk/wko/xfireJSR181ClientHHB/MemberService.wsdl</wsdlURL> <serviceFactory>org.codehaus.xfire.jaxb2.JaxbServiceFactory</serviceFactory> </service> </beans>?
?
错误原因:
/META-INF/xfire/services.xml 下面这个文件配置的问题
wsdl文件的路径的错误
?
?<wsdlURL>file:/F:/wk/wko/xfireJSR181ClientHHB/MemberService.wsdl</wsdlURL>
这行的wsdl文件的路径一定要正确.
?