Skip to content

JAX-WS Binding File

Workers

kotlin
import io.mateo.cxf.codegen.workers.Wsdl2JavaOption

// ...

cxfCodegen {
    options {
        register<Wsdl2JavaOption>("calculator") {
            wsdl = file("wsdls/calculator.wsdl").toPath().toAbsolutePath().toString()
            bindingFiles.add(file("async-binding.xml").toPath().toAbsolutePath().toString())
        }
    }
}
groovy
import io.mateo.cxf.codegen.workers.Wsdl2JavaOption

// ...

cxfCodegen {
    options {
        register("calculator", Wsdl2JavaOption) {
            wsdl = file("wsdls/calculator.wsdl").toPath().toAbsolutePath().toString()
            bindingFiles.add(file("async-binding.xml").toPath().toAbsolutePath().toString())
        }
    }
}
  1. Add the path of the binding file to the list property of binding files.

Task

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

// ...

tasks.register("calculator", Wsdl2Java::class) {
    toolOptions {
        wsdl = layout.projectDirectory.file("calculator.wsdl").asFile.toPath().toAbsolutePath().toString()
        bindingFiles.add(layout.projectDirectory.file("async-binding.xml").asFile.absolutePath) // <1>
    }
}
groovy
import io.mateo.cxf.codegen.wsdl2java.Wsdl2Java

// ...

tasks.register("calculator", Wsdl2Java) {
    toolOptions {
        wsdl = layout.projectDirectory.file("calculator.wsdl").asFile.toPath().toAbsolutePath().toString()
        bindingFiles.add(layout.projectDirectory.file("async-binding.xml").asFile.absolutePath) // <1>
    }
}
  1. Add the path of the binding file to the list property of binding files.

Released under Apache 2.0 license