Author: wtam
Date: Wed Jan 20 21:42:04 2010
New Revision: 901388

URL: http://svn.apache.org/viewvc?rev=901388&view=rev
Log:
[CAMEL-2385] BindingOperationInfos that are stored in exchange are inconsistent 
between CxfProducer and CxfConsumer

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=901388&r1=901387&r2=901388&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
 Wed Jan 20 21:42:04 2010
@@ -111,13 +111,15 @@
         
         // get binding operation info
         BindingOperationInfo boi = getBindingOperationInfo(camelExchange);
+        ObjectHelper.notNull(boi, "BindingOperationInfo");
+        
+        // store the original boi in the exchange
+        camelExchange.setProperty(BindingOperationInfo.class.getName(), boi);
         if (LOG.isTraceEnabled()) {
-            LOG.trace("BOI = " + boi);
+            LOG.trace("Set exchange property: BindingOperationInfo: " + boi);
         }
         
-        ObjectHelper.notNull(boi, "You should set '" + 
CxfConstants.OPERATION_NAME 
-                + "' in header.");
-        
+        // Unwrap boi before passing it to make a client call
         if (!endpoint.isWrapped() && boi != null) {
             if (boi.isUnwrappedCapable()) {
                 boi = boi.getUnwrappedOperation();
@@ -127,11 +129,6 @@
             }
         }
         
-        camelExchange.setProperty(BindingOperationInfo.class.getName(), boi);
-        if (LOG.isTraceEnabled()) {
-            LOG.trace("Set exchange property: BindingOperationInfo: " + boi);
-        }
-        
         // bind the request CXF exchange
         binding.populateCxfRequestFromExchange(cxfExchange, camelExchange, 
                 requestContext);


Reply via email to