...
Code Block | ||||
---|---|---|---|---|
| ||||
<bean class="org.apache.camel.component.cxf.transport.CamelTransportFactory"> <property name="bus" ref="cxf" /> <property name="camelContext" ref="camelContext" /> <!-- checkException new added in Camel 2.1 and Camel 1.6.2 --> <!-- If checkException is true , CamelDestination will check the outMessage's exception and set it into camel exchange. You can also override this value in CamelDestination's configuration. The default value is false. This option should be set true when you want to leverage the camel's error handler to deal with fault message --> <property name="checkException" value="true" /> <property name="transportIds"> <list> <value>http://cxf.apache.org/transports/camel</value> </list> </property> </bean> |
...
The elements used to configure an Camel transport endpoint are defined in the namespace http://cxf.apache.org/transports/camel
. It is commonly referred to using the prefix camel
. In order to use the Camel transport configuration elements you will need to add the lines shown below to the beans element of your endpoint's configuration file. In addition, you will need to add the configuration elements' namespace to the xsi:schemaLocation
attribute.
...
You configure an Camel transport server endpoint using the camel:destination
element and its children. The camel:destination
element takes a single attribute, name
, the that specifies the WSDL port element that corresponds to the endpoint. The value for the name
attribute takes the form portQName.camel-destination
. The example below shows the camel:destination
element that would be used to add configuration for an endpoint that was specified by the WSDL fragment <port binding="widgetSOAPBinding" name="widgetSOAPPort>
if the endpoint's target namespace was http://widgets.widgetvendor.net
.
Code Block | ||
---|---|---|
| ||
...
<camel:destination name="{http://widgets/widgetvendor.net}widgetSOAPPort.http-destination>
<camelContext id="context" xmlns="http://activemq.apache.org/camel/schema/spring">
<route>
<from uri="direct:EndpointC" />
<to uri="direct:EndpointD" />
</route>
</camelContext>
</camel:destination>
...
|
...