Quarkus CXF

Stable • Since 0.1.0

Core capabilities for implementing SOAP clients and JAX-WS services.

Maven coordinates

Create a new project using quarkus-cxf on code.quarkus.io or add these coordinates to your existing project:

<dependency>
    <groupId>io.quarkiverse.cxf</groupId>
    <artifactId>quarkus-cxf</artifactId>
</dependency>
Check the User guide and especially its Dependency management section for more information about writing applications with CXF Extensions for Quarkus.

Supported standards

Usage

Configuration

Configuration property fixed at build time - All other configuration properties are overridable at runtime

Configuration property

Type

Default

The default path for CXF resources. ⚠️ Note that the default value before 3.0.0 was /.

Environment variable: QUARKUS_CXF_PATH

string

/

If true wsdl2java code generation is run whenever there are WSDL resources found on default or custom defined locations; otherwise wsdl2java is not executed.

Environment variable: QUARKUS_CXF_CODEGEN_WSDL2JAVA_ENABLED

boolean

true

A comma separated list of glob patterns for selecting WSDL files which should be processed with wsdl2java tool. The paths are relative to src/main/resources or src/test/resources directories of the current Maven or Gradle module. The glob syntax is specified in io.quarkus.util.GlobUtil. Examples: - calculator.wsdl,fruits.wsdl will match src/main/resources/calculator.wsdl and src/main/resources/fruits.wsdl under the current Maven or Gradle module, but will not match anything like src/main/resources/subdir/calculator.wsdl - my-*-service.wsdl will match src/main/resources/my-foo-service.wsdl and src/main/resources/my-bar-service.wsdl - **.wsdl will match any of the above There is a separate wsdl2java execution for each of the matching WSDL files. If you need different additional-params for each WSDL file, you may want to define a separate named parameter set for each one of them. Here is an example: # Parameters for foo.wsdl quarkus.cxf.codegen.wsdl2java.foo-params.includes = wsdl/foo.wsdl quarkus.cxf.codegen.wsdl2java.foo-params.additional-params = -wsdlLocation,wsdl/foo.wsdl # Parameters for bar.wsdl quarkus.cxf.codegen.wsdl2java.bar-params.includes = wsdl/bar.wsdl quarkus.cxf.codegen.wsdl2java.bar-params.additional-params = -wsdlLocation,wsdl/bar.wsdl,-xjc-Xts Note that file extensions other than .wsdl will work during normal builds, but changes in the matching files may get overseen in Quarkus dev mode. Always using the .wsdl extension is thus recommended. There is no default value for this option, so wsdl2java code generation is disabled by default. Specifying quarkus.cxf.codegen.wsdl2java.my-name.excludes without setting any includes will cause a build time error. Make sure that the file sets selected by quarkus.cxf.codegen.wsdl2java.includes and quarkus.cxf.codegen.wsdl2java.[whatever-name].includes do not overlap. Otherwise a build time exception will be thrown. The files from src/main/resources selected by includes and excludes are automatically included in native image and therefore you do not need to include them via quarkus.cxf.wsdl-path (deprecated) or quarkus.native.resources.includes/excludes.

Environment variable: QUARKUS_CXF_CODEGEN_WSDL2JAVA_INCLUDES

list of string

A comma separated list of path patterns for selecting WSDL files which should not be processed with wsdl2java tool. The paths are relative to src/main/resources or src/test/resources directories of the current Maven or Gradle module. Same syntax as includes.

Environment variable: QUARKUS_CXF_CODEGEN_WSDL2JAVA_EXCLUDES

list of string

A comma separated list of additional command line parameters that should passed to CXF wsdl2java tool along with the files selected by includes and excludes. Example: -wsdlLocation,classpath:wsdl/CalculatorService.wsdl. Check wsdl2java documentation for all supported options. You need to add io.quarkiverse.cxf:quarkus-cxf-xjc-plugins dependency to your project to be able to use -xjc-Xbg, -xjc-Xdv, -xjc-Xjavadoc, -xjc-Xproperty-listener, -xjc-Xts or -xjc-Xwsdlextension.

Environment variable: QUARKUS_CXF_CODEGEN_WSDL2JAVA_ADDITIONAL_PARAMS

list of string

If true java2ws WSDL generation is run whenever there are Java classes selected via includes and excludes options; otherwise java2ws is not executed.

Environment variable: QUARKUS_CXF_JAVA2WS_ENABLED

boolean

true

