Publish and configure SOAP services
Decide where your SOAP services are published and how they are implemented: set endpoint paths, process raw XML with JAX-WS providers, serve REST and SOAP endpoints from one application, advertise the right addresses when a service runs behind a reverse proxy, and index service classes that come from other modules.
Where to go
-
Endpoints and paths - Set them by property or by annotation, including the
@CXFEndpointproducer-method form that returns a mock implementation for client tests. A service is published under a path either with thequarkus.cxf.endpoint."/endpoint-path".implementorproperty or with the@CXFEndpointannotation, whose value is relative toquarkus.cxf.path; the two are equivalent, and other properties set for that path apply either way. -
JAX-WS Providers - Implement one when the service must handle the raw XML payload instead of Java method parameters. A JAX-WS
Provider<T>implementation registers through the sameimplementorproperty as a regular@WebServiceclass. -
REST and SOAP Endpoints - Separate them by root path when one application has to expose both. REST and SOAP endpoints share one application when each stack has its own root path, such as
quarkus.cxf.path=/soapnext toquarkus.rest.path=/rest. -
Running behind a reverse proxy - Enable proxy address forwarding only when a real reverse proxy sits in front of the service, because it exposes the server to spoofed request information. Behind a reverse proxy,
quarkus.http.proxy.proxy-address-forwardingand the relatedquarkus.http.proxy.settings make Quarkus honor theX-Forwarded-headers, so the address advertised in the served WSDL is the public one. -
Service classes from other modules - Index the module that contains the service classes when a service implementation, its superclasses or its interfaces come from a dependency. Quarkus CXF needs the whole class hierarchy of a service implementation in the Quarkus class index at build time, and the build can fail when the service interface is not there.