Class Wsdl2JavaOptions

java.lang.Object
io.mateo.cxf.codegen.wsdl2java.Wsdl2JavaOptions

public abstract class Wsdl2JavaOptions extends Object
Options for the wsdl2java tool.
See Also:
  • Constructor Details

    • Wsdl2JavaOptions

      public Wsdl2JavaOptions()
  • Method Details

    • getWsdl

      @Input public abstract Property<String> getWsdl()
      WSDL to process. The value can either be a direct path to a file on a local system or URL to a remote file.
      Returns:
      wsdl file
    • getOutputDir

      @OutputDirectory @Optional public abstract DirectoryProperty getOutputDir()
      Specifies the directory the generated code files are written.

      If not set, the convention is "$buildDir/$taskName-wsdl2java-generated-sources"

      Returns:
      output directory
    • getPackageNames

      @Input @Optional public abstract ListProperty<String> getPackageNames()
      Specifies zero, or more, package names to use for the generated code.

      Optionally specifies the WSDL namespace to package name mapping.

      Returns:
      package names
    • getExtraArgs

      @Input @Optional public abstract ListProperty<String> getExtraArgs()
      Specifies extra arguments to pass to the command-line code generator.
      Returns:
      extra arguments
    • getXjcArgs

      @Input @Optional public abstract ListProperty<String> getXjcArgs()
      Specifies arguments that are passed directly to the XJC processor when using the JAXB data binding.
      Returns:
      xjc arguments
    • getAsyncMethods

      @Input @Optional public abstract ListProperty<String> getAsyncMethods()
      Specifies subsequently generated Java class methods to allow for client-side asynchronous calls, similar to enableAsyncMapping in a JAX-WS binding file.
      Returns:
      async methods
    • getBareMethods

      @Input @Optional public abstract ListProperty<String> getBareMethods()
      Specifies subsequently generated Java class methods to have wrapper style, similar to enableWrapperStyle in JAX-WS binding file.
      Returns:
      bare methods
    • getMimeMethods

      @Input @Optional public abstract ListProperty<String> getMimeMethods()
      Specifies subsequently generated Java class methods to enable mime:content mapping, similar to enableMIMEContent in JAX-WS binding file.
      Returns:
      mime methods
    • getNamespaceExcludes

      @Input @Optional public abstract ListProperty<String> getNamespaceExcludes()
      Ignore the specified WSDL schema namespace when generating code.

      Optionally specifies the Java package name used by types described in the excluded namespace(s) using schema-namespace[=java-packagename]

      Returns:
      namespace excludes
    • getDefaultExcludesNamespace

      @Input @Optional public abstract Property<Boolean> getDefaultExcludesNamespace()
      Enables or disables the loading of the default excludes namespace mapping.

      If not set, wsdl2java defaults to true.

      Returns:
      default excludes namespace indicator
    • getDefaultNamespacePackageMapping

      @Input @Optional public abstract Property<Boolean> getDefaultNamespacePackageMapping()
      Enables or disables the loading of the default namespace package name mapping.

      If not set, wsdl2java defaults to true and http://www.w3.org/2005/08/addressing package mapping will be enabled.

      Returns:
      default namespace package mapping indicator
    • getBindingFiles

      @Input @Optional public abstract SetProperty<String> getBindingFiles()
      Specifies JAX-WS or JAXB binding files or XMLBeans context files.

      The values are evaluated as per Directory.file(String) from ProjectLayout.getProjectDirectory()

      Returns:
      binding files
    • getWsdlLocation

      @Input @Optional public abstract Property<String> getWsdlLocation()
      Specifies the value of the @WebServiceClient annotation's wsdlLocation property.

      By default, the wsdl2java tool will use the value of #getWsdlUrl(). This may lead to runtime issues such as FileNotFoundException being thrown. Consider setting this value to a location that your application understands. For example (Kotlin DSL), a classpath location:

       tasks.register("example", Wsdl2Java::class) {
              toolOptions {
                      wsdlUrl.set(layout.projectDirectory.file("src/main/resources/wsdl/example.wsdl").asFile.absolutePath)
                      wsdlLocation.set("classpath:wsdl/example.wsdl")
              }
       }
       
      Returns:
      wsdl location
    • getWsdlList

      @Input @Optional public abstract Property<Boolean> getWsdlList()
      Specifies that the wsdlurl contains a plain text, new line delimited, list of wsdlurls instead of the WSDL itself.
      Returns:
      wsdl list flag
    • getFrontend

      @Input @Optional public abstract Property<String> getFrontend()
      Specifies the frontend. Currently only supports JAX-WS CXF frontends and a jaxws21 frontend to generate JAX-WS 2.1 compliant code.

      If not set, wsdl2java defaults to jaxws

      Returns:
      frontend
    • getDatabinding

      @Input @Optional public abstract Property<String> getDatabinding()
      Specifies the databinding. Currently supports JAXB, XMLBeans, SDO (sdo-static * and sdo-dynamic), and JiBX.

      If not set, wsdl2java defaults to jaxb

      Returns:
      databinding
    • getWsdlVersion

      @Input @Optional public abstract Property<String> getWsdlVersion()
      Specifies the WSDL version.

      If not set, wsdl2java defaults to WSDL1.1; currently supports only WSDL1.1 version.

      Returns:
      wsdl version
    • getCatalog

      @Input @Optional public abstract Property<String> getCatalog()
      Specify catalog file to map the imported WSDL/schema.
      Returns:
      catalog
    • getExtendedSoapHeaders

      @Input @Optional public abstract Property<Boolean> getExtendedSoapHeaders()
      Enables or disables processing of implicit SOAP headers (i.e. SOAP headers defined in the wsdl:binding, but not wsdl:portType section.)

      Processing the SOAP headers requires the SOAP binding JARs available on the classpath which was not the default in CXF 2.4.x and older. You may need to add a dependency to cxf-rt-binding-soap for this flag to work.

      If not set, wsdl2java defaults to false.

      Returns:
      extended SOAP headers indicator
    • getValidateWsdl

      @Input @Optional public abstract Property<String> getValidateWsdl()
      Enables validating the WSDL before generating the code.
      Returns:
      validate WSDL
    • getNoTypes

      @Input @Optional public abstract Property<Boolean> getNoTypes()
      Enables or disables generation of the type classes.

      If not set, wsdl2java defaults to false.

      Returns:
      no types indicator
    • getFaultSerialVersionUid

      @Input @Optional public abstract Property<String> getFaultSerialVersionUid()
      Specifies how to generate serial version UID of fault exceptions.

      Use one of the following:

      • NONE
      • TIMESTAMP
      • FQCN
      • a specific number

      If not set, wsdl2java defaults to NONE.

      Returns:
      fault serial version UID
    • getExceptionSuper

      @Input @Optional public abstract Property<String> getExceptionSuper()
      Specifies the superclass for fault beans generated from wsdl:fault elements

      If not set, wsdl2java defaults to Exception.

      Returns:
      exception superclass
    • getSeiSuper

      @Input @Optional public abstract ListProperty<String> getSeiSuper()
      Specifies the superinterfaces to use for generated SEIs.
      Returns:
      super interfaces
    • getMarkGenerated

      @Input @Optional public abstract Property<Boolean> getMarkGenerated()
      Enables or disables adding the @Generated annotation to classes generated.
      Returns:
      mark generated indicator
    • getSuppressGeneratedDate

      @Input @Optional public abstract Property<Boolean> getSuppressGeneratedDate()
      Enables or disables writing the current timestamp in the generated file (since CXF version 3.2.2).
      Returns:
      suppress generated date indicator
    • getServiceName

      @Input @Optional public abstract Property<String> getServiceName()
      Specifies the WSDL service name to use for the generated code.
      Returns:
      service name
    • getAutoNameResolution

      @Input @Optional public abstract Property<Boolean> getAutoNameResolution()
      Enables or disables automatically resolving naming conflicts without requiring the use of binding customizations.
      Returns:
      auto name resolution indicator
    • getNoAddressBinding

      @Input @Optional public abstract Property<Boolean> getNoAddressBinding()
      For compatibility with CXF 2.0, this flag directs the code generator to generate the older CXF proprietary WS-Addressing types instead of the JAX-WS 2.1 compliant WS-Addressing types.
      Returns:
      no address binding indicator
    • getAllowElementRefs

      @Input @Optional public abstract Property<Boolean> getAllowElementRefs()
      Enables or disables disregarding the rule given in section 2.3.1.2(v) of the JAX-WS 2.2 specification disallowing element references when using wrapper-style mapping.
      Returns:
      allow element references indicator
    • getEncoding

      @Input @Optional public abstract Property<String> getEncoding()
      Encoding to use for generated sources (since CXF version 2.5.4).
      Returns:
      encoding
    • getVerbose

      @Input @Optional public abstract Property<Boolean> getVerbose()
      Enables or disables verbosity.
      Returns:
      verbosity indicator