Added: websites/production/camel/content/http-session-handling.html
==============================================================================
--- websites/production/camel/content/http-session-handling.html (added)
+++ websites/production/camel/content/http-session-handling.html Fri Oct 21 
11:21:26 2016
@@ -0,0 +1,184 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd";>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<html>
+<head>
+    <link href="//camel.apache.org/styles/site.css" rel="stylesheet" 
type="text/css">
+    <link href="//camel.apache.org/styles/type-settings.css" rel="stylesheet" 
type="text/css">
+    <script src="//camel.apache.org/styles/prototype.js" 
type="text/javascript"></script>
+    <script src="//camel.apache.org/styles/rico.js" 
type="text/javascript"></script>    
+    <script src="//camel.apache.org/styles/site.js" 
type="text/javascript"></script>
+
+    <meta http-equiv="Content-type" content="text/html;charset=UTF-8">
+
+    <style type="text/css">
+      .maincontent { overflow:hidden; }
+    </style>
+    <!--[if IE]>
+    <style type="text/css">
+      .maincontent { width:100%; }
+    </style>
+    <![endif]-->
+
+
+  <link href='//camel.apache.org/styles/highlighter/styles/shCoreCamel.css' 
rel='stylesheet' type='text/css' />
+  <link href='//camel.apache.org/styles/highlighter/styles/shThemeCamel.css' 
rel='stylesheet' type='text/css' />
+  <script src='//camel.apache.org/styles/highlighter/scripts/shCore.js' 
type='text/javascript'></script>
+  <script src='//camel.apache.org/styles/highlighter/scripts/shBrushXml.js' 
type='text/javascript'></script>
+  
+  <script type="text/javascript">
+  SyntaxHighlighter.defaults['toolbar'] = false;
+  SyntaxHighlighter.all();
+  </script>
+
+    <title>
+    Apache Camel: HTTP-Session Handling
+    </title>
+</head>
+<body>
+<div class="white_box">
+<div class="header">
+  <div class="header_l">
+    <div class="header_r">
+    </div>
+  </div>
+</div>
+<div class="content">
+  <div class="content_l">
+    <div class="content_r">
+      <div>
+          <!-- Banner -->
+<div id="banner-content"><div id="asf_logo">
+       <div id="activemq_logo" style="height:108px; background:transparent 
url(banner.data/apache-camel-7.png) no-repeat scroll left top;">
+            <a shape="rect" style="float:left; 
width:310px;display:block;text-indent:-5000px;text-decoration:none;line-height:140px;
 margin-top:20px; margin-left:18px;" href="http://camel.apache.org/";>Camel</a>
+            <a shape="rect" style="float:right; 
width:180px;display:block;text-indent:-5000px;text-decoration:none;line-height:80px;
 margin-top:45px; margin-right:10px;" href="http://www.apache.org";>Apache</a>
+       </div>
+</div></div>
+          <!-- Banner -->
+        <div class="top_red_bar">
+          <div id="site-breadcrumbs">
+                <!-- Breadcrumbs -->
+<a href="index.html">Apache Camel</a>&nbsp;&gt;&nbsp;<a 
href="documentation.html">Documentation</a>&nbsp;&gt;&nbsp;<a 
href="architecture.html">Architecture</a>&nbsp;&gt;&nbsp;<a 
href="http-session-handling.html">HTTP-Session Handling</a>
+          </div>
+          <!-- Quicklinks -->
+<div id="site-quicklinks"><p><a shape="rect" href="download.html">Download</a> 
| <a shape="rect" href="javadoc.html">JavaDoc</a> | <a shape="rect" 
href="source.html">Source</a> | <a shape="rect" class="external-link" 
href="https://github.com/apache/camel/"; rel="nofollow">Github</a> |&#160;<a 
shape="rect" href="discussion-forums.html">Forums</a> | <a shape="rect" 
href="support.html">Support</a></p></div>
+          <!-- Quicklinks -->
+        </div>
+
+       <table border="0">
+       <tbody>
+        <tr>
+        <td valign="top" width="100%">
+<div class="wiki-content maincontent"><p><strong>Available as of Camel 
2.19</strong></p><p>Several Camel components can use HTTP as the underlying 
transport protocol. In general HTTP calls are stateless in nature, however some 
servers allow to maintain state via cookies. Cookies are often used to maintain 
a server session (e.g. via a session cookie called "JSESSIONID" with servers 
implementing the JEE Servlet specification).</p><h1 
id="HTTP-SessionHandling-SessionScope">Session Scope</h1><p>If a Camel route 
intends to implement some kind of HTTP session handling the scope of this 
session should be considered.</p><p>Independently from the session scope the 
implementation must honor the domain of<br clear="none">the handled 
cookies.</p><h2 id="HTTP-SessionHandling-Route/ContextScope">Route/Context 
Scope</h2><p>It might be desirable to have a single session for a route or a <a 
shape="rect" href="camelcontext.html">CamelContext</a>. This essentially means 
that all calls to a server issu
 ed from a route or CamelContext share a single HTTP session.</p><h2 
