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

camel git commit: CAMEL-8632 Added httpBinding option to camel-servlet component

Repository: camel
Updated Branches:
  refs/heads/master 34a80fe72 -> 38fd41c9e


CAMEL-8632 Added httpBinding option to camel-servlet component


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

Branch: refs/heads/master
Commit: 38fd41c9eded34ccf05f3da117fac6d06d70e985
Parents: 34a80fe
Author: Willem Jiang <wi...@gmail.com>
Authored: Tue Apr 14 22:06:36 2015 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Tue Apr 14 22:10:11 2015 +0800

----------------------------------------------------------------------
 .../org/apache/camel/component/servlet/ServletComponent.java    | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/38fd41c9/components/camel-servlet/src/main/java/org/apache/camel/component/servlet/ServletComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-servlet/src/main/java/org/apache/camel/component/servlet/ServletComponent.java b/components/camel-servlet/src/main/java/org/apache/camel/component/servlet/ServletComponent.java
index 727a4ce..351a722 100644
--- a/components/camel-servlet/src/main/java/org/apache/camel/component/servlet/ServletComponent.java
+++ b/components/camel-servlet/src/main/java/org/apache/camel/component/servlet/ServletComponent.java
@@ -70,7 +70,12 @@ public class ServletComponent extends HttpComponent implements RestConsumerFacto
         Boolean throwExceptionOnFailure = getAndRemoveParameter(parameters, "throwExceptionOnFailure", Boolean.class);
         Boolean transferException = getAndRemoveParameter(parameters, "transferException", Boolean.class);
         Boolean bridgeEndpoint = getAndRemoveParameter(parameters, "bridgeEndpoint", Boolean.class);
+        // TODO we need to remove the Ref in Camel 3.0
         HttpBinding binding = resolveAndRemoveReferenceParameter(parameters, "httpBindingRef", HttpBinding.class);
+        if (binding == null) {
+            // just check the httpBinding parameter
+            binding = resolveAndRemoveReferenceParameter(parameters, "httpBinding", HttpBinding.class);
+        }
         Boolean matchOnUriPrefix = getAndRemoveParameter(parameters, "matchOnUriPrefix", Boolean.class);
         String servletName = getAndRemoveParameter(parameters, "servletName", String.class, getServletName());
         String httpMethodRestrict = getAndRemoveParameter(parameters, "httpMethodRestrict", String.class);