HTTP Async Transport

🧪Experimental • Since 1.1.0

Implement async SOAP Clients using Apache HttpComponents HttpClient 5.

This extension is experimental, because there are no tests covering it. Contributions are welcome!

Maven coordinates

Create a new project using quarkus-cxf-rt-transports-http-hc5 on or add these coordinates to your existing project:

Check the User guide and especially its Dependency management section for more information about writing applications with CXF Extensions for Quarkus.


Once the quarkus-cxf-rt-transports-http-hc5 dependency is available in the classpath, CXF will use HttpAsyncClient for asynchronous calls and will continue using HttpURLConnection for synchronous calls.

You can see more details about the CXF asynchronous client and how to tune it further in CXF documentation.

Asynchronous Clients and Mutiny

Asynchronous client invocations require some additional methods in the service endpoint interface. That code is not generated by default.

To enable it, you need to create a JAX-WS binding file with enableAsyncMapping set to true:

<bindings xmlns:xsd=""
  <bindings node="AffectedNode">

This file should then be passed to wsdl2java through its additional-params property:
quarkus.cxf.java2ws.includes = HelloService.wsdl = -b,src/main/resources/binding.xml

Once the asynchronous stubs are available, it is possible to wrap a client call in io.smallrye.mutiny.Uni as shown below:

import jakarta.inject.Inject;
import io.smallrye.mutiny.Uni;
import io.quarkiverse.cxf.annotation.CXFClient;

class Client {

    @Inject @CXFClient
    CalculatorService calculator;

    public Uni add(int a, int b) {
        return Uni.createFrom().future(() ->
                (Future)calculatorSoap.addAsync(a, b, res -> {}));
A sample application demonstrating this flow is available here.