当前位置: 代码迷 >> Java Web开发 >> 一个CXF运用出现的错误
  详细解决方案

一个CXF运用出现的错误

热度:8922   发布时间:2013-02-25 21:22:59.0
一个CXF运用出现的异常:
信息: Interceptor has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Could not send Message.
at org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:48)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:220)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:466)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:299)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:251)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
at $Proxy43.Say(Unknown Source)
at Test.HelloWorldClient.main(HelloWorldClient.java:10)
Caused by: java.net.MalformedURLException: Invalid address. Endpoint address cannot be null.
at org.apache.cxf.transport.http.HTTPConduit.getURL(HTTPConduit.java:766)
at org.apache.cxf.transport.http.HTTPConduit.getURL(HTTPConduit.java:751)
at org.apache.cxf.transport.http.HTTPConduit.setupURL(HTTPConduit.java:682)
at org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:475)
at org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:46)
... 8 more
Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Could not send Message.
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:145)
at $Proxy43.Say(Unknown Source)
at Test.HelloWorldClient.main(HelloWorldClient.java:10)
Caused by: org.apache.cxf.interceptor.Fault: Could not send Message.
at org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:48)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:220)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:466)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:299)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:251)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
... 2 more
Caused by: java.net.MalformedURLException: Invalid address. Endpoint address cannot be null.
at org.apache.cxf.transport.http.HTTPConduit.getURL(HTTPConduit.java:766)
at org.apache.cxf.transport.http.HTTPConduit.getURL(HTTPConduit.java:751)
at org.apache.cxf.transport.http.HTTPConduit.setupURL(HTTPConduit.java:682)
at org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:475)
at org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:46)
... 8 more


------解决方案--------------------------------------------------------
你客户端的 endpoint 地址写错了,把所有调用的代码贴出来。
------解决方案--------------------------------------------------------
或者就是在创建客户端代理对象时出错了,看一下 QName 什么的是否书写正确。
  相关解决方案