<defaultOptions> <frontEnd>jaxws21</frontEnd> </defaultOptions>
This is how I solved the problem using maven:
<plugin> <groupId>org.apache.cxf</groupId> <artifactId>cxf-codegen-plugin</artifactId> <version>2.5.2</version> <executions> <execution> <id>generate-sources2</id> <configuration> <sourceRoot>${basedir}/target/generated-sources/cxf</sourceRoot> <defaultOptions> <frontEnd>jaxws21</frontEnd> </defaultOptions> <wsdlOptions> <wsdlOption> <wsdl>...</wsdl> </wsdlOption> </wsdlOptions> </configuration> <goals> <goal>wsdl2java</goal> </goals> </execution> </executions> </plugin>
EDIT: I found another way to solve this problem using maven and cxf version 2.7.3. Add these libraries to your dependencies. Now you do not need to use the jaxws21 option:
<dependency> <groupId>javax.xml.ws</groupId> <artifactId>jaxws-api</artifactId> <version>2.2.9</version> </dependency> <dependency> <groupId>javax.xml.bind</groupId> <artifactId>jaxb-api</artifactId> <version>2.2.7</version> </dependency>
Jan-Terje Sรธrensen
source share