Mirror of Apache CXF

Clone this repo:
  1. f306054 Bump github/codeql-action/init from 4.37.6 to 4.37.7 (#361) by dependabot[bot] · 20 hours ago main
  2. 87bb296 Pin GitHub actions to SHA-1 by Colm O hEigeartaigh · 2 weeks ago
  3. 829d702 Bump actions/setup-java from 5.6.0 to 5.7.0 (#358) by dependabot[bot] · 2 weeks ago
  4. 6cba40b Bump github/codeql-action from 4.37.3 to 4.37.6 (#357) by dependabot[bot] · 2 weeks ago
  5. f3a465e Bump org.apache.felix:maven-bundle-plugin from 6.0.2 to 6.1.0 (#355) by dependabot[bot] · 3 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.