I've been trying to get cxf-codegen-plugin working on Java 9 with some resistance. So far I've added java.se.ee to the runtime modules and added the necessary dependencies to maven.
However, when I try to build my sources I get the following error:
DefaultValidationEventHandler: [ERROR]: unexpected element (uri:"http://cxf.apache.org/tools/plugin", local:"databinding"). Expected elements are <{}databinding>,<{}frontend>
Location: node: [databinding: null]
apr. 21, 2018 8:23:57 EM org.apache.cxf.tools.wsdlto.core.PluginLoader loadPlugin
ALLVARLIG: Tools plugin jar:file:/C:/Users/Daniel/.m2/repository/org/apache/cxf/cxf-tools-wsdlto-core/3.2.4/cxf-tools-wsdlto-core-3.2.4.jar!/META-INF/tools-plugin.xml load failed
Any ideas what might be causing this or how to fix it?
CXF includes a Maven plugin which can generate java artifacts from WSDL. Here is a simple example: < plugin > < groupId >org.apache.cxf</ groupId > < artifactId >cxf-codegen-plugin</ artifactId >
There are many ways to generate Java classes from WSDL files – one of them is using the cxf-codegen-plugin, which comes from the Apache Maven CXF.
hykes. Compatible with IntelliJ IDEA (Ultimate, Community, Educational), WebStorm. GitHub | Issues | JetBrains. This plugin helps you to generate specific template code by create table statement or database .
You will have to make sure that you create an appropriate directory structure for your project and add the earlier shown hello. wsdl file to the specified folder. The wsdl2java plugin will compile this wsdl and create Apache CXF classes in a pre-defined folder.
Run into the same issue, I ended up changing the plugin configuration and adding the required modules explicitly:
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>3.2.4</version>
<configuration>
<additionalJvmArgs>--add-modules java.xml.bind,java.xml.ws</additionalJvmArgs>
<fork>once</fork>
</configuration>
</plugin>
It seems to work for Java 9/10 but certainly not going to work for Java 11.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With