id="HTTP-SessionHandling-EndpointScope">Endpoint Scope</h2><p>It is also 
possible to have a session on an <a shape="rect" 
href="endpoint.html">Endpoint</a> entity. This would mean that all invocations 
of an HTTP call issued by a single Endpoint share a session, whereas different 
Endpoints never share sessions, even if the call is sent to the same server.<br 
clear="none"><br clear="none">Some components like camel-http, and camel-http4 
support endpoint scoped sessions even prior to version 2.19.</p><h2 
id="HTTP-SessionHandling-ExchangeScope">Exchange Scope</h2><p>The third option 
to define a session scope is on <a shape="rect" href="exchange.html">Exchange 
</a>level. This is particularly useful for scenarios where the server session 
is really maintaining state.</p><p>In this case the route could e.g. first do a 
login call, then some update calls and finally a logout call. If the session 
handling would be defined on r
 oute or CamelContext scopes this would seem to run, however under load 
parallel invocations of the route would share a <strong>single</strong> 
session, which could cause issues. If the session is defined on exchange scope, 
each invocation of the route will get a separate session and the server can 
maintain a separate state for the different parallel invocations.</p><h1 
id="HTTP-SessionHandling-Usage">Usage</h1><p>If you are a Camel user, you see 
that several Camel components support the cookieHandler parameter on endpoint 
level. All you need to do is to instantiate a cookie handler&#160; appropriate 
for your use case and reference it in the cookieHandler parameter for all 
endpoints that are supposed to participate in the HTTP session.</p><p>There are 
two pre-implemented cookie handlers: 
<code>org.apache.camel.http.common.cookie.InstanceCookieHandler</code> and 
<code>org.apache.camel.http.common.cookie.ExchangeCookieHandler.</code></p><p>The
 <code>InstanceCookieHandler</code> stores&
 #160; cookies in an instance of itself. You can compare that with a browser 
instance that is shared between all the endpoints that use it (and will be used 
for all invocations of these endpoints). If you want to maintain separate 
sessions for different endpoints or groups of endpoints you may have multiple 
instances of the <code>InstanceCookieHandler</code>.</p><p>The 
<code>ExchangeCookieHandler</code> stores the session in the exchange. With the 
browser analogy this means that each Exchange will get its own browser instance 
(so sessions are separated). As the <code>ExchangeCookieHandler</code> does not 
store any state it is generally not useful to have multiple 
<code>ExchangeCookieHandler</code> instances (as they would access the same 
data, anyway).</p><h2 id="HTTP-SessionHandling-Example">Example</h2><p>The 
following three routes will each do two invocations of an echo REST service. In 
the first route (without a cookie handler) each invocation will get a new 
session. For the seco
 nd route all invocations will share a session. For the third route the first 
