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 @CXFEndpoint producer-method form that returns a mock implementation for client tests. A service is published under a path either with the quarkus.cxf.endpoint."/endpoint-path".implementor property or with the @CXFEndpoint annotation, whose value is relative to quarkus.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 same implementor property as a regular @WebService class.

  • 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=/soap next to quarkus.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-forwarding and the related quarkus.http.proxy. settings make Quarkus honor the X-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.