camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject svn commit: r757221 - in /camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf: CxfConstants.java CxfConsumer.java CxfProducer.java DefaultCxfBinding.java
Date Sun, 22 Mar 2009 17:43:15 GMT
Author: wtam
Date: Sun Mar 22 17:43:14 2009
New Revision: 757221

URL: http://svn.apache.org/viewvc?rev=757221&view=rev
Log:
[CAMEL-1476]  Set property in the exchange to identify CXF component DataFormat mode (payload,
message, or pojo)

Modified:
    camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConstants.java
    camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java
    camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
    camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DefaultCxfBinding.java

Modified: camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConstants.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConstants.java?rev=757221&r1=757220&r2=757221&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConstants.java
(original)
+++ camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConstants.java
Sun Mar 22 17:43:14 2009
@@ -24,7 +24,8 @@
 public interface CxfConstants {
     String METHOD = "method";
     String SERVICE_CLASS = "serviceClass";
-    String DATA_FORMAT = "dataFormat";
+    // org.apache.camel.cxf.dataFormat is used as exchange property key
+    String DATA_FORMAT_PROPERTY = "org.apache.camel.cxf.dataFormat";
     String SET_DEFAULT_BUS = "setDefaultBus";
     String WSDL_URL = "wsdlURL";
     String ADDRESS = "address";

Modified: camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java?rev=757221&r1=757220&r2=757221&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java
(original)
+++ camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java
Sun Mar 22 17:43:14 2009
@@ -62,7 +62,7 @@
                 
                 // set data format mode in Camel exchange
                 DataFormat dataFormat = endpoint.getDataFormat();
-                camelExchange.setProperty(DataFormat.class.getName(), dataFormat);   
+                camelExchange.setProperty(CxfConstants.DATA_FORMAT_PROPERTY, dataFormat);
  
                 if (LOG.isTraceEnabled()) {
                     LOG.trace("Set Exchange property: " + DataFormat.class.getName() 
                             + "=" + dataFormat);

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=757221&r1=757220&r2=757221&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
Sun Mar 22 17:43:14 2009
@@ -86,7 +86,7 @@
         
         // set data format mode in exchange
         DataFormat dataFormat = endpoint.getDataFormat();
-        camelExchange.setProperty(DataFormat.class.getName(), dataFormat);   
+        camelExchange.setProperty(CxfConstants.DATA_FORMAT_PROPERTY, dataFormat);   
         if (LOG.isTraceEnabled()) {
             LOG.trace("Set Camel Exchange property: " + DataFormat.class.getName() 
                     + "=" + dataFormat);

Modified: camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DefaultCxfBinding.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DefaultCxfBinding.java?rev=757221&r1=757220&r2=757221&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DefaultCxfBinding.java
(original)
+++ camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DefaultCxfBinding.java
Sun Mar 22 17:43:14 2009
@@ -101,7 +101,7 @@
         
         // propagate body
         camelExchange.getOut().setBody(DefaultCxfBinding.getContentFromCxf(cxfMessage, 
-                camelExchange.getProperty(DataFormat.class.getName(), DataFormat.class)));
+                camelExchange.getProperty(CxfConstants.DATA_FORMAT_PROPERTY, DataFormat.class)));
         
         // propagate response context
         if (responseContext != null && responseContext.size() > 0) {
@@ -198,7 +198,7 @@
            
         // set body
         Object body = DefaultCxfBinding.getContentFromCxf(cxfMessage, 
-                camelExchange.getProperty(DataFormat.class.getName(), DataFormat.class));
+                camelExchange.getProperty(CxfConstants.DATA_FORMAT_PROPERTY, DataFormat.class));
         if (body != null) {
             camelExchange.getIn().setBody(body);
         }  
@@ -226,7 +226,7 @@
         Message outMessage = ep.getBinding().createMessage();
         cxfExchange.setOutMessage(outMessage);       
 
-        DataFormat dataFormat = camelExchange.getProperty(DataFormat.class.getName(), 
+        DataFormat dataFormat = camelExchange.getProperty(CxfConstants.DATA_FORMAT_PROPERTY,
 
                 DataFormat.class);
         
         // propagate contexts



Mime
View raw message