and the second invocation within the route share a session, but different (even 
parallel) invocations of the route will not share a session.</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[ &lt;cxf:rsClient 
id=&quot;rsClientProxy&quot; 
address=&quot;http://127.0.0.1:8080/CxfRsProducerSessionTest/&quot;
+    
serviceClass=&quot;org.apache.camel.component.cxf.jaxrs.testbean.EchoService&quot;
+    loggingFeatureEnabled=&quot;true&quot; /&gt;
+
+  &lt;camelContext id=&quot;camel&quot; 
xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
+    &lt;route&gt;
+       &lt;from uri=&quot;direct://proxy&quot;/&gt;
+       &lt;to uri=&quot;cxfrs://bean://rsClientProxy&quot;/&gt;
+       &lt;convertBodyTo type=&quot;java.lang.String&quot;/&gt;
+       &lt;to uri=&quot;cxfrs://bean://rsClientProxy&quot;/&gt;
+    &lt;/route&gt;
+    &lt;route&gt;
+       &lt;from uri=&quot;direct://proxyinstance&quot;/&gt;
+       &lt;to 
uri=&quot;cxfrs://bean://rsClientProxy?cookieHandler=#instanceCookieHandler&quot;/&gt;
+       &lt;convertBodyTo type=&quot;java.lang.String&quot;/&gt;
+       &lt;to 
uri=&quot;cxfrs://bean://rsClientProxy?cookieHandler=#instanceCookieHandler&quot;/&gt;
+    &lt;/route&gt;
+    &lt;route&gt;
+       &lt;from uri=&quot;direct://proxyexchange&quot;/&gt;
+       &lt;to 
uri=&quot;cxfrs://bean://rsClientProxy?cookieHandler=#exchangeCookieHandler&quot;/&gt;
+       &lt;convertBodyTo type=&quot;java.lang.String&quot;/&gt;
+       &lt;to 
uri=&quot;cxfrs://bean://rsClientProxy?cookieHandler=#exchangeCookieHandler&quot;/&gt;
+    &lt;/route&gt;
+  &lt;/camelContext&gt;
+
+  &lt;bean id=&quot;instanceCookieHandler&quot; 
class=&quot;org.apache.camel.http.common.cookie.InstanceCookieHandler&quot;/&gt;
+  &lt;bean id=&quot;exchangeCookieHandler&quot; 
class=&quot;org.apache.camel.http.common.cookie.ExchangeCookieHandler&quot;/&gt;
  ]]></script>
+</div></div><h2 id="HTTP-SessionHandling-ComponentDevelopers">Component 
Developers</h2><p>If you want to develop a HTTP based component that is 
supposed to participate in a session you have to add the following parts to 
your code:</p><ol><li>Include a build reference to camel-http-common (if it is 
not already there)</li><li>Add a cookieHandler parameter to the endpoint class 
(together with getter and setter)</li><li>Before your code does the HTTP call, 
if a cookie handler is set on the endpoint perform 
a&#160;<code>cookieHandler.loadCookies(exchange, uri)</code> call. It will 
return a <code>Map&lt;String, List&lt;String&gt;&gt;</code> containing the 
headers that need to be sent to the server. The details how you need to send 
these headers to the server depend on the underlying HTTP API you are 
using.</li><li>After your code does receive the HTTP response if a cookie 
handler is set on the endpoint perform a 
<code>cookieHandler.storeCookies(exchange, uri, m)</code> call. <code>m</code
 > is a <code>Map&lt;String, List&lt;String&gt;&gt;</code> containing the HTTP 
 > headers returned from the server.</li></ol><div 
 > class="confluence-information-macro 
 > confluence-information-macro-information"><span class="aui-icon 
 > aui-icon-small aui-iconfont-info 
 > confluence-information-macro-icon"></span><div 
 > class="confluence-information-macro-body"><p>Some APIs provide more direct 
 > support for cookie handling. In this case it might be easier to get the 
 > underlying <code>java.net.CookieStore</code> with a 
 > <code>cookeManager.getCookieStore(exchange)</code> call and handle the 
 > cookies using the cookie interface provided by the underlying 
 > library.</p></div></div></div>
+        </td>
+        <td valign="top">
+          <div class="navigation">
+            <div class="navigation_top">
+                <!-- NavigationBar -->
+<div class="navigation_bottom" id="navigation_bottom"><h3 
id="Navigation-Overview"><a shape="rect" 
href="overview.html">Overview</a></h3><ul class="alternate"><li><a shape="rect" 
href="index.html">Home</a></li><li><a shape="rect" 
href="download.html">Download</a></li><li><a shape="rect" 
href="getting-started.html">Getting Started</a></li><li><a shape="rect" 
href="faq.html">FAQ</a></li></ul><h3 id="Navigation-Documentation"><a 
shape="rect" href="documentation.html">Documentation</a></h3><ul 
class="alternate"><li><a shape="rect" href="user-guide.html">User 
Guide</a></li><li><a shape="rect" href="manual.html">Manual</a></li><li><a 
shape="rect" href="books.html">Books</a></li><li><a shape="rect" 
href="tutorials.html">Tutorials</a></li><li><a shape="rect" 
href="examples.html">Examples</a></li><li><a shape="rect" 
href="cookbook.html">Cookbook</a></li><li><a shape="rect" 
href="architecture.html">Architecture</a></li><li><a shape="rect" 
href="enterprise-integration-patterns.html">Enterprise
  Integration Patterns</a></li><li><a shape="rect" 
