简体   繁体   English

如何使用CXF和Spring构建WS?

[英]How to build a WS with CXF and Spring?

I'm trying to build a WS with CXF. 我正在尝试使用CXF构建WS。 I'm following this article http://www.ibm.com/developerworks/library/ws-pojo-springcxf/ 我正在关注本文http://www.ibm.com/developerworks/library/ws-pojo-springcxf/
But I have 2 questions: 但是我有两个问题:

1) Which maven2 artifacts are necessary to build a WS with CXF and Spring? 1) 使用CXF和Spring构建WS需要哪些maven2工件?

2) I'm getting this error: FileNotFound: META-INF/cxf/cxf.xml. 2)我收到此错误:FileNotFound:META-INF / cxf / cxf.xml。 I don't know where this file is. 我不知道这个文件在哪里。

Thanks in advance 提前致谢

You need to make sure you have proper cxf dependencies declared. 您需要确保已声明适当的cxf依赖项。

<dependency>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf-rt-frontend-jaxws</artifactId>
    <version>2.2.5</version>
</dependency>
<dependency>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf-rt-transports-http</artifactId>
    <version>2.2.5</version>
</dependency>

The META-INF/cxf/cxf.xml is in cxf-rt-core-2.2.5.jar which is one of the transitive dependencies. META-INF / cxf / cxf.xml位于cxf-rt-core-2.2.5.jar中,这是传递依赖项之一。

META-INF/cxf/cxf.xml is in cxf-2.3.0.jar You will need these jars to run cxf webservices META-INF / cxf / cxf.xml位于cxf-2.3.0.jar中,您将需要这些jar来运行cxf webservices

commons-codec-1.3.jar
commons-collections-3.2.1.jar
commons-lang-2.4.jar
commons-logging-1.1.1.jar
commons-pool-1.5.2.jar
cxf-2.3.0.jar
cxf-manifest.jar
geronimo-activation_1.1_spec-1.0.2.jar
geronimo-annotation_1.0_spec-1.1.1.jar
geronimo-javamail_1.4_spec-1.6.jar
geronimo-jaxws_2.1_spec-1.0.jar
geronimo-stax-api_1.0_spec-1.0.1.jar
geronimo-ws-metadata_2.0_spec-1.1.2.jar
jaxb-api-2.2.1.jar
jaxb-impl-2.2.1.1.jar
jaxb-xjc-2.2.1.1.jar
jstl.jar
log4j-1.2.15.jar
spring-aop-3.0.4.RELEASE.jar
spring-asm-3.0.4.RELEASE.jar
spring-beans-3.0.4.RELEASE.jar
spring-context-3.0.4.RELEASE.jar
spring-core-3.0.4.RELEASE.jar
spring-expression-3.0.4.RELEASE.jar
spring-jms-3.0.4.RELEASE.jar
spring-tx-3.0.4.RELEASE.jar
spring-web-3.0.4.RELEASE.jar
standard.jar
wsdl4j-1.6.2.jar
wss4j-1.5.9.jar
xalan-2.7.1.jar
xml-resolver-1.2.jar
xmlbeans-2.4.0.jar
XmlSchema-1.4.7.jar
xmlsec-1.4.3.jar

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM