Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Name

Description

Example

Required?

default value

wsdlURL

The location of the WSDL.

file://local/wsdl/hello.wsdl or wsdl/hello.wsdl

No

WSDL is obtained from endpoint address by default

serviceClass

The name of the SEI(Service Endpoint Interface) class. This class can have but does not require JSR181 annotations. 
Since 2.0, it is possible to use # notation to reference a serviceClass object instance from the registry.  E.g. serviceClass=#beanName. Please be advised that the referenced object cannot be a Proxy (Spring AOP Proxy is OK) as it relies on Object.getClass().getName() method for non Spring AOP Proxy.

org.apache.camel.Hello

Yes

 

serviceClassInstance

In 1.6 or later (will be deprecated in 2.0), serviceClassInstance works like serviceClass=#beanName, which looks up a serviceObject instance from the registry.

serviceClassInstance=beanName

No (use either serviceClass or serviceClassInstance)

 

serviceName

The service name this service is implementing, it maps to the wsdl:service@name.

{http://org.apache.camel}
ServiceName

Only if more than one serviceName in WSDL present

 

portName

The port name this service is implementing, it maps to the wsdl:port@name.

{http://org.apache.camel}
PortName

Only if more than one portName under the serviceName is present

 

dataFormat

Which data type messages the CXF endpoint supports

POJO, PAYLOAD, MESSAGE

No

POJO

relayHeaders

Available since 1.6.1. Should a CXF endpoint relay headers along the route

true, false

No

true

wrapped

Which kind of operation that CXF endpoint producer will invoke

true, false

No

false

setDefaultBus

Will set the default bus when CXF endpoint create a bus by itself

true, false

No

false

bus

New in 2.0, use # notation to reference a bus object from the registry.  The referenced object must be an instance of org.apache.cxf.Bus.

bus=#busName

No

Default bus created by CXF Bus Factory

cxfBinding

New in 2.0, use # notation to reference a CXF binding object from the registry.  The referenced object must be an instance of org.apache.camel.component.cxf.CxfBinding.

cxfBinding=#bindingName

No

An instance of org.apache.camel.component.cxf.DefaultCxfBinding

headerFilterStrategy

New in 2.0, use # notation to reference a header filter strategy object from the registry.  The referenced object must be an instance of org.apache.camel.spi.HeaderFilterStrategy.

headerFilterStrategy=#strategyName

No

An instance of org.apache.camel.component.cxf.CxfHeaderFilterStrategy

...

You can determine the data format mode of an exchange by retrieving the exchange property CamelCXFDataFormat. The exchange key constant is defined in org.apache.camel.component.cxf.CxfConstants.DATA_FORMAT_PROPERTY.by retrieving the exchange property CamelCXFDataFormat. The exchange key constant is defined in org.apache.camel.component.cxf.CxfConstants.DATA_FORMAT_PROPERTY.

Description of relayHeaders option

There are "in-band" and "out-of-band" on the wire headers from a perspective of a JAXWS WSDL-first developer.

The "in-band" headers are headers that are explicitly defined as part of the WSDL binding contract for an endpoint such as SOAP headers.

The "out-of-band" headers are headers that are serialized over the wire but are not explicitly part of the WSDL binding contract.

Headers relaying/dropping is bi-directional.

When a route has a CXF endpoint and the developer needs to have on the wire headers such as SOAP headers be relayed along the route to be consumed say by another JAXWS endpoint then relayHeaders should be set to true, which is the default value.

The relayHeaders = true express an intent to relay the headers. The actual decision on whether a given header is relayed is delegated to a pluggable instance that implements MessageHeadersRelay interface. An concrete implementation MessageHeadersRelay will be consulted to decide if a header needs to be relayed or not. There is already an implementation of SoapMessageHeadersRelay which binds itself to well known SOAP name spaces. Currently only "out-of-band" headers are filtered, and "in-band" headers will always be relayed when relayHeaders = true. If there is a header on the wire, whose name space is unknown to the runtime, then a fall back DefaultMessageHeadersRelay will be used, which simply allows all headers to be relayed.

The relayHeaders = false asserts that all headers "in-band" and "out-of-band" will be dropped.

You can plugin your own MessageHeadersRelay implementations overriding or adding additional ones to the list of relays. In order to override a preloaded relay instance just make sure that your MessageHeadersRelay implementation services the same name spaces as the one you looking to override. Also note, that the overriding relay has to service all of the name spaces as the one you looking to override, or else a runtime exception on route start up will be thrown as this would introduce an ambiguity in name spaces to relay instance mappings.

Code Block
xml
xml

<cxf:cxfEndpoint ...>
  <cxf:properties>
    <entry key="org.apache.camel.cxf.message.headers.relays">
      <list>
        <ref bean="customHeadersRelay"/>
      </list>
    </entry>
  </cxf:properties>
</cxf:cxfEndpoint>

<bean id="customHeadersRelay" class="org.apache.camel.component.cxf.soap.headers.CustomHeadersRelay"/>

Take a look at the tests that show how you'd be able to relay/drop headers here:

https://svn.apache.org/repos/asf/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/soap/headers/CxfMessageHeadersRelayTest.javaImage Added

Configure the CXF endpoints with spring

...

Name

Description

type

Required?

Default value

in/out

Examples

CamelCxfBeanCharacterEncoding

Character encoding

String

no

none

in

ISO-8859-1

CamelCxfBeanContentType

Content type

String

no

*/*

in

text/xml

CamelCxfBeanRequestBasePath

The value of this header will be set in the CXF message as the Message.BASE_PATH property. It is needed by CXF JAXRS processing. Basically, it is the scheme, host and port portion of the request URI.

String

yes

the Endpoint URI of the source endpoint in the Camel exchange

in

http://localhost:9000

Image Removed

CamelCxfBeanRequestPath

Request URI's path

String

yes

none

in

consumer/123

CamelCxfBeanVerb

RESTful request verb

String

yes

none

in

GET, PUT, POST, DELETE

...