[英]What's wrong with my Apache CXF client?
This is part of my pom.xml
: 这是我的pom.xml
一部分:
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>${cxf.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>${cxf.version}</version>
<scope>runtime</scope>
</dependency>
I'm trying to use Apache CXF as an implementation of JAX-WS. 我正在尝试使用Apache CXF作为JAX-WS的实现。 Everything works fine (Java code is generated from WSDL by means of org.apache.cxf:cxf-codegen-plugin:2.4.0
), until execution: 一切正常(Java代码是通过org.apache.cxf:cxf-codegen-plugin:2.4.0
从WSDL生成的org.apache.cxf:cxf-codegen-plugin:2.4.0
),直到执行:
java.lang.NoSuchMethodError:
javax.wsdl.xml.WSDLReader.readWSDL(Ljavax/wsdl/xml/WSDLLocator;Lorg/w3c/dom/Element;)Ljavax/wsdl/Definition;
at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:237)
at org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:186)
at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:91)
at org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:203)
at org.apache.cxf.jaxws.ServiceImpl.<init>(ServiceImpl.java:147)
at org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:90)
at javax.xml.ws.Service.<init>(Service.java:56)
....
What is it about? 这是什么意思? What dependency did I miss? 我错过了什么依赖?
You likely have a 1.5 (or older) version of wsdl4j coming from someplace else. 您可能有来自其他地方的1.5(或更旧)版本的wsdl4j。 CXF requires the 1.6.x versions. CXF需要1.6.x版本。
EDIT: 编辑:
Also be on the lookout for the Axis version of this jar. 还要留意这个罐子的Axis版本。 You can exclude it like so: 你可以这样排除它:
<exclusions>
<exclusion>
<artifactId>axis-wsdl4j</artifactId>
<groupId>axis</groupId>
</exclusion>
</exclusions>
这种依赖关系是wsdl4j-1.6.2.jar,它可能无法使用您拥有的当前依赖关系进行传递解析。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.