Issue
I am trying to generate java files from wadl file through cxf-wadl2java-plugin. There is a SOF post which talks about this of putting of all xsd files at the same location of wadl file href="https://stackoverflow.com/questions/31117619/cxf-wadl2java-generate-code-from-grammar">SOF post I put all xsd files in the same wadl file location but of no result. Any sample pom XML would be of great help. wondering if anyone tried wadl2java for xsd grammars as well. Thanks in-advance! Below is the pom XML entry:
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-wadl2java-plugin</artifactId>
<version>3.5.0</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>${basedir}/target/generated-sources/cxf</sourceRoot>
<wadlOptions>
<wadlOption>
<wadl>${basedir}/src/main/resources/model/file_name.wadl</wadl>
<impl>false</impl>
<packagename>com.services.rest.v1</packagename>
<generateImpl>true</generateImpl>
</wadlOption>
</wadlOptions>
</configuration>
<goals>
<goal>wadl2java</goal>
</goals>
</execution>
</executions>
</plugin>
Solution
Yes we need to put all xsd files into the same location as wadl file to generate the java code. Only something I've observed that the implementation classes are just null implementation. May be we need to update the boilerplate code further. But the issue of generating the java code from xsd file is resolved.
Answered By - lifeline2
Answer Checked By - David Marino (JavaFixing Volunteer)