CXF — uses Apache CXF to interact with JAX-WS Web services
The CXF component provides integration with Apache CXF for connecting to JAX-WS services hosted in Apache CXF.
CXF endpoints support two URI formats:
Referencing the endpoint by the service's bean ID
cxf:bean:beanID
[?options
]
Referencing the endpoint by the service's address
cxf://someAddress
[?options
]
Maven users will need to add a dependency on camel-cxf
to their poms as
shown in Example 1, “Apache CXF dependency”.
Example 1. Apache CXF dependency
<dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-cxf</artifactId> <version>x.x.x</version> <!-- use the same version as your Camel core version --> </dependency>
If you want to learn about Apache CXF dependencies, see the WHICH-JARS text file.
Table 2, “Apache CXF options” lists the options for a CXF endpoint.
Table 2. Apache CXF options
Name | Default Value | Description |
---|---|---|
wsdlURL | determined from endpoint address | Specifies the location of the WSDL. |
serviceClass |
Specifies the name of the SEI (Service Endpoint Interface) class. The SEI class can have, but does not require, JSR181 annotations. This option is required when
It is possible to use When a Apache CXF endpoint is used in a | |
serviceName | Specifies the QName of the service being implemented. It maps to
wsdl:service@name . | |
portName | Specifies the QName of the port for the service being implemented. It maps to
wsdl:port@name . | |
dataFormat | POJO |
Specifies the message data format the CXF endpoint supports. Valid values are:
|
relayHeaders | true | Specifies whether the endpoint relays headers along the route. This option is
only valid when dataFormat is set to POJO . |
wrapped | false | Specifies whether the endpoint producer invokes wrapped operations. |
wrappedStyle | false | Specifies if the endpoint uses the document-literal wrapped style. |
setDefaultBus | false | Specifies whether to use the default Apache CXF bus for this endpoint. |
bus | Specifies a reference to a bus object in the registry using the
# notation. The referenced bus is used in place of the default
bus. | |
cxfBinding | Specifies a reference to a binding object in the registry using the
# notation. The referenced binding is used in place of the
default binding. | |
headerFilterStrategy | Specifies a reference to an instance of
org.apache.camel.spi.HeaderFilterStrategy in the
registry using the # notation. The referenced instance is used in
place of the default header filter strategy. | |
loggingFeatureEnabled | false | Specifies if the Apache CXF logging feature is enabled. |
defaultOperationName | Specifies the default operationName that will be used by the CxfProducer which invokes the remote service. | |
defaultOperationNameSpace | Specifies the default operationNamespace that will be used by the CxfProducer which invokes the remote service. | |
synchronous | false | Specifies if the endpoint will use Apache CXF's synchronous APIs. |
publishedEndpointUrl | Override the endpointUrl that is published from the WSDL accessed with
service's URL plus ?wsdl . |