Mirror of Apache CXF

Clone this repo:
  1. a0395b9 Bump github/codeql-action from 4.36.0 to 4.36.1 (#341) by dependabot[bot] · 2 days ago main
  2. 67f7fe8 Bump jaxb-runtime-version from 4.0.8 to 4.0.9 (#339) by dependabot[bot] · 6 days ago
  3. 38e47b9 Merge pull request #334 from potiuk/asf-security/discoverability-2026-05-31 by Colm O hEigeartaigh · 8 days ago
  4. 0dd32ad Bump org.apache.maven.plugins:maven-surefire-report-plugin (#335) by dependabot[bot] · 9 days ago
  5. 9db265d Bump org.apache.maven.plugins:maven-dependency-plugin (#336) by dependabot[bot] · 9 days 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.