Interface CxfConfig


@ConfigMapping(prefix="quarkus.cxf") @ConfigRoot(phase=RUN_TIME) public interface CxfConfig
  • Method Details

    • decoupledEndpointBase

      Optional<String> decoupledEndpointBase()
      An URI base to use as a prefix of quarkus.cxf.client.myClient.decoupled-endpoint. You will typically want to set this to something like the following:
       quarkus.cxf.decoupled-endpoint-base = https://api.example.com:${quarkus.http.ssl-port}${quarkus.cxf.path}
       # or for plain HTTP
       quarkus.cxf.decoupled-endpoint-base = http://api.example.com:${quarkus.http.port}${quarkus.cxf.path}
       
      If you invoke your WS client from within a HTTP handler, you can leave this option unspecified and rather set it dynamically on the request context of your WS client using the org.apache.cxf.ws.addressing.decoupled.endpoint.base key. Here is an example how to do that from a RESTeasy handler method:
       import java.util.Map;
       import jakarta.inject.Inject;
       import jakarta.ws.rs.POST;
       import jakarta.ws.rs.Path;
       import jakarta.ws.rs.Produces;
       import jakarta.ws.rs.core.Context;
       import jakarta.ws.rs.core.MediaType;
       import jakarta.ws.rs.core.UriInfo;
       import jakarta.xml.ws.BindingProvider;
       import io.quarkiverse.cxf.annotation.CXFClient;
       import org.eclipse.microprofile.config.inject.ConfigProperty;
      
       @Path("/my-rest")
       public class MyRestEasyResource {
      
           @Inject
           @CXFClient("hello")
           HelloService helloService;
      
           @ConfigProperty(name = "quarkus.cxf.path")
           String quarkusCxfPath;
      
           @POST
           @Path("/hello")
           @Produces(MediaType.TEXT_PLAIN)
           public String hello(String body, @Context UriInfo uriInfo) throws IOException {
      
               // You may consider doing this only once if you are sure that your service is accessed
               // through a single hostname
               String decoupledEndpointBase = uriInfo.getBaseUriBuilder().path(quarkusCxfPath);
               Map>String, Object< requestContext = ((BindingProvider) helloService).getRequestContext();
               requestContext.put("org.apache.cxf.ws.addressing.decoupled.endpoint.base", decoupledEndpointBase);
      
               return wsrmHelloService.hello(body);
           }
       }
       
      Since:
      2.7.0
    • endpoints

      @WithName("endpoint") @WithDefaults Map<String,CxfEndpointConfig> endpoints()
      Choose the path of each web services.
    • clients

      @WithName("client") @WithDefaults Map<String,CxfClientConfig> clients()
      Configure client proxies.
    • internal

      This exists just as a convenient way to get a CxfClientConfig with all defaults set. It is not intended to be used by end users.
    • logging

      Global logging related configuration
    • isClientPresent

      default boolean isClientPresent(String key)
    • getClient

      default CxfClientConfig getClient(String key)