CXF¶
Forage creates CXF SOAP endpoints for web service integration, handling endpoint configuration, WSDL binding, message logging, and security setup.
Quick Start¶
forage.helloClient.cxf.address=http://localhost:8080/ws/hello
forage.helloClient.cxf.wsdl.url=http://localhost:8080/ws/hello?wsdl
forage.helloClient.cxf.data.format=PAYLOAD
forage.helloClient.cxf.logging.enabled=true
Supported Endpoint Types¶
| Name | Description |
|---|---|
soap | Apache CXF SOAP (JAX-WS) endpoint |
Properties¶
| Property | Description | Type | Default | Required |
|---|---|---|---|---|
forage.cxf.kind | The CXF endpoint kind/type | string | soap | |
forage.cxf.address | The CXF endpoint address URL | string | Yes | |
forage.cxf.wsdl.url | The WSDL document URL | string | ||
forage.cxf.service.class | The fully qualified service endpoint interface class name | string | ||
forage.cxf.service.name | The service name in the WSDL | string | ||
forage.cxf.port.name | The port name in the WSDL | string | ||
forage.cxf.data.format | The CXF data format (POJO, PAYLOAD, RAW, CXF_MESSAGE) | string | POJO | |
forage.cxf.logging.enabled | Enable CXF message logging | boolean | false |
Security
| Property | Description | Type | Default | Required |
|---|---|---|---|---|
forage.cxf.username | The username for CXF endpoint authentication | string | ||
forage.cxf.password | The password for CXF endpoint authentication | password | ||
forage.cxf.ssl.context.parameters | Reference to a Camel SSLContextParameters bean by name | string |
Advanced
| Property | Description | Type | Default | Required |
|---|---|---|---|---|
forage.cxf.logging.size.limit | Maximum size of logged messages in bytes | integer | 49152 | |
forage.cxf.skip.fault.logging | Skip logging of SOAP fault messages | boolean | false | |
forage.cxf.mtom.enabled | Enable MTOM (Message Transmission Optimization Mechanism) | boolean | false | |
forage.cxf.wrapped.style | Enable wrapped document/literal style | boolean | ||
forage.cxf.schema.validation.enabled | Enable schema validation of SOAP messages | boolean | false | |
forage.cxf.continuation.timeout | Continuation timeout in milliseconds for asynchronous server operations | integer | 30000 | |
forage.cxf.default.operation.name | The default operation name for dispatching | string | ||
forage.cxf.default.operation.namespace | The default operation namespace for dispatching | string | ||
forage.cxf.synchronous | Force synchronous invocation of the producer | boolean | false |
Multiple Endpoints¶
Use different names to configure multiple SOAP services -- for example, a server endpoint and two client endpoints:
forage.helloServer.cxf.address=http://localhost:8080/services/hello
forage.helloServer.cxf.wsdl.url=file:hello.wsdl
forage.helloServer.cxf.data.format=PAYLOAD
forage.payment.cxf.address=http://payment-svc:8080/ws/payment
forage.payment.cxf.wsdl.url=http://payment-svc:8080/ws/payment?wsdl
forage.payment.cxf.data.format=PAYLOAD
forage.inventory.cxf.address=http://inventory-svc:8080/ws/stock
forage.inventory.cxf.wsdl.url=http://inventory-svc:8080/ws/stock?wsdl
forage.inventory.cxf.data.format=PAYLOAD
Reference each by name in routes:
MTOM Attachments
Enable forage.cxf.mtom.enabled=true to use MTOM (Message Transmission Optimization Mechanism) for efficient binary attachment transfer over SOAP.
SSL/TLS
Set forage.cxf.ssl.context.parameters to the name of a Camel SSLContextParameters bean for HTTPS transport security. See the Secured SOAP Client example.
Quarkus & Spring Boot: Automatic Address Adaptation
When running on Quarkus or Spring Boot, if a CXF endpoint is used as a server (route from:), Forage automatically converts its absolute localhost address (e.g., http://localhost:8080/services/hello) to a relative path (/hello) suitable for the runtime's servlet container. The CXF endpoint is served through the existing web server -- no standalone HTTP server is started.
- Quarkus: the servlet root path is read from
quarkus.cxf.path(default:/services). - Spring Boot: the servlet root path is read from
cxf.path(default:/services), and the CXF servlet is auto-registered bycxf-spring-boot-starter-jaxws.
Client endpoints (route to:) are never adapted -- their absolute URL is preserved so they can reach external services. This means the same configuration works across JBang, Spring Boot, and Quarkus without changes.