href="dsl.html">DSL</a></li><li><a shape="rect" 
href="components.html">Components</a></li><li><a shape="rect" 
href="data-format.html">Data Format</a></li><li><a shape="rect" 
href="languages.html">Languages</a></li><li><a shape="rect" 
href="security.html">Security</a></li><li><a shape="rect" 
href="security-advisories.html">Security Advisories</a></li></ul><h3 
id="Navigation-Search">Search</h3><form 
enctype="application/x-www-form-urlencoded" method="get" id="cse-search-box" 
action="http://www.google.com/cse";>
+  <div>
+    <input type="hidden" name="cx" value="007878419884033443453:m5nhvy4hmyq">
+    <input type="hidden" name="ie" value="UTF-8">
+    <input type="text" name="q" size="21">
+    <input type="submit" name="sa" value="Search">
+  </div>
+</form>
+<script type="text/javascript" 
src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en";></script><h3
 id="Navigation-Community"><a shape="rect" 
href="community.html">Community</a></h3><ul class="alternate"><li><a 
shape="rect" href="support.html">Support</a></li><li><a shape="rect" 
href="contributing.html">Contributing</a></li><li><a shape="rect" 
href="discussion-forums.html">Discussion Forums</a></li><li><a shape="rect" 
href="mailing-lists.html">Mailing Lists</a></li><li><a shape="rect" 
href="user-stories.html">User Stories</a></li><li><a shape="rect" 
href="news.html">News</a></li><li><a shape="rect" 
href="articles.html">Articles</a></li><li><a shape="rect" 
href="site.html">Site</a></li><li><a shape="rect" 
href="team.html">Team</a></li><li><a shape="rect" class="external-link" 
href="http://camel-extra.googlecode.com/"; rel="nofollow">Camel 
Extra</a></li></ul><h3 id="Navigation-Developers"><a shape="rect" 
href="developers.html">Developers</a></h3><ul class="alternate"
 ><li><a shape="rect" href="developers.html">Developer Guide</a></li><li><a 
 >shape="rect" href="source.html">Source</a></li><li><a shape="rect" 
 >class="external-link" href="https://github.com/apache/camel/"; 
 >rel="nofollow">Github</a></li><li><a shape="rect" 
 >href="building.html">Building</a></li><li><a shape="rect" 
 >href="javadoc.html">JavaDoc</a></li><li><a shape="rect" 
 >href="irc-room.html">IRC Room</a></li></ul><h3 
 >id="Navigation-ApacheSoftwareFoundation">Apache Software Foundation</h3><ul 
 >class="alternate"><li><a shape="rect" class="external-link" 
 >href="http://www.apache.org/licenses/";>License</a></li><li><a shape="rect" 
 >class="external-link" 
 >href="http://www.apache.org/foundation/sponsorship.html";>Sponsorship</a></li><li><a
 > shape="rect" class="external-link" 
 >href="http://www.apache.org/foundation/thanks.html";>Thanks</a></li><li><a 
 >shape="rect" class="external-link" 
 >href="http://www.apache.org/security/";>Security</a></li></ul></div>
+                <!-- NavigationBar -->
+            </div>
+          </div>
+        </td>
+        </tr>
+       </tbody>
+        </table>
+
+
+        <div class="bottom_red_bar"></div>
+      </div>
+    </div>
+  </div>
+</div>
+<div class="black_box">
+<div class="footer">
+  <div class="footer_l">
+    <div class="footer_r">
+      <div>
+        <a href="$base/privacy-policy.html">Privacy Policy</a> -
+        (<a 
href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=65876818";>edit
 page</a>)
+        (<a 
href="https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=65876818&amp;showComments=true&amp;showCommentArea=true#addcomment";>add
 comment</a>)
