Contact Us 1-800-596-4880

CXF Module Configuration Reference

This page provides reference information about the elements and attributes you can configure for the CXF Module Reference.

Configuration

Table 1. Attributes of <configuration…​>
Name Type Required Default Description

configurationLocation

string

no

The location of a CXF configuration file, if any needs to be supplied.

enableMuleSoapHeaders

boolean

no

true

Whether or not CXF should write Mule SOAP headers which pass along the correlation and ReplyTo information. This is true by default, but the Mule SOAP headers are only triggered in situations where there is an existing correlation ID and the ReplyTo header is set (As of 2.2.1)

intializeStaticBusInstance

boolean

no

true

Intialize the static CXF Bus with a Bus configured to use Mule for all transports. This will affect any CXF generated clients that you run standalone. Defaults to true.

name

string

no

_cxfConfiguration

Jaxws service

Table 2. Attributes of <jaxws-service…​>
Name Type Required Default Description

bindingId

string

no

The binding that should be used for this endpoint. It defaults to the SOAP binding by default.

port

string

no

The WSDL port name of your service.

namespace

string

no

The service namespace (As of 2.2.1)

serviceClass

string

no

The class CXF should use to construct its service model. This is optional, and by default it will use the implementation class of your component, on inbound cxf endpoint. But it is mandatory for outbound endpoint when using "aegis" frontend.

validationEnabled

boolean

no

Whether or not validation should be enabled on this service. Validation only occurs on inbound server messages.

soapVersion

enumeration

no

The soapVersion that is going to be used for this endpoint. The specified version is translated into the corresponding bindingId value. This attribute is useful when there’s need to avoid the creation of the endpoint with the default binding. In case the bindingId attribute is set this attribute will override it. If not set and not specified otherwise CXF default to SOAP 1.1 binding.

mtomEnabled

boolean

no

Whether or not MTOM (attachement support) is enabled for this endpoint.

wsdlLocation

string

no

The location of the WSDL for your service. If this is a server side endpoint it will served to your users.

enableMuleSoapHeaders

boolean

no

true

Whether or not this endpoint should write Mule SOAP headers which pass along the correlation and ReplyTo information. This is true by default, but the Mule SOAP headers are only triggered in situations where there is an existing correlation ID and the ReplyTo header is set. (As 2.2.1)

configuration-ref

string

no

The CXF configuration that should be used.

Table 3. Child Elements of <jaxws-service…​>
Name Cardinality Description

schemaLocations

0..1

ws-security

0..1

Configuration to enable WS-Security

properties

0..1

Additional properties for this service.

abstract-databinding

0..1

The databinding implementation that should be used. By default, this JAXB for the JAX-WS frontend and Aegis for the simple frontend. A placeholder for arbitrary extensions as children of the 'mule' element. Other transports and modules can extend this if they need to add global elements to the configuration (but consider the more specific elements like abstract-connector first).

features

0..1

Any CXF features you want to apply to the client/server. See the CXF documentation for more information on features.

inInterceptors

0..1

Additional incoming interceptors for this service.

inFaultInterceptors

0..1

Additional incoming fault interceptors.

outInterceptors

0..1

Additional outgoing interceptors.

outFaultInterceptors

0..1

Additional outgoing fault interceptors.

Jaxws client

Table 4. Attributes of <jaxws-client…​>
Name Type Required Default Description

soapVersion

enumeration

no

The soapVersion that is going to be used for this endpoint. The specified version is translated into the corresponding bindingId value. This attribute is useful when there’s need to avoid the creation of the endpoint with the default binding. In case the bindingId attribute is set this attribute will override it. If not set and not specified otherwise CXF defaults to SOAP 1.1 binding.

mtomEnabled

boolean

no

true

Whether or not this endpoint should write Mule SOAP headers which pass along the correlation and ReplyTo information. This is true by default, but the Mule SOAP headers are only triggered in situations where there is an existing correlation ID and the ReplyTo header is set (As of 2.2.1)

configuration-ref

string

no

The CXF configuration that should be used.

serviceClass

string

no

The class CXF should use to construct its service model for the client.

decoupledEndpoint

string

no

The reply to endpoint for clients which have WS-Addressing enabled.

operation

string

no

The reply to endpoint for clients which have WS-Addressing enabled.

clientClass

string

no

The name of the client class that CXF generated using CXF’s wsdl2java tool. You must use wsdl2java if you do not have both client and the server in the same JVM. Otherwise, this can be optional if the endpoint address is the same in both cases.

port

string

no

The WSDL port you want to use to communicate with the service.

Table 5. Child Elements of <jaxws-client…​>
Name Cardinality Description

ws-security

0..1

properties

0..1

Additional properties for this service.

abstract-databinding

0..1

The databinding implementation that should be used. By default, this is JAXB for the JAX-WS frontend and Aegis for the simple frontend. A placeholder for arbitrary extensions as children of the 'mule' element. Other transports and modules can extend this if they need to add global elements to the configuration (but consider the more specific elements like abstract-connector first).

features

0..1

Any CXF features you want to apply to the client/server. See the CXF documentation for more information on features.

inInterceptors

0..1

Additional incoming interceptors for this service.

inFaultInterceptors

0..1

Additional incoming fault interceptors.

outInterceptors

0..1

Additional outgoing interceptors.

outFaultInterceptors

0..1

Additional outgoing fault interceptors.

Common CXF Element

Following are the sub-elements you can set on the CXF service and client. For further information on CXF interceptors, see the CXF documentation.

Name Description

databinding

The databinding implementation that should be used. By default, this is JAXB for the JAX-WS frontend and Aegis for the simple frontend. This should be specified in the form of a Spring bean.

features

Any CXF features you want to apply to the client/server. See the CXF documentation for more information on features.

inInterceptors

Additional incoming interceptors for this service.

inFaultInterceptors

Additional incoming fault interceptors.

outInterceptors

Additional outgoing interceptors.

outFaultInterceptors

Additional outgoing fault interceptors.

Interceptors Example

<cxf:jaxws-client serviceClass="com.mulesoft.example.HelloWorld"
                  operation="sayHello" port="HelloWorldPort">
    <cxf:inInterceptors>
        <spring:bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
    </cxf:inInterceptors>
    <cxf:outInterceptors>
        <spring:bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
    </cxf:outInterceptors>
</cxf:jaxws-client>

Databinding Example

<cxf:simple-service>
    <cxf:aegis-databinding>
            <spring:property name="configuration">
                 <spring:bean class="org.apache.cxf.aegis.type.TypeCreationOptions" />
            </spring:property>
    </cxf:aegis-databinding>
</cxf:simple-service>

Features Example

<cxf:jaxws-service serviceClass="com.mulesoft.mule.example.security.Greeter">
    <cxf:features>
        <spring:bean class="org.mule.module.cxf.feature.PrettyLoggingFeature" />
    </cxf:features>
</cxf:jaxws-service>