You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ff...@apache.org on 2016/04/06 10:37:57 UTC

camel git commit: [CAMEL-9821]camel-cxf should be able to handle InOnly MEP for the RAW|MESSAGE dataFormat

Repository: camel
Updated Branches:
  refs/heads/camel-2.17.x 9d8f0c200 -> aa4d4b738


[CAMEL-9821]camel-cxf should be able to handle InOnly MEP for the RAW|MESSAGE dataFormat

(cherry picked from commit 1b9a53fba3582e119dea0b2aa75d90a6aaea2af9)


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/aa4d4b73
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/aa4d4b73
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/aa4d4b73

Branch: refs/heads/camel-2.17.x
Commit: aa4d4b73806d75fee73884a0f17c3d13006de3aa
Parents: 9d8f0c2
Author: Freeman Fang <fr...@gmail.com>
Authored: Wed Apr 6 16:32:41 2016 +0800
Committer: Freeman Fang <fr...@gmail.com>
Committed: Wed Apr 6 16:33:47 2016 +0800

----------------------------------------------------------------------
 .../apache/camel/component/cxf/CxfConsumer.java  |  2 +-
 .../apache/camel/component/cxf/CxfEndpoint.java  | 19 ++++++-------------
 2 files changed, 7 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/aa4d4b73/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java
index 5b32832..4c29f8a 100644
--- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java
+++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java
@@ -173,7 +173,7 @@ public class CxfConsumer extends DefaultConsumer {
                         camelExchange.setPattern(ExchangePattern.InOnly);
                     }
                 } else {
-                    if (cxfEndpoint.getMep() != null && cxfEndpoint.getMep().equals("InOnly")) {
+                    if (cxfEndpoint.getExchangePattern().equals(ExchangePattern.InOnly)) {
                         camelExchange.setPattern(ExchangePattern.InOnly);
                     }
                 }

http://git-wip-us.apache.org/repos/asf/camel/blob/aa4d4b73/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java
index 12b9ce0..2794100 100644
--- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java
+++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java
@@ -46,6 +46,7 @@ import org.w3c.dom.Node;
 import org.apache.camel.CamelContext;
 import org.apache.camel.CamelException;
 import org.apache.camel.Consumer;
+import org.apache.camel.ExchangePattern;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
 import org.apache.camel.RuntimeCamelException;
@@ -192,27 +193,29 @@ public class CxfEndpoint extends DefaultEndpoint implements HeaderFilterStrategy
     private String password;
     @UriParam(label = "advanced", prefix = "properties.", multiValue = true)
     private Map<String, Object> properties;
-    @UriParam(name = "mep")
-    private String mep;
 
     public CxfEndpoint() {
+        setExchangePattern(ExchangePattern.InOut);
     }
 
     public CxfEndpoint(String remaining, CxfComponent cxfComponent) {
         super(remaining, cxfComponent);
         setAddress(remaining);
+        setExchangePattern(ExchangePattern.InOut);
     }
 
     @Deprecated
     public CxfEndpoint(String remaining, CamelContext context) {
         super(remaining, context);
         setAddress(remaining);
+        setExchangePattern(ExchangePattern.InOut);
     }
 
     @Deprecated
     public CxfEndpoint(String remaining) {
         super(remaining);
         setAddress(remaining);
+        setExchangePattern(ExchangePattern.InOut);
     }
 
     public CxfEndpoint copy() {
@@ -311,7 +314,7 @@ public class CxfEndpoint extends DefaultEndpoint implements HeaderFilterStrategy
                 sfb.setDataBinding(new SourceDataBinding());
             } else if (getDataFormat().dealias() == DataFormat.RAW) {
                 RAWDataFormatFeature feature = new RAWDataFormatFeature();
-                if (this.getMep() != null && this.getMep().equals("InOnly")) {
+                if (this.getExchangePattern().equals(ExchangePattern.InOnly)) {
                     //if DataFormat is RAW|MESSAGE, can't read message so can't
                     //determine it's oneway so need get the MEP from URI explicitly
                     feature.setOneway(true);
@@ -1127,16 +1130,6 @@ public class CxfEndpoint extends DefaultEndpoint implements HeaderFilterStrategy
         this.username = username;
     }
 
-    public String getMep() {
-        return mep;
-    }
-
-    /**
-     * The Message Exchange Pattern
-     */
-    public void setMep(String mep) {
-        this.mep = mep;
-    }
 
 
     /**