Nav

CXF Module Configuration Reference

When sending requests to an external web service, the recommended approach is to use the Web Service Consumer rather than the CXF Module.

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

Configuration

Attributes of configuration

Name Description

configurationLocation

The location of a CXF configuration file, if any needs to be supplied.
Type: string
Required: no
Default: none

enableMuleSoapHeaders

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)
Type: boolean
Required: no
Default: true

initializeStaticBusInstance

Initialize the static CXF Bus with a Bus configured to use Mule for all transports. This affects any CXF generated clients that you run standalone.
Type: boolean
Required: no
Default: true

name

Type: string
Required: no
Default: none

_cxfConfiguration

-

No child elements of configuration.

Jaxws service

Attributes of jaxws-service

Name Description

bindingId

The binding that should be used for this endpoint. It defaults to the SOAP binding by default.
Type: string
Required: no
Default: none

port

The WSDL port name of your service.
Type: string
Required: no
Default: none

namespace

The service namespace. (As of 2.2.1)
Type: string
Required: no
Default: none

service

The WSDL service name of your service.
Type: string
Required: no
Default: none

serviceClass

The class CXF should use to construct its service model. This is optional, and by default it uses the implementation class of your component, on inbound CXF endpoint. But it is mandatory for outbound endpoint when using "aegis" frontend.
Type: string
Required: no
Default: none

validationEnabled

Whether or not validation should be enabled on this service. Validation only occurs on inbound server messages.
Type: boolean
Required: no
Default: none

soapVersion

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 overrides it. If not set and not specified otherwise CXF defaults to SOAP 1.1 binding.
Type: enumeration
Required: no
Default: none

mtomEnabled

Whether or not MTOM (attachment support) is enabled for this endpoint.
Type: boolean
Required: no
Default: none

wsdlLocation

The location of the WSDL for your service. If this is a server side endpoint, it is served to your users.
Type: string
Required: no
Default: none

enableMuleSoapHeaders

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)
Type: boolean
Required: no
Default: true

configuration-ref

The CXF configuration that should be used.
Type: string
Required: no
Default: none

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 sed. 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.ee 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

Attributes of jaxws-client

Name Description

soapVersion

The soapVersion 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 overrides it. If not set and not specified, otherwise CXF defaults to the SOAP 1.1 binding.
Type: enumeration
Required: no
Default: none

mtomEnabled

Whether or not MTOM (attachment support) is enabled for this endpoint.
Type: boolean
Required: no
Default: none

wsdlLocation

The location of the WSDL for your service. If this is a server side endpoint, it is served to your users.
Type: string
Required: no
Default: none

enableMuleSoapHeaders

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.)
Type: boolean
Required: no
Default: true

configuration-ref

The CXF configuration that should be used.
Type: string
Required: no
Default: none

serviceClass

The class CXF should use to construct its service model for the client.
Type: string
Required: no
Default: none

decoupledEndpoint

The reply to endpoint for clients which have WS-Addressing enabled.
Type: string
Required: no
Default: none

operation

The operation you want to invoke on the outbound endpoint.
Type: string
Required: no
Default: none

clientClass

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

port

The WSDL port you want to use to communicate with the service.
Type: string
Required: no
Default: none

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 Elements

Following are the sub-elements you can set on 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 and 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


          
       
1
2
3
4
5
6
7
8
9
<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


          
       
1
2
3
4
5
6
7
<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


          
       
1
2
3
4
5
<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>