Mirror of Apache CXF

Clone this repo:
  1. 9557e17 Bump org.apache:apache from 38 to 39 (#348) by dependabot[bot] · 11 days ago main
  2. d114446 Bump org.javassist:javassist from 3.31.0-GA to 3.32.0-GA (#347) by dependabot[bot] · 13 days ago
  3. 4d6f391 Bump actions/checkout from 6 to 7 (#345) by dependabot[bot] · 3 weeks ago
  4. bbb62e7 Bump github/codeql-action from 4.36.1 to 4.36.2 (#344) by dependabot[bot] · 4 weeks ago
  5. 747a736 Bump org.codehaus.plexus:plexus-archiver from 4.11.0 to 4.12.0 (#343) by dependabot[bot] · 4 weeks ago

Apache CXF XJC Utils

A collection of XJC (JAXB XML-to-Java compiler) plugins and utilities for use with Apache CXF. These extensions augment CXF's code generation pipeline when compiling XML Schemas and WSDL files into Java.

Modules

ModuleDescription
bug671Fix for XJC bug 671 — corrects generated code for certain schema patterns
bug986Fix for XJC bug 986 — corrects generated code for certain schema patterns
dvData validation plugin — annotates generated classes with Bean Validation (JSR-303) constraints derived from XML Schema facets (e.g. minLength, maxOccurs, pattern)
tsType substitution plugin — enables proper handling of xsi:type substitution in generated code
wsdlextensionWSDL extension utilities — supports additional WSDL processing during CXF code generation

Usage

The plugins are applied via the cxf-codegen-plugin Maven plugin. Add the desired artifact as a plugin dependency:

<plugin>
  <groupId>org.apache.cxf</groupId>
  <artifactId>cxf-codegen-plugin</artifactId>
  <dependencies>
    <dependency>
      <groupId>org.apache.cxf.xjcplugins</groupId>
      <artifactId>cxf-xjc-dv</artifactId>
      <version>${cxf-xjc-utils.version}</version>
    </dependency>
  </dependencies>
</plugin>

Then activate the plugin in your wsdl2java configuration:

<configuration>
  <defaultOptions>
    <extraargs>
      <extraarg>-xjc-Xdv</extraarg>
    </extraargs>
  </defaultOptions>
</configuration>

Requirements

  • Java 11+
  • Maven 3.x
  • Apache CXF 4.x (for the matching release line)

Building from Source

git clone https://github.com/apache/cxf-xjc-utils.git
cd cxf-xjc-utils
mvn install

License

Apache License, Version 2.0. See LICENSE for details.