Mirror of Apache CXF

Clone this repo:
  1. bbb62e7 Bump github/codeql-action from 4.36.1 to 4.36.2 (#344) by dependabot[bot] · 2 days ago main
  2. 747a736 Bump org.codehaus.plexus:plexus-archiver from 4.11.0 to 4.12.0 (#343) by dependabot[bot] · 2 days ago
  3. 0cf0f4a Bump org.eclipse.jdt:org.eclipse.jdt.core from 3.45.0 to 3.46.0 (#342) by dependabot[bot] · 6 days ago
  4. a0395b9 Bump github/codeql-action from 4.36.0 to 4.36.1 (#341) by dependabot[bot] · 9 days ago
  5. 67f7fe8 Bump jaxb-runtime-version from 4.0.8 to 4.0.9 (#339) by dependabot[bot] · 14 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.