+      </div>
+    </div>
+  </div>
+</div>
+</div>
+</div>
+<div class="design_attribution">
+&copy; 2004-2015 The Apache Software Foundation.
+<br>          
+Apache Camel, Camel, Apache, the Apache feather logo, and the Apache Camel 
project logo are trademarks of The Apache Software Foundation.  All other marks 
mentioned may be trademarks or registered trademarks of their respective owners.
+<br>
+<a href="http://hiramchirino.com";>Graphic Design By Hiram</a>
+</div>
+
+<!-- Camel committers that would like access to the Analytics, send a note to 
priv...@camel.apache.org -->
+<script type="text/javascript">
+
+  var _gaq = _gaq || [];
+  _gaq.push(['_setAccount', 'UA-25976253-1']);
+  _gaq.push(['_trackPageview']);
+
+  (function() {
+    var ga = document.createElement('script'); ga.type = 'text/javascript'; 
ga.async = true;
+    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 
'http://www') + '.google-analytics.com/ga.js';
+    var s = document.getElementsByTagName('script')[0]; 
s.parentNode.insertBefore(ga, s);
+  })();
+
+</script>
+
+</body>
+</html>
+
+

Modified: websites/production/camel/content/http.html
==============================================================================
--- websites/production/camel/content/http.html (original)
+++ websites/production/camel/content/http.html Fri Oct 21 11:21:26 2016
@@ -128,7 +128,7 @@ from(&quot;direct:start&quot;)
 &lt;to uri=&quot;mock:results&quot;/&gt;
 ]]></script>
 </div></div></td></tr></tbody></table></div><h3 
id="HTTP-HttpEndpointOptions">HttpEndpoint Options</h3><div 
class="confluenceTableSmall"><div class="table-wrap">
- <table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" 
rowspan="1" 
class="confluenceTd"><p><code>throwExceptionOnFailure</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>Option to disable throwing the 
<code>HttpOperationFailedException</code> in case of failed responses from the 
remote server. This allows you to get all responses regardless of the HTTP 
status code.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>bridgeEndpoint</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>If the option is true , HttpProducer will 
ignore the Exchange.HTTP_URI he
 ader, and use the endpoint's URI for request. You may also set the * 
throwExceptionOnFailure* to be false to let the HttpProducer send all the fault 
response back. <br clear="none" class="atl-forced-newline"> <strong>Camel 
2.3:</strong> If the option is true, HttpProducer and CamelServlet will skip 
the gzip processing if the content-encoding is "gzip".</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>disableStreamCache</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>DefaultHttpBinding will copy the request 
input stream into a stream cache and put it into message body if this option is 
false to support read it twice, otherwise DefaultHttpBinding will set the 
request input stream direct into the message body. <strong>Camel 2.17:</strong> 
this options is now also support by the producer to allow using the response 
stream directly instead of stream caching as by de
 fault.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><s><code>httpBindingRef</code></s></p></td><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><s><code>null</code></s></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><s><strong>Deprecated and removed in Camel 
2.17:</strong> Reference to a 
<code>org.apache.camel.component.http.HttpBinding</code> in the <a shape="rect" 
href="registry.html">Registry</a>. Use the <code>httpBinding</code> option 
instead.</s></p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>httpBinding</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> Reference to a 
<code>org.apache.camel.component.http.HttpBinding</code> in the <a shape="rect" 
href="registry.html">Registry</a>.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><s><code>httpClientConfigurerRef</code></
 s></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><s><code>null</code></s></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><s><strong>Deprecated and removed in Camel 