A comma separated list of glob patterns for selecting class names which should be processed with java2ws tool. The glob syntax is specified in io.quarkus.util.GlobUtil. The patterns are matched against fully qualified class names, such as org.acme.MyClass. The universe of class names to which includes and excludes are applied is defined as follows: 1. Only classes visible in Jandex are considered. 2. From those, only the ones annotated with @WebService are selected. Examples: Let’s say that the application contains two classes annotated with @WebService and that both are visible in Jandex. Their names are org.foo.FruitWebService and org.bar.HelloWebService. Then - quarkus.cxf.java2ws.includes = **.*WebService will match both class names - quarkus.cxf.java2ws.includes = org.foo.* will match only org.foo.FruitWebService There is a separate java2ws execution for each of the matching class names. If you need different additional-params for each class, you may want to define a separate named parameter set for each one of them. Here is an example: # Parameters for the foo package quarkus.cxf.java2ws.foo-params.includes = org.foo.* quarkus.cxf.java2ws.foo-params.additional-params = -servicename,FruitService # Parameters for the bar package quarkus.cxf.java2ws.bar-params.includes = org.bar.* quarkus.cxf.java2ws.bar-params.additional-params = -servicename,HelloService There is no default value for this option, so java2ws WSDL generation is effectively disabled by default. Specifying quarkus.cxf.java2ws.excludes without setting any includes will cause a build time error. Make sure that the class names selected by quarkus.cxf.java2ws.includes and quarkus.cxf.java2ws.[whatever-name].includes do not overlap. Otherwise a build time exception will be thrown. If you would like to include the generated WSDL files in native image, you need to add them yourself using quarkus.native.resources.includes/excludes.

Environment variable: QUARKUS_CXF_JAVA2WS_INCLUDES

list of string

A comma separated list of glob patterns for selecting java class names which should not be processed with java2ws tool. Same syntax as includes.

Environment variable: QUARKUS_CXF_JAVA2WS_EXCLUDES

list of string

A comma separated list of additional command line parameters that should be passed to CXF java2ws tool along with the files selected by includes and excludes. Example: -portname,12345. Check java2ws documentation for all supported options. Note that only options related to generation of WSDL from Java are supported currently.

Environment variable: QUARKUS_CXF_JAVA2WS_ADDITIONAL_PARAMS

list of string

A template for the names of generated WSDL files. There are 4 place holders, which can be used in the template: - %SIMPLE_CLASS_NAME% - the simple class name of the Java class from which we are generating - %FULLY_QUALIFIED_CLASS_NAME% - the fully qualified name from which we are generating with all dots are replaced replaced by underscores - %TARGET_DIR% - the target directory of the current module of the current build tool; typically target for Maven and build for Gradle. - %CLASSES_DIR% - the compiler output directory of the current module of the current build tool; typically target/classes for Maven and build/classes for Gradle.

Environment variable: QUARKUS_CXF_JAVA2WS_WSDL_NAME_TEMPLATE

string

%CLASSES_DIR%/wsdl/%SIMPLE_CLASS_NAME%.wsdl

A comma separated list of glob patterns for selecting WSDL files which should be processed with wsdl2java tool. The paths are relative to src/main/resources or src/test/resources directories of the current Maven or Gradle module. The glob syntax is specified in io.quarkus.util.GlobUtil. Examples: - calculator.wsdl,fruits.wsdl will match src/main/resources/calculator.wsdl and src/main/resources/fruits.wsdl under the current Maven or Gradle module, but will not match anything like src/main/resources/subdir/calculator.wsdl - my-*-service.wsdl will match src/main/resources/my-foo-service.wsdl and src/main/resources/my-bar-service.wsdl - **.wsdl will match any of the above There is a separate wsdl2java execution for each of the matching WSDL files. If you need different additional-params for each WSDL file, you may want to define a separate named parameter set for each one of them. Here is an example: # Parameters for foo.wsdl quarkus.cxf.codegen.wsdl2java.foo-params.includes = wsdl/foo.wsdl quarkus.cxf.codegen.wsdl2java.foo-params.additional-params = -wsdlLocation,wsdl/foo.wsdl # Parameters for bar.wsdl quarkus.cxf.codegen.wsdl2java.bar-params.includes = wsdl/bar.wsdl quarkus.cxf.codegen.wsdl2java.bar-params.additional-params = -wsdlLocation,wsdl/bar.wsdl,-xjc-Xts Note that file extensions other than .wsdl will work during normal builds, but changes in the matching files may get overseen in Quarkus dev mode. Always using the .wsdl extension is thus recommended. There is no default value for this option, so wsdl2java code generation is disabled by default. Specifying quarkus.cxf.codegen.wsdl2java.my-name.excludes without setting any includes will cause a build time error. Make sure that the file sets selected by quarkus.cxf.codegen.wsdl2java.includes and quarkus.cxf.codegen.wsdl2java.[whatever-name].includes do not overlap. Otherwise a build time exception will be thrown. The files from src/main/resources selected by includes and excludes are automatically included in native image and therefore you do not need to include them via quarkus.cxf.wsdl-path (deprecated) or quarkus.native.resources.includes/excludes.

