Skip to content

CXF Codegen 1.1.0 Release Notes

ciscoo edited this page Feb 21, 2023 · 1 revision

Upgrading from CXF Codegen 1.0.x

Deprecations from 1.0.0

The cxfCodegen extension has been removed and all associated code also removed. This includes the Wsdl2JavaTask task type.

For a full list of removals, refer to commits associated with GH-66.

New and noteworthy

Gradle 8

The plugin is now built and tested against Gradle 8.

Generate Java Sources from URL

A new option has been added to the Wsdl2Java tool options to allow generating Java from a URL. This allows WSDLs hosted on a remote service to be used rather than a local copy/file. For example:

Groovy
import io.mateo.cxf.codegen.wsdl2java.Wsdl2Java

// ...

tasks.register("example", Wsdl2Java) {
    toolOptions {
        wsdlUrl.set("https://example.com/example?wsdl")
    }
}
Kotlin
import io.mateo.cxf.codegen.wsdl2java.Wsdl2Java

// ...

tasks.register("example", Wsdl2Java::class) {
    toolOptions {
        wsdlUrl.set("https://example.com/example?wsdl")
    }
}

The wsdlUrl property can also be the path of a local WSDL as well. In a future release, the wsdl property will be changed to Property<String> and wsdlUrl removed.

Either wsdlUrl or wsdl can be set; the convention of wsdlUrl is the wsdl property mapped to a file URI.

For more details, see the issue comments.

Generate JavaScript Sources

A new task type Wsdl2Js has been added to generate JavaScript sources from a WSDL document. Like the Wsdl2Java task, the toolOptions can be used to configure the options for the wsdl2js tool:

Groovy
import io.mateo.cxf.codegen.wsdl2js.Wsdl2Js

// ...

tasks.register("example", Wsdl2Js) {
    toolOptions {
        wsdl.set(file("path/to/example.wsdl").absolutePath)
    }
}
Kotlin
import io.mateo.cxf.codegen.wsdl2js.Wsdl2Js

// ...

tasks.register("example", Wsdl2Js::class) {
    toolOptions {
        wsdl.set(file("path/to/example.wsdl").absolutePath)
    }
}