cxf做webservice新手不知道何错之有,虽字面上是connection但不知从何入手

V 发布于 2011/10/09 15:42
阅读 5K+
收藏 0
Caused by: java.net.ConnectException: ConnectException invoking http://localhost:8880/cxf2/webServices/userService: Connection refused: connect 
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 
 at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) 
 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) 
 at java.lang.reflect.Constructor.newInstance(Constructor.java:513) 
 at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:1422) 
 at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1407) 
 at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) 
 at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:640) 
 at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) 
 ... 9 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:529) 
 at sun.net.NetworkClient.doConnect(NetworkClient.java:158) 
 at sun.net.www.http.HttpClient.openServer(HttpClient.java:394) 
 at sun.net.www.http.HttpClient.openServer(HttpClient.java:529) 
 at sun.net.www.http.HttpClient.<init>(HttpClient.java:233) 
 at sun.net.www.http.HttpClient.New(HttpClient.java:306) 
 at sun.net.www.http.HttpClient.New(HttpClient.java:323) 
 at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:860) 
 at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:801) 
 at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:726) 
 at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:904) 
 at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleHeadersTrustCaching(HTTPConduit.java:1359) 
 at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.onFirstWrite(HTTPConduit.java:1301) 
 at org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:42) 
 at org.apache.cxf.io.AbstractThresholdOutputStream.write(AbstractThresholdOutputStream.java:69) 
 at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1379) 
 ... 12 more 
Exception in thread "main" javax.xml.ws.WebServiceException: Could not send Message. 
 at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:145) 
 at $Proxy29.add(Unknown Source) 
 at server.Client.main(Client.java:16) 
Caused by: java.net.ConnectException: ConnectException invoking http://localhost:8880/cxf2/webServices/userService: Connection refused: connect

加载中
0
鉴客
鉴客
是网络的问题吧,访问不到
0
foxbrother
foxbrother
访问时候的浏览器里怎么写的?或者应用程序里的webservice地址怎么写的?
0
游客
游客

十有八九是网络问题。

先?wsdl查看一下。

0
磊神Ray
磊神Ray

报错就是连接超时

http://localhost:8880/cxf2/webServices/userService?wsdl  能访问吗

0
V
V
泪流满面地感谢所有楼上的码友们热心回复,问题最后解决了,网络故障导致
0
秦都李先生
秦都李先生
楼主问题解决了吗?我遇到Could not send Message. 纠结了一天了,解决不掉
V
V
解决了,问题不在我的代码,是网络的问题,换个网就OK了,不知道你的情况跟我的是否一致?
返回顶部
顶部