CXF codegen plugin creating classes with references to defunct JAXB
AccessorOrder class
---------------------------------------------------------------------------------------
Key: CXF-1672
URL: https://issues.apache.org/jira/browse/CXF-1672
Project: CXF
Issue Type: Bug
Components: JAXB Databinding, WS-* Components
Affects Versions: 2.0.7, 2.1.1, 2.0.6, 2.1
Environment: Kubuntu 7.10, Eclipse 3.3.2, IndexStock WSDL, Maven
2.0.9, Java version: 1.5.0_13, OS name: "linux" version: "2.6.22-15-generic"
arch: "i386", SpringFramework 2.5.4 (except spring-remoting, which is 2.0.8
because it apparently hasn't been caught up), CXF 2.1.1
Reporter: Philip Schlesinger
Hi all - hoping you can help on this one.
WSDL:
http://webservices.indexstock.com/ImageSearch/2003/07/15/imagesearch.asmx?WSDL
I'm generating sources with the CXF Maven plugin. mvn test ends up throwing an
exception as it can't find the class javax/xml/bind/annotation/AccessorOrder -
which apparently was released as part of jaxb-api 2.0EA3 but disappeared as
soon as jaxb-api 2.0 was finalized. Full log will be attached to this post.
The 2.0EA3 class is available as part of the EOL'd Sun JWSDP, available here:
http://java.sun.com/webservices/downloads/previous/webservicespack.jsp
If you unpack the download and look through the jaxb-api.jar, you'll find the
AccessorOrder class
However, as of 2.0 release, it's now XMLAccessorOrder class. Meanwhile,
maven's junit plugin is looking for AccessorOrder.
How do I fix this?
- Phil
JAXB dependencies:
{code}
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>javax.xml</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.0EA3</version>
</dependency>
<dependency>
<groupId>javax.xml</groupId>
<artifactId>jaxb-xjc</artifactId>
<version>2.0EA3</version>
</dependency>
{code}
Exclusions for each of the CXF dependencies in the pom because I com.sun.*
makes things fail:
{code}
<exclusions>
<exclusion>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-xjc</artifactId>
</exclusion>
</exclusions>
{code|
codegen plugin:
{code}
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>2.1.1</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>
${basedir}/target/generated/src/main/java
</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>
http://webservices.indexstock.com/ImageSearch/2003/07/15/imagesearch.asmx?WSDL
</wsdl>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
{code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.