Environment variable: QUARKUS_CXF_CODEGEN_WSDL2JAVA__NAMED_PARAMETER_SETS__INCLUDES

list of string

A comma separated list of path patterns for selecting WSDL files which should not be processed with wsdl2java tool. The paths are relative to src/main/resources or src/test/resources directories of the current Maven or Gradle module. Same syntax as includes.

Environment variable: QUARKUS_CXF_CODEGEN_WSDL2JAVA__NAMED_PARAMETER_SETS__EXCLUDES

list of string

A comma separated list of additional command line parameters that should passed to CXF wsdl2java tool along with the files selected by includes and excludes. Example: -wsdlLocation,classpath:wsdl/CalculatorService.wsdl. Check wsdl2java documentation for all supported options. You need to add io.quarkiverse.cxf:quarkus-cxf-xjc-plugins dependency to your project to be able to use -xjc-Xbg, -xjc-Xdv, -xjc-Xjavadoc, -xjc-Xproperty-listener, -xjc-Xts or -xjc-Xwsdlextension.

Environment variable: QUARKUS_CXF_CODEGEN_WSDL2JAVA__NAMED_PARAMETER_SETS__ADDITIONAL_PARAMS

list of string

A comma separated list of glob patterns for selecting class names which should be processed with java2ws tool. The glob syntax is specified in io.quarkus.util.GlobUtil. The patterns are matched against fully qualified class names, such as org.acme.MyClass. The universe of class names to which includes and excludes are applied is defined as follows: 1. Only classes visible in Jandex are considered. 2. From those, only the ones annotated with @WebService are selected. Examples: Let’s say that the application contains two classes annotated with @WebService and that both are visible in Jandex. Their names are org.foo.FruitWebService and org.bar.HelloWebService. Then - quarkus.cxf.java2ws.includes = **.*WebService will match both class names - quarkus.cxf.java2ws.includes = org.foo.* will match only org.foo.FruitWebService There is a separate java2ws execution for each of the matching class names. If you need different additional-params for each class, you may want to define a separate named parameter set for each one of them. Here is an example: # Parameters for the foo package quarkus.cxf.java2ws.foo-params.includes = org.foo.* quarkus.cxf.java2ws.foo-params.additional-params = -servicename,FruitService # Parameters for the bar package quarkus.cxf.java2ws.bar-params.includes = org.bar.* quarkus.cxf.java2ws.bar-params.additional-params = -servicename,HelloService There is no default value for this option, so java2ws WSDL generation is effectively disabled by default. Specifying quarkus.cxf.java2ws.excludes without setting any includes will cause a build time error. Make sure that the class names selected by quarkus.cxf.java2ws.includes and quarkus.cxf.java2ws.[whatever-name].includes do not overlap. Otherwise a build time exception will be thrown. If you would like to include the generated WSDL files in native image, you need to add them yourself using quarkus.native.resources.includes/excludes.

Environment variable: QUARKUS_CXF_JAVA2WS__NAMED_PARAMETER_SETS__INCLUDES

list of string

A comma separated list of glob patterns for selecting java class names which should not be processed with java2ws tool. Same syntax as includes.

Environment variable: QUARKUS_CXF_JAVA2WS__NAMED_PARAMETER_SETS__EXCLUDES

list of string

A comma separated list of additional command line parameters that should be passed to CXF java2ws tool along with the files selected by includes and excludes. Example: -portname,12345. Check java2ws documentation for all supported options. Note that only options related to generation of WSDL from Java are supported currently.

Environment variable: QUARKUS_CXF_JAVA2WS__NAMED_PARAMETER_SETS__ADDITIONAL_PARAMS

list of string

A template for the names of generated WSDL files. There are 4 place holders, which can be used in the template: - %SIMPLE_CLASS_NAME% - the simple class name of the Java class from which we are generating - %FULLY_QUALIFIED_CLASS_NAME% - the fully qualified name from which we are generating with all dots are replaced replaced by underscores - %TARGET_DIR% - the target directory of the current module of the current build tool; typically target for Maven and build for Gradle. - %CLASSES_DIR% - the compiler output directory of the current module of the current build tool; typically target/classes for Maven and build/classes for Gradle.

Environment variable: QUARKUS_CXF_JAVA2WS__NAMED_PARAMETER_SETS__WSDL_NAME_TEMPLATE

string

%CLASSES_DIR%/wsdl/%SIMPLE_CLASS_NAME%.wsdl

