`

CXF异常 No DestinationFactory was found for the namespace http://schemas.xmlsoap.o

    博客分类:
  • cxf
阅读更多
http://blog.csdn.net/running_snail_/article/details/7561067

最近学习webservice一运行就遇到了这个异常,郁闷。网上发现关于这个异常也是众说纷纭
[java] view plaincopy
Caused by: org.apache.cxf.service.factory.ServiceConstructionException 
at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:134) 
at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:160) 
at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:322) 
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:244) 
... 16 more 
Caused by: org.apache.cxf.BusException: No DestinationFactory was found for the namespace http://schemas.xmlsoap.org/soap/http. 
at org.apache.cxf.transport.DestinationFactoryManagerImpl.getDestinationFactory(DestinationFactoryManagerImpl.java:115) 
at org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:86) 
at org.apache.cxf.endpoint.ServerImpl.<init>(ServerImpl.java:69) 
at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:115) 


经过一番折腾后终于可以了,原因一般有俩个:

1.是配置文件中缺少

[html] view plaincopy
<import resource="classpath:META-INF/cxf/cxf.xml" /> 
    <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" /> 
    <import resource="classpath:META-INF/cxf/cxf-servlet.xml" /> 

2.干脆就是jar包的问题
下载最新的CXF 将\lib下的所有jar导入,再运行,奇迹出现了
分享到:
评论

相关推荐

    cxf.apache.org/schemas/(jaxrs.xsd、jaxrs.xsd、core.xsd)文件下载

    这样,当你在编写如`cxf.xml`或`spring-context.xml`这样的配置文件时,IDE就能识别出CXF的特定标签,并提供相应的代码提示。 例如,一个简单的CXF JAX-RS配置可能会如下所示: ```xml &lt;beans xmlns="...

    cxf.xml,cxf-servlet.xml,cxf-extension-soap.xml

    &lt;import resource="classpath:META-INF/cxf/cxf.xml"/&gt; &lt;import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/&gt; &lt;import resource="classpath:META-INF/cxf/cxf-servlet.xml"/&gt;

    CXFWS-Security

    http://cxf.apache.org/index.html http://cxf.apache.org/docs/ws-security.html http://resource.ajava.org/java/jdk-6.0-api-zh/javax/security/auth/callback/CallbackHandler.html 2)CXFWS工程是基于WS-...

    webservice编写文档

    http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"&gt; &lt;!-- 这三行的配置不用去检查对应的路径下是否有对应的文件,因为cxf会自动生成的--&gt; &lt;import resource="classpath:META-INF/cxf/cxf....

    CXF结合Spring实现WebService.doc

    http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"&gt; &lt;import resource="classpath:META-INF/cxf/cxf.xml" /&gt; &lt;import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" /&gt; ...

    cxf-2.7.3与spring3整合开发步骤.

    http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"&gt; &lt;!-- 配置CXF的Bus --&gt; &lt;bean id="cxf" class="org.apache.cxf.bus.spring.SpringBus"/&gt; &lt;!-- 导入服务配置 --&gt; ...

    java的wsdl语言实现web service的服务创建和调用实例

    &lt;soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://example.com/mywebservice"/&gt; &lt;/input&gt; &lt;soap:body use="encoded" encodingStyle=...

    CXF实现SSL安全验证

    http://cxf.apache.org/schemas/configuration/http-conf.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://www.springframework.org/schema/beans ...

    CXF和Spring整合开发的服务端及客户端

    xsi:schemaLocation="http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"&gt; ...

    cxf与spring整合,以及webservice传输验证demo

    http://cxf.apache.org/schemas/jaxws.xsd"&gt; &lt;jaxws:endpoint id="helloService" implementor="com.example.HelloServiceImpl" address="/hello"/&gt; &lt;/beans&gt; ``` 在Web应用的`web.xml`配置文件中,我们需要...

    Java6开发WebService详细啊.docx

    Java6引入了内置的JAX-WS(Java API for XML Web Services)支持,使得创建和发布Web Service成为可能,这大大简化了项目的安装和部署过程,避免了因引入第三方库而增加程序体积。 首先,让我们看看如何使用Java6...

    jdk21集成cxf示例程序

    &lt;import resource="classpath:META-INF/cxf/cxf.xml"/&gt; &lt;import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/&gt; &lt;import resource="classpath:META-INF/cxf/cxf-servlet.xml"/&gt; &lt;cxf:bus&gt; &lt;cxf...

    webServiceSprin整合jar包apache-cxf-2.5.9.rar

    CXF是一个用于构建服务端和客户端Web服务的框架,它支持各种协议和规范,包括但不限于JAX-WS(Java API for XML Web Services)和JAX-RS(Java API for RESTful Web Services)。CXF允许开发者使用POJO(Plain Old ...

    基于Webservice的信息查询系统 源码 + 文档

    开发人员可能使用Java、C#、Python等语言编写,借助框架如Apache CXF、Spring Web Services等创建Web服务。 7. **文档**:文档是理解源代码和系统工作原理的关键,通常包含设计思路、实现细节、使用方法等内容。...

    在spring里开发cxf客户端应用

    &lt;import resource="classpath:META-INF/cxf/cxf.xml" /&gt; &lt;import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" /&gt; &lt;import resource="classpath:META-INF/cxf/cxf-servlet.xml" /&gt; &lt;!-- 配置Web...

    webservice :spring 3+cxf3.4服务方,AXIS1.4请示方调用

    ### WebService技术应用:Spring 3 + CXF 3.4与Axis 1.4的交互 在现代软件开发中,Web服务作为一种重要的技术手段,被广泛应用于不同系统之间的通信。其中,Spring框架与Apache CXF是实现RESTful或SOAP风格的Web...

    Java通过Cxf创建webService接口.docx

    这通常包括`cxf.xml`, `cxf-extension-soap.xml`, 和 `cxf-servlet.xml`。同时,你需要在XML中添加`&lt;jaxws:endpoint&gt;`元素来配置Web服务。 ```xml &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;beans xmlns="...

    xfire实现web service入门实例

    &lt;soap:body use="encoded" namespace="http://example.com/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/&gt; &lt;/input&gt; &lt;soap:body use="encoded" namespace=...

Global site tag (gtag.js) - Google Analytics