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.xml`或`spring-context.xml`这样的配置文件时,IDE就能识别出CXF的特定标签,并提供相应的代码提示。 例如,一个简单的CXF JAX-RS配置可能会如下所示: ```xml <beans xmlns="...
<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"/>
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-...
<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"/> <cxf:bus> <cxf...
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"> <!-- 这三行的配置不用去检查对应的路径下是否有对应的文件,因为cxf会自动生成的--> <import resource="classpath:META-INF/cxf/cxf....
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"> <import resource="classpath:META-INF/cxf/cxf.xml" /> <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" /> ...
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"> <!-- 配置CXF的Bus --> <bean id="cxf" class="org.apache.cxf.bus.spring.SpringBus"/> <!-- 导入服务配置 --> ...
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://example.com/mywebservice"/> </input> <soap:body use="encoded" encodingStyle=...
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 ...
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"> ...
http://cxf.apache.org/schemas/jaxws.xsd"> <jaxws:endpoint id="helloService" implementor="com.example.HelloServiceImpl" address="/hello"/> </beans> ``` 在Web应用的`web.xml`配置文件中,我们需要...
Java6引入了内置的JAX-WS(Java API for XML Web Services)支持,使得创建和发布Web Service成为可能,这大大简化了项目的安装和部署过程,避免了因引入第三方库而增加程序体积。 首先,让我们看看如何使用Java6...
CXF是一个用于构建服务端和客户端Web服务的框架,它支持各种协议和规范,包括但不限于JAX-WS(Java API for XML Web Services)和JAX-RS(Java API for RESTful Web Services)。CXF允许开发者使用POJO(Plain Old ...
开发人员可能使用Java、C#、Python等语言编写,借助框架如Apache CXF、Spring Web Services等创建Web服务。 7. **文档**:文档是理解源代码和系统工作原理的关键,通常包含设计思路、实现细节、使用方法等内容。...
<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" /> <!-- 配置Web...
### WebService技术应用:Spring 3 + CXF 3.4与Axis 1.4的交互 在现代软件开发中,Web服务作为一种重要的技术手段,被广泛应用于不同系统之间的通信。其中,Spring框架与Apache CXF是实现RESTful或SOAP风格的Web...
这通常包括`cxf.xml`, `cxf-extension-soap.xml`, 和 `cxf-servlet.xml`。同时,你需要在XML中添加`<jaxws:endpoint>`元素来配置Web服务。 ```xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="...
<soap:body use="encoded" namespace="http://example.com/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <soap:body use="encoded" namespace=...