The client service interface class name

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SERVICE_INTERFACE

string

Indicates whether this is an alternative proxy client configuration. If true, then this configuration is ignored when configuring a client without annotation @CXFClient.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__ALTERNATIVE

boolean

false

If true, the client dynamic proxy class generated by native compiler will be initialized at runtime; otherwise the proxy class will be initialized at build time. Setting this to true makes sense if your service endpoint interface references some class initialized at runtime in its method signatures. E.g. Say, your service interface has method int add(Operands o) and the Operands class was requested to be initialized at runtime. Then, without setting this configuration parameter to true, the native compiler will throw an exception saying something like Classes that should be initialized at run time got initialized during image building: org.acme.Operands …​ jdk.proxy<some-number>.$Proxy<some-number> caused initialization of this class. jdk.proxy<some-number>.$Proxy<some-number> is the proxy class generated by the native compiler.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__NATIVE_RUNTIME_INITIALIZED

boolean

false

The service endpoint implementation class

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__IMPLEMENTOR

string

The service endpoint WSDL path

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__WSDL

string

The URL of the SOAP Binding, should be one of four values:

  • http://schemas.xmlsoap.org/wsdl/soap/http for SOAP11HTTP_BINDING

  • http://schemas.xmlsoap.org/wsdl/soap/http?mtom=true for SOAP11HTTP_MTOM_BINDING

  • http://www.w3.org/2003/05/soap/bindings/HTTP/ for SOAP12HTTP_BINDING

  • http://www.w3.org/2003/05/soap/bindings/HTTP/?mtom=true for SOAP12HTTP_MTOM_BINDING

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SOAP_BINDING

string

The published service endpoint URL

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__PUBLISHED_ENDPOINT_URL

string

A comma-separated list of fully qualified CXF Feature class names or named CDI beans. Examples: quarkus.cxf.endpoint."/hello".features = org.apache.cxf.ext.logging.LoggingFeature quarkus.cxf.endpoint."/fruit".features = #myCustomLoggingFeature In the second case, the #myCustomLoggingFeature bean can be produced as follows: import org.apache.cxf.ext.logging.LoggingFeature; import javax.enterprise.context.ApplicationScoped; import javax.enterprise.inject.Produces; class Producers { @Produces

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__FEATURES

list of string

The comma-separated list of Handler classes

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__HANDLERS

list of string

The comma-separated list of InInterceptor classes

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__IN_INTERCEPTORS

list of string

The comma-separated list of OutInterceptor classes

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__OUT_INTERCEPTORS

list of string

The comma-separated list of OutFaultInterceptor classes

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__OUT_FAULT_INTERCEPTORS

list of string

The comma-separated list of InFaultInterceptor classes

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__IN_FAULT_INTERCEPTORS

list of string

The client WSDL path

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__WSDL

string

The URL of the SOAP Binding, should be one of four values:

  • http://schemas.xmlsoap.org/wsdl/soap/http for SOAP11HTTP_BINDING

  • http://schemas.xmlsoap.org/wsdl/soap/http?mtom=true for SOAP11HTTP_MTOM_BINDING

  • http://www.w3.org/2003/05/soap/bindings/HTTP/ for SOAP12HTTP_BINDING

  • http://www.w3.org/2003/05/soap/bindings/HTTP/?mtom=true for SOAP12HTTP_MTOM_BINDING

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SOAP_BINDING

string

The client endpoint URL

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__CLIENT_ENDPOINT_URL

string

The client interface class

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SERVICE_INTERFACE

string

The client endpoint namespace

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__ENDPOINT_NAMESPACE

string

The client endpoint name

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__ENDPOINT_NAME

string

The username for HTTP Basic auth

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__USERNAME

string

The password for HTTP Basic auth

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__PASSWORD

string

A comma-separated list of fully qualified CXF Feature class names. Example: quarkus.cxf.endpoint.myClient.features = org.apache.cxf.ext.logging.LoggingFeature Note that the LoggingFeature is available through the Logging Feature extension.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__FEATURES

list of string

The comma-separated list of Handler classes

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__HANDLERS

list of string

The comma-separated list of InInterceptor classes

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__IN_INTERCEPTORS

list of string

The comma-separated list of OutInterceptor classes

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__OUT_INTERCEPTORS

list of string

The comma-separated list of OutFaultInterceptor classes

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__OUT_FAULT_INTERCEPTORS

list of string

The comma-separated list of InFaultInterceptor classes

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__IN_FAULT_INTERCEPTORS

list of string

Indicates whether this is an alternative proxy client configuration. If true, then this configuration is ignored when configuring a client without annotation @CXFClient.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__ALTERNATIVE

boolean

false