2.17:</strong> Reference to a 
<code>org.apache.camel.component.http.HttpClientConfigurer</code> in the <a 
shape="rect" href="registry.html">Registry</a>. Use the 
<code>httpClientConfigurer</code> option instead.</s></p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>httpClientConfigurer</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> 
Reference to a 
<code>org.apache.camel.component.http.HttpClientConfigurer</code> in the <a 
shape="rect" href="registry.html">Registry</a>.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>httpClient.XXX</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>null</code></p></td
 ><td colspan="1" rowspan="1" class="confluenceTd"><p>Setting options on the <a 
 >shape="rect" class="external-link" 
 >href="http://hc.apache.org/httpclient-3.x/apidocs/org/apache/commons/httpclient/params/HttpClientParams.html";>HttpClientParams</a>.
 > For instance <code>httpClient.soTimeout=5000</code> will set the 
 ><code>SO_TIMEOUT</code> to 5 seconds.</p></td></tr><tr><td colspan="1" 
 >rowspan="1" 
 >class="confluenceTd"><p><code>clientConnectionManager</code></p></td><td 
 >colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td 
 >colspan="1" rowspan="1" class="confluenceTd"><p>To use a custom 
 ><code>org.apache.http.conn.ClientConnectionManager</code>.</p></td></tr><tr><td
 > colspan="1" rowspan="1" 
 >class="confluenceTd"><p><code>transferException</code></p></td><td 
 >colspan="1" rowspan="1" 
 >class="confluenceTd"><p><code>false</code></p></td><td colspan="1" 
 >rowspan="1" class="confluenceTd"><p><strong>Camel 2.6:</strong> If enabled 
 >and an <a shape="rect" href="exchange.html">Exchang
 e</a> failed processing on the consumer side, and if the caused 
<code>Exception</code> was send back serialized in the response as a 
<code>application/x-java-serialized-object</code> content type (for example 
using <a shape="rect" href="jetty.html">Jetty</a> or <a shape="rect" 
href="servlet.html">SERVLET</a> Camel components). On the producer side the 
exception will be deserialized and thrown as is, instead of the 
<code>HttpOperationFailedException</code>. The caused exception is required to 
be serialized.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>headerFilterStrategy</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11:</strong> 
Reference to a instance of 
<code>org.apache.camel.spi.HeaderFilterStrategy</code> in the <a shape="rect" 
href="registry.html">Registry</a>. It will be used to apply the custom 
headerFilterStrategy on the new create 
 HttpEndpoint.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>urlRewrite</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.11:</strong> 
<strong>Producer only</strong> Refers to a custom 
<code>org.apache.camel.component.http.UrlRewrite</code> which allows you to 
rewrite urls when you bridge/proxy endpoints. See more details at <a 
shape="rect" href="urlrewrite.html">UrlRewrite</a> and <a shape="rect" 
href="how-to-use-camel-as-a-http-proxy-between-a-client-and-server.html">How to 
use Camel as a HTTP proxy between a client and server</a>.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><code>eagerCheckContentAvailable</code></td><td 
colspan="1" rowspan="1" class="confluenceTd"><code>false</code></td><td 
colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 
2.15.3/2.16:</strong> <strong>Consumer only</strong> &#160;Whether to eag
 er check whether the HTTP requests has content if the content-length header is 
0 or not present. &#160;This can be turned on in case HTTP clients do not send 
streamed data.</td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><code>copyHeaders</code></td><td colspan="1" rowspan="1" 
class="confluenceTd"><code>true</code></td><td colspan="1" rowspan="1" 
class="confluenceTd"><strong>Camel 2.16:</strong> &#160;If this option is true 
then IN exchange headers will be copied to OUT exchange headers according to 
copy strategy. Setting this to false, allows to only include the headers from 
the HTTP response (not propagating IN headers).</td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><code>okStatusCodeRange</code></td><td 
colspan="1" rowspan="1" class="confluenceTd"><code>200-299</code></td><td 
colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.16:</strong> The 
status codes which is considered a success response. The values are inclusive. 
The range must be de
 fined as from-to with the dash included.</td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><code>ignoreResponseBody</code></td><td 
colspan="1" rowspan="1" class="confluenceTd"><code>false</code></td><td 
colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.16:</strong> If 
this option is true, The http producer won't read response body and cache the 
input stream.</td></tr></tbody></table>
+ <table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" 
rowspan="1" 
class="confluenceTd"><p><code>throwExceptionOnFailure</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>Option to disable throwing the 
<code>HttpOperationFailedException</code> in case of failed responses from the 
remote server. This allows you to get all responses regardless of the HTTP 
status code.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>bridgeEndpoint</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>If the option is true , HttpProducer will 
ignore the Exchange.HTTP_URI he
 ader, and use the endpoint's URI for request. You may also set the * 
