Configure and control SOAP clients
Take control of how your SOAP clients are addressed, scoped, invoked, configured, and released, from endpoint URL defaults and multiple clients to CDI scope, asynchronous calls, programmatic and dynamic configuration, client-only applications, and resource cleanup.
Where to go
-
client-endpoint-urldefaults - Check theclient-endpoint-urldefaults. A client without aclient-endpoint-urlfalls back tohttp://localhost:8080/plus a path derived fromquarkus.cxf.pathand the service interface name. -
Configure multiple clients - Configure several clients under different names. Each client is a named block of
quarkus.cxf.client."client-name".*properties, so any number of clients coexist. -
CDI scope of clients injected via
@CXFClient- Learn the scope of injected clients before you reconfigure a client dynamically per request. Clients injected with@CXFClientare produced in@Dependentscope, so they take the scope of the bean that holds them, which is also what makes safe per-request reconfiguration possible. -
Asynchronous client - Call services without blocking, using the asynchronous methods generated by passing a binding file to
wsdl2java. The generated*Async()methods come in aFuture-based and a callback-based flavor; the callback flavor is preferred on Quarkus and composes into a MutinyUni. -
Configure clients programmatically at application startup - Configure all clients in code at startup when properties are not enough. All clients can be configured in code at startup through an
HTTPConduitConfigureron the CXFBus. -
Dynamic client configuration - Reconfigure a client dynamically per request.
-
Pure client applications - Run without an HTTP server by setting
quarkus.http.host-enabledtofalse. -
Prevent resource leaks - Close manually created client proxies to prevent resource leaks; clients injected with
@CXFClientare closed for you.