Author: ningjiang
Date: Mon Dec 26 03:51:57 2011
New Revision: 1224674
URL: http://svn.apache.org/viewvc?rev=1224674&view=rev
Log:
CAMEL-4829 Set the bus on the exchange in case the CXF interceptor needs it
Modified:
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
Modified:
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java?rev=1224674&r1=1224673&r2=1224674&view=diff
==============================================================================
---
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
(original)
+++
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
Mon Dec 26 03:51:57 2011
@@ -35,6 +35,7 @@ import org.apache.camel.RuntimeCamelExce
import org.apache.camel.component.cxf.common.message.CxfConstants;
import org.apache.camel.impl.DefaultProducer;
import org.apache.camel.util.ObjectHelper;
+import org.apache.cxf.Bus;
import org.apache.cxf.binding.soap.model.SoapHeaderInfo;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.jaxws.context.WrappedMessageContext;
@@ -79,6 +80,8 @@ public class CxfProducer extends Default
try {
// create CXF exchange
ExchangeImpl cxfExchange = new ExchangeImpl();
+ // set the Bus on the exchange in case the CXF interceptor need to
access it from exchange
+ cxfExchange.put(Bus.class, endpoint.getBus());
// prepare binding operation info
BindingOperationInfo boi = prepareBindingOperation(camelExchange,
cxfExchange);
@@ -115,6 +118,8 @@ public class CxfProducer extends Default
// create CXF exchange
ExchangeImpl cxfExchange = new ExchangeImpl();
+ // set the Bus on the exchange in case the CXF interceptor need to
access it from exchange
+ cxfExchange.put(Bus.class, endpoint.getBus());
// prepare binding operation info
BindingOperationInfo boi = prepareBindingOperation(camelExchange,
cxfExchange);