throwExceptionOnFailure* to be false to let the HttpProducer send all the fault 
response back. <br clear="none" class="atl-forced-newline"> <strong>Camel 
2.3:</strong> If the option is true, HttpProducer and CamelServlet will skip 
the gzip processing if the content-encoding is "gzip".</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>disableStreamCache</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>DefaultHttpBinding will copy the request 
input stream into a stream cache and put it into message body if this option is 
false to support read it twice, otherwise DefaultHttpBinding will set the 
request input stream direct into the message body. <strong>Camel 2.17:</strong> 
this options is now also support by the producer to allow using the response 
stream directly instead of stream caching as by de
 fault.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><s><code>httpBindingRef</code></s></p></td><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><s><code>null</code></s></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><s><strong>Deprecated and removed in Camel 
2.17:</strong> Reference to a 
<code>org.apache.camel.component.http.HttpBinding</code> in the <a shape="rect" 
href="registry.html">Registry</a>. Use the <code>httpBinding</code> option 
instead.</s></p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>httpBinding</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> Reference to a 
<code>org.apache.camel.component.http.HttpBinding</code> in the <a shape="rect" 
href="registry.html">Registry</a>.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><s><code>httpClientConfigurerRef</code></
 s></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><s><code>null</code></s></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><s><strong>Deprecated and removed in Camel 
2.17:</strong> Reference to a 
<code>org.apache.camel.component.http.HttpClientConfigurer</code> in the <a 
shape="rect" href="registry.html">Registry</a>. Use the 
<code>httpClientConfigurer</code> option instead.</s></p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>httpClientConfigurer</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> 
Reference to a 
<code>org.apache.camel.component.http.HttpClientConfigurer</code> in the <a 
shape="rect" href="registry.html">Registry</a>.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>httpClient.XXX</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>null</code></p></td
 ><td colspan="1" rowspan="1" class="confluenceTd"><p>Setting options on the <a 
 >shape="rect" class="external-link" 
 >href="http://hc.apache.org/httpclient-3.x/apidocs/org/apache/commons/httpclient/params/HttpClientParams.html";>HttpClientParams</a>.
 > For instance <code>httpClient.soTimeout=5000</code> will set the 
 ><code>SO_TIMEOUT</code> to 5 seconds.</p></td></tr><tr><td colspan="1" 
 >rowspan="1" 
 >class="confluenceTd"><p><code>clientConnectionManager</code></p></td><td 
 >colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td 
 >colspan="1" rowspan="1" class="confluenceTd"><p>To use a custom 
 ><code>org.apache.http.conn.ClientConnectionManager</code>.</p></td></tr><tr><td
 > colspan="1" rowspan="1" 
 >class="confluenceTd"><p><code>transferException</code></p></td><td 
 >colspan="1" rowspan="1" 
 >class="confluenceTd"><p><code>false</code></p></td><td colspan="1" 
 >rowspan="1" class="confluenceTd"><p><strong>Camel 2.6:</strong> If enabled 
 >and an <a shape="rect" href="exchange.html">Exchang
 e</a> failed processing on the consumer side, and if the caused 
<code>Exception</code> was send back serialized in the response as a 
<code>application/x-java-serialized-object</code> content type (for example 
using <a shape="rect" href="jetty.html">Jetty</a> or <a shape="rect" 
href="servlet.html">SERVLET</a> Camel components). On the producer side the 
exception will be deserialized and thrown as is, instead of the 
<code>HttpOperationFailedException</code>. The caused exception is required to 
be serialized.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>headerFilterStrategy</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11:</strong> 
Reference to a instance of 
<code>org.apache.camel.spi.HeaderFilterStrategy</code> in the <a shape="rect" 
href="registry.html">Registry</a>. It will be used to apply the custom 
headerFilterStrategy on the new create 
 HttpEndpoint.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>urlRewrite</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.11:</strong> 
<strong>Producer only</strong> Refers to a custom 
<code>org.apache.camel.component.http.UrlRewrite</code> which allows you to 
rewrite urls when you bridge/proxy endpoints. See more details at <a 
shape="rect" href="urlrewrite.html">UrlRewrite</a> and <a shape="rect" 
href="how-to-use-camel-as-a-http-proxy-between-a-client-and-server.html">How to 
use Camel as a HTTP proxy between a client and server</a>.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><code>eagerCheckContentAvailable</code></td><td 
colspan="1" rowspan="1" class="confluenceTd"><code>false</code></td><td 
colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 
2.15.3/2.16:</strong> <strong>Consumer only</strong> &#160;Whether to eag
 er check whether the HTTP requests has content if the content-length header is 
0 or not present. &#160;This can be turned on in case HTTP clients do not send 
streamed data.</td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><code>copyHeaders</code></td><td colspan="1" rowspan="1" 
class="confluenceTd"><code>true</code></td><td colspan="1" rowspan="1" 
class="confluenceTd"><strong>Camel 2.16:</strong> &#160;If this option is true 
then IN exchange headers will be copied to OUT exchange headers according to 
copy strategy. Setting this to false, allows to only include the headers from 
the HTTP response (not propagating IN headers).</td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><code>okStatusCodeRange</code></td><td 
colspan="1" rowspan="1" class="confluenceTd"><code>200-299</code></td><td 
colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.16:</strong> The 
status codes which is considered a success response. The values are inclusive. 
The range must be de
 fined as from-to with the dash included.</td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><code>ignoreResponseBody</code></td><td 
colspan="1" rowspan="1" class="confluenceTd"><code>false</code></td><td 
colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.16:</strong> If 
this option is true, The http producer won't read response body and cache the 
input stream.</td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><code>cookieHandler</code></td><td colspan="1" rowspan="1" 
class="confluenceTd"><code>null</code></td><td colspan="1" rowspan="1" 
class="confluenceTd"><strong>Camel: 2.19:</strong> Configure a cookie handler 
to maintain a HTTP session</td></tr></tbody></table>
 </div></div><h3 id="HTTP-AuthenticationandProxy">Authentication and 
Proxy</h3><p>The following authentication options can also be set on the 
HttpEndpoint:</p><div class="confluenceTableSmall"><div class="table-wrap">
  <table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>authMethod</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>Authentication method, either 
as <code>Basic</code>, <code>Digest</code> or 
<code>NTLM</code>.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>authMethodPriority</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Priority of authentication methods. Is a 
list separated with comma. For example: <code>Basic,Digest</code> to exclude 
<code>NTLM</code>.</p></td></tr><tr><td colspan="1" rowspan="1" clas
 s="confluenceTd"><p><code>authUsername</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Username for 
authentication</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>authPassword</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Password for 
authentication</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>authDomain</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Domain for NTML 
authentication</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>authHost</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Optional host for NTML authentica
 tion</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>proxyHost</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>The proxy host name</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>proxyPort</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>The proxy port number</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>proxyAuthMethod</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Authentication method for proxy, either as 
<code>Basic</code>, <code>Digest</code> or 
<code>NTLM</code>.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>proxyAuthUsername</code></p></td><td colspan="1" 
rowspan="1" class="conflu
 enceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Username for proxy authentication</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>proxyAuthPassword</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Password for proxy 
authentication</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>proxyAuthDomain</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Domain for proxy NTML 
authentication</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>proxyAuthHost</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Optional host for proxy NTML 
authentication</p></td></tr></tbody></table>
 </div></div><p>When using authentication you <strong>must</strong> provide the 
choice of method for the <code>authMethod</code> or 
<code>authProxyMethod</code> options.<br clear="none"> You can configure the 
proxy and authentication details on either the <code>HttpComponent</code> or 
the <code>HttpEndoint</code>. Values provided on the <code>HttpEndpoint</code> 
will take precedence over <code>HttpComponent</code>. Its most likely best to 
configure this on the <code>HttpComponent</code> which allows you to do this 
once.</p><p>The <a shape="rect" href="http.html">HTTP</a> component uses 
convention over configuration which means that if you have not explicit set a 
<code>authMethodPriority</code> then it will fallback and use the select(ed) 
<code>authMethod</code> as priority as well. So if you use 
<code>authMethod.Basic</code> then the <code>auhtMethodPriority</code> will be 
<code>Basic</code> only.</p><p>Note: camel-http is based on HttpClient v3.x and 
as such has only <a shape="rect"
  class="external-link" 
href="http://hc.apache.org/httpclient-3.x/authentication.html#NTLM";>limited 
support</a> for what is known as NTLMv1, the early version of the NTLM 
protocol. It does not support NTLMv2 at all. Camel-http4 has support for 
NTLMv2.</p><h3 id="HTTP-HttpComponentOptions">HttpComponent Options</h3><div 
class="confluenceTableSmall"><div class="table-wrap">



Reply via email to