Author: buildbot Date: Fri Oct 21 14:18:58 2016 New Revision: 999748 Log: Production update by buildbot for camel
Modified: websites/production/camel/content/ahc.html websites/production/camel/content/cache/main.pageCache Modified: websites/production/camel/content/ahc.html ============================================================================== --- websites/production/camel/content/ahc.html (original) +++ websites/production/camel/content/ahc.html Fri Oct 21 14:18:58 2016 @@ -86,7 +86,7 @@ <tbody> <tr> <td valign="top" width="100%"> -<div class="wiki-content maincontent"><h2 id="AHC-AsyncHttpClient(AHC)Component">Async Http Client (AHC) Component</h2><p><strong>Available as of Camel 2.8</strong></p><p>The <strong><code>ahc:</code></strong> component provides HTTP based <a shape="rect" href="endpoint.html">endpoints</a> for consuming external HTTP resources (as a client to call external servers using HTTP).<br clear="none"> The component uses the <a shape="rect" class="external-link" href="https://github.com/AsyncHttpClient/async-http-client" rel="nofollow">Async Http Client</a> library.</p><p>Maven users will need to add the following dependency to their <strong><code>pom.xml</code></strong> for this component:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<div class="wiki-content maincontent"><h2 id="AHC-AsyncHttpClient(AHC)Component">Async Http Client (AHC) Component</h2><p><strong>Available from Camel 2.8</strong></p><p>The <strong><code>ahc</code></strong> component provides HTTP based <a shape="rect" href="endpoint.html">endpoints</a> for consuming external HTTP resources (as a client to call external servers using HTTP). The component uses the <a shape="rect" class="external-link" href="https://github.com/AsyncHttpClient/async-http-client" rel="nofollow">Async Http Client</a> library.</p><p>Maven users will need to add the following dependency to their <strong><code>pom.xml</code></strong> for this component:</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[<dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-ahc</artifactId> @@ -98,17 +98,17 @@ <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[ahc:http://hostname[:port][/resourceUri][?options] ahc:https://hostname[:port][/resourceUri][?options] ]]></script> -</div></div><p>The default ports are 80 for HTTP and 443 for HTTPS.</p><p>Query options can be specified on the URI using the following format: <strong><code>?option=value&option=value&...</code></strong></p><h3 id="AHC-AhcEndpointOptions">AhcEndpoint 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 <strong><code>AhcOperationFailedException</code></strong> 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, then the <strong><code>Exchan ge.HTTP_URI</code></strong> header is ignored, and use the endpoint's URI for request. You may also set the <strong><code>throwExcpetionOnFailure</code></strong> to be false to let the <strong><code>AhcProducer</code></strong> send all the fault response back.</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>If enabled and an <a shape="rect" href="exchange.html">Exchange</a> failed processing on the consumer side, and if the caused <strong><code>Exception</code></strong> was send back serialized in the response as a <strong><code>application/x-java-serialized-object</code></strong> 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 <strong><code>AhcOperationFailedException</code></strong>. The caused exception is required to be serialized.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>client</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 <strong><code>com.ning.http.client.AsyncHttpClient</code></strong>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>clientConfig</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 configure the <strong><code>AsyncHttpClient</code></strong> to use a custom <strong><code>com.ning.http.client.AsyncHttpClientConfig</code></strong> instance. This instance replaces any instance configured at the component level.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>clientConfig. x</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 configure additional properties of the <strong><code>com.ning.http.client.AsyncHttpClientConfig</code></strong> instance used by the endpoint. Note that configuration options set using this parameter will be merged with those set using the <strong><code>clientConfig</code></strong> parameter or the instance set at the component level with properties set using this parameter taking priority.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>clientConfig.realm.x</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> To configure realm properties of the <strong><code>com.ning.http.client.AsyncHttpClientConfig</code></strong> The options which can be used are the options from <strong><code>com.ning .http.client.Realm.RealmBuilder</code></strong>. e.g., to set the scheme, you should configure <strong><code>clientConfig.realm.scheme=DIGEST</code></strong></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>binding</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 <strong><code>org.apache.camel.component.ahc.AhcBinding</code></strong>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>sslContextParameters</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.9:</strong> Reference to a <strong><code>org.apache.camel.util.jsse.SSLContextParameters</code></strong> in the <a shape="rect" href="registry.html">Registry</a>.  This reference overrides any configured SSLContextParameters at the component level.  See < a shape="rect" href="#AHC-UsingtheJSSEConfigurationUtility">Using the JSSE Configuration Utility</a>.  Note that configuring this option will override any SSL/TLS configuration options provided through the <strong><code>clientConfig</code></strong> option at the endpoint or component level.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>bufferSize</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>4096</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.10.3:</strong> The initial in-memory buffer size used when transferring data between Camel and AHC Client.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>connectionClose</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><strong>Camel 2.18: </strong></strong>If this option is true, the producer will add a Conne ction Close header to HTTP Request</p></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><p>The default ports are <strong><code>80</code></strong> for HTTP and <strong><code>443</code></strong> for HTTPS.</p><p>Query options can be specified on the URI using the following format: <strong><code>?option=value&option=value&...</code></strong></p><h3 id="AHC-AhcEndpointOptions">AhcEndpoint 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>binding</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 <strong><code>org.apache.camel.component.ahc.AhcBinding</code></strong>.</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 <strong><code>true</code></strong>, then the <strong><code>Exchange.HTTP_URI</code></strong> header is ignored, and use the endpoint's URI for request. You may also set the <st rong><code>throwExcpetionOnFailure</code></strong> to be false to let the <strong><code>AhcProducer</code></strong> send all the fault response back.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>bufferSize</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>4096</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.10.3:</strong> The initial in-memory buffer size used when transferring data between Camel and the <strong><code>ahc</code></strong> Client.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>client</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 <strong><code>com.ning.http.client.AsyncHttpClient</code></strong>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>clientConfig</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 configure the <strong><code>AsyncHttpClient</code></strong> to use a custom <strong><code>com.ning.http.client.AsyncHttpClientConfig</code></strong> instance. This instance replaces any instance configured at the component level.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>clientConfig.x</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 configure additional properties of the <strong><code>com.ning.http.client.AsyncHttpClientConfig</code></strong> instance used by the endpoint.</p><p><strong>Note</strong>: that configuration options set using this parameter will be merged with those set using the <strong><code>clientConfig</code></strong> parameter or the instance set at the component level with properties set using this parameter taking priority.</p></td></tr> <tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>clientConfig.realm.x</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> To configure realm properties of the <strong><code>com.ning.http.client.AsyncHttpClientConfig</code></strong> The options which can be used are the options from <strong><code>com.ning.http.client.Realm.RealmBuilder</code></strong>. e.g., to set the scheme, you should configure <strong><code>clientConfig.realm.scheme=DIGEST</code></strong></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>connectionClose</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><strong>Camel 2.18: </strong></strong>If this option is <strong><code>true</code></strong>, the producer will add a Connection Close header to HTTP R equest</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>cookieHandler</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.19:</strong> Configure a cookie handler to maintain a HTTP session</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>sslContextParameters</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.9:</strong> Reference to a <strong><code>org.apache.camel.util.jsse.SSLContextParameters</code></strong> in the <a shape="rect" href="registry.html">Registry</a>.  This reference overrides any configured <strong><code>SSLContextParameters</code></strong> at the component level. </p><p>See <a shape="rect" href="#AHC-UsingtheJSSEConfigurationUtility">Using the JSSE Configuration Utility</a>. </p ><p><strong>Note</strong>: configuring this option will override any SSL/TLS >configuration options provided through >the <strong><code>clientConfig</code></strong> option at the endpoint or >component level.</p></td></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 <strong><code>AhcOperationFailedException</code></strong> 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>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>If enabled and an <a shape="rect" >href="exchange.html">Exchange</a> failed processing on the consumer side, and if the caused <strong><code>Exception</code></strong> was send back serialized in the response as a <strong><code>application/x-java-serialized-object</code></strong> 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 <strong><code>AhcOperationFailedException</code></strong>. The caused exception is required to be serialized.</p></td></tr></tbody></table> </div></div><h3 id="AHC-AhcComponentOptions">AhcComponent 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>client</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 <strong><code>com.ning.http.client.AsyncHttpClient</code>.</strong></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>clientConfig</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 configure the <strong><code>AsyncHttpClient</code></strong> to use a custom <strong><code>com.ning.http.client.AsyncHttpClientConfig</code></strong>.</p></td></tr><tr><td colspan="1" rowspan="1" class="co nfluenceTd"><p><code>binding</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 <strong><code>org.apache.camel.component.ahc.AhcBinding</code></strong>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>sslContextParameters</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.9:</strong> To configure custom SSL/TLS configuration options at the component level.  See  <a shape="rect" href="#AHC-UsingtheJSSEConfigurationUtility">Using the JSSE Configuration Utility</a> for more details.  Note that configuring this option will override any SSL/TLS configuration options provided through the clientConfig option at the endpoint or component level.</p></td></tr></tbody></table> -</div></div><p>Notice that setting any of the options on the <strong><code>AhcComponent</code></strong> will propagate those options to the <strong><code>AhcEndpoint</code></strong>(s) being created. However, the <strong><code>AhcEndpoint</code></strong> can also configure/override a custom option. Options set on endpoints will always take precedence over options from the <strong><code>AhcComponent</code>.</strong></p><h3 id="AHC-MessageHeaders">Message Headers</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>Type</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Exchange.HTTP_URI</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>URI to call. Will override existing URI set directly on the endpoint.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Exchange.HTTP_PATH</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Request URI's path, the header will be used to build the request URI with the <strong><code>HTTP_URI</code></strong>. If the path is start with "/", http producer will try to find the relative path based on th e <strong><code>Exchange.HTTP_BASE_URI</code></strong> header or the <code><strong>exchange.getFromEndpoint().getEndpointUri()</strong>;</code></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Exchange.HTTP_QUERY</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11 onwards:</strong> URI parameters. Will override existing URI parameters set directly on the endpoint.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Exchange.HTTP_RESPONSE_CODE</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>int</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The HTTP response code from the external server. Is <code>200</code> for OK.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Exchange.HTTP_CHARACTER_ENCODING</code></p></td><td colspan="1" rowspan="1" class ="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Character encoding.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Exchange.CONTENT_TYPE</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The HTTP content type. Is set on both the IN and OUT message to provide a content type, such as <strong><code>text/html</code></strong>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Exchange.CONTENT_ENCODING</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The HTTP content encoding. Is set on both the IN and OUT message to provide a content encoding, such as <strong><code>gzip</code></strong>.</p></td></tr></tbody></table> -</div></div><h3 id="AHC-MessageBody">Message Body</h3><p>Camel will store the HTTP response from the external server on the OUT body. All headers from the IN message will be copied to the OUT message, so headers are preserved during routing. Additionally Camel will add the HTTP response headers as well to the OUT message headers.</p><h3 id="AHC-Responsecode">Response code</h3><p>Camel will handle according to the HTTP response code:</p><ul class="alternate"><li>Response code is in the range <code>100..299</code>, Camel regards it as a success response.</li><li>Response code is in the range <code>300..399</code>, Camel regards it as a redirection response and will throw a <strong><code>AhcOperationFailedException</code></strong> with the information.</li><li><p>Response code is <code>400+</code>, Camel regards it as an external server failure and will throw a <strong><code>AhcOperationFailedException</code></strong> with the information.</p><div class="confluence-information-macro co nfluence-information-macro-tip"><p class="title">throwExceptionOnFailure</p><span class="aui-icon aui-icon-small aui-iconfont-approve confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>The option, <strong><code>throwExceptionOnFailure</code></strong>, can be set to <strong><code>false</code></strong> to prevent the <strong><code>AhcOperationFailedException</code></strong> from being thrown for failed response codes. This allows you to get any response from the remote server.</p></div></div></li></ul><h3 id="AHC-AhcOperationFailedException">AhcOperationFailedException</h3><p>This exception contains the following information:</p><ul class="alternate"><li>The HTTP status code.</li><li>The HTTP status line (text of the status code).</li><li>Redirect location, if server returned a redirect.</li><li>Response body as a <strong><code>java.lang.String</code></strong>, if the server provides a response body.</li></ul><h3 id="AHC-CallingusingGETorPOST"> Calling using GET or POST</h3><p>The following algorithm is used to determine if either <strong><code>GET</code></strong> or <strong><code>POST</code></strong> HTTP method should be used:</p><ol><li>  Use method provided in header.</li><li>  <strong><code>GET</code></strong> if query string is provided in header.</li><li>  <strong><code>GET</code></strong> if endpoint is configured with a query string.</li><li>  <strong><code>POST</code></strong> if there is data to send (body is not null).</li><li><strong>  <code>GET</code> </strong>otherwise<strong>.</strong></li></ol><h3 id="AHC-ConfiguringURItocall">Configuring URI to call</h3><p>You can set the HTTP producer's URI directly form the endpoint URI. In the route below, Camel will call out to the external server, <strong><code>oldhost</code></strong>, using HTTP.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> + <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>binding</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 <strong><code>org.apache.camel.component.ahc.AhcBinding</code></strong>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>client</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 <strong><code>com.ning.http.client.AsyncHttpClient</code>.</strong></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>clientConfig</code></p></td><td colspan="1" rows pan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>To configure the <strong><code>AsyncHttpClient</code></strong> to use a custom <strong><code>com.ning.http.client.AsyncHttpClientConfig</code></strong>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>sslContextParameters</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.9:</strong> To configure custom SSL/TLS configuration options at the component level. </p><p>See  <a shape="rect" href="#AHC-UsingtheJSSEConfigurationUtility">Using the JSSE Configuration Utility</a> for more details. </p><p><strong>Note</strong>: configuring this option will override any SSL/TLS configuration options provided through the <strong><code>clientConfig</code></strong> option at the endpoint or component level.</p></td></tr></tbody></table> +</div></div><p><strong>Note</strong>: setting any of the options on the <strong><code>AhcComponent</code></strong> will propagate those options to the <strong><code>AhcEndpoint</code></strong>(s) being created. However, the <strong><code>AhcEndpoint</code></strong> can also configure/override a custom option. Options set on endpoints will always take precedence over options from the <strong><code>AhcComponent</code>.</strong></p><h3 id="AHC-MessageHeaders">Message Headers</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>Type</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Exchange.CONTENT_ENCODING</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The HTTP content encoding. Is set on both the <strong><code>IN</code></strong> and <strong><code>OUT</code></strong> message to provide a content encoding, such as <strong><code>gzip</code></strong>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Exchange.CONTENT_TYPE</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The HTTP content type. Is set on both the <strong><co de>IN</code></strong> and <strong><code>OUT</code></strong> message to provide a content type, such as <strong><code>text/html</code></strong>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Exchange.HTTP_CHARACTER_ENCODING</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Character encoding.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Exchange.HTTP_PATH</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Request URI's path, the header will be used to build the request URI with the <strong><code>HTTP_URI</code></strong>.</p><p>However, if the path is start with <strong><code>"/"</code></strong>, the HTTP producer will try to find the relative path based on the <strong><code>Exchange.HTTP_BASE_URI</code></strong> header or the <code><strong>exchange.getFromEndpoint().getEndpointUri()</strong>;</code></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Exchange.HTTP_QUERY</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11</strong>: URI parameters. Will override existing URI parameters set directly on the endpoint.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Exchange.HTTP_RESPONSE_CODE</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>int</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The HTTP response code from the external server. Is <strong><code>200</code></strong> for <strong><code>OK</code></strong>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Exchange.HTTP_URI</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>URI to call. Will override existing URI set directly on the endpoint.</p></td></tr></tbody></table> +</div></div><h3 id="AHC-MessageBody">Message Body</h3><p>Camel will store the HTTP response from the external server on the <strong><code>OUT</code></strong> body. All headers from the <strong><code>IN</code></strong> message will be copied to the <strong><code>OUT</code></strong> message, so headers are preserved during routing. Additionally Camel will add the HTTP response headers as well to the <strong><code>OUT</code></strong> message headers.</p><h3 id="AHC-ResponseCodes">Response Codes</h3><p>The value of the HTTP response code governs how Camel behaves:</p><ul class="alternate"><li><p>If in the range <strong><code>100..299</code></strong> Camel will regard it as a successful response.</p></li><li><p>If in the range <strong><code>300..399</code></strong> Camel will regard it as a redirection response and throw an <strong><code>AhcOperationFailedException</code></strong> containing the relevant information.</p></li><li><p>If greater than <strong><code>400</c ode></strong> Camel regards it as an external server failure and throw an <strong><code>AhcOperationFailedException</code></strong> containing the relevant information.</p><div class="confluence-information-macro confluence-information-macro-tip"><p class="title">throwExceptionOnFailure</p><span class="aui-icon aui-icon-small aui-iconfont-approve confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>The option, <strong><code>throwExceptionOnFailure</code></strong>, can be set to <strong><code>false</code></strong> to prevent the <strong><code>AhcOperationFailedException</code></strong> from being thrown for failed response codes. This allows you to get any response from the remote server.</p></div></div></li></ul><h3 id="AHC-AhcOperationFailedExceptionDetails"><code>AhcOperationFailedException</code> Details</h3><p>This exception contains the following information:</p><ul class="alternate"><li>The HTTP status code.</li><li>The HTTP status line ( text of the status code).</li><li>Redirect location, if server returned a redirect.</li><li>Response body as a <strong><code>java.lang.String</code></strong>, if the server provides a response body.</li></ul><h3 id="AHC-CallingusingGETorPOST">Calling using <code>GET</code> or <code>POST</code></h3><p>The following algorithm is used to determine if either <strong><code>GET</code></strong> or <strong><code>POST</code></strong> HTTP method should be used:</p><ol><li>  Use method provided in header.</li><li>  <strong><code>GET</code></strong> if query string is provided in header.</li><li>  <strong><code>GET</code></strong> if endpoint is configured with a query string.</li><li>  <strong><code>POST</code></strong> if there is data to send (body is not <strong><code>null</code></strong>).</li><li><strong>  <code>GET</code> </strong>otherwise<strong>.</strong></li></ol><h3 id="AHC-ConfiguringtheURItoCall">Configuring the URI to Call</h3><p>You can s et the HTTP producer's URI directly form the endpoint URI. In the route below, Camel will call out to the external server, <strong><code>oldhost</code></strong>, using HTTP.</p><p><strong>Java DSL</strong>:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[from("direct:start") .to("ahc:http://oldhost"); ]]></script> -</div></div><p>And the equivalent Spring sample:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +</div></div><p><strong> Spring XML DSL</strong>:</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[<camelContext xmlns="http://activemq.apache.org/camel/schema/spring"> <route> <from uri="direct:start"/> @@ -116,27 +116,27 @@ ahc:https://hostname[:port][/resourceUri </route> </camelContext> ]]></script> -</div></div><p>You can override the HTTP endpoint URI by adding a header with the key, <strong><code>Exchange.HTTP_URI</code></strong>, on the message.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +</div></div><p>You can override the HTTP endpoint URI by adding a header with the key <strong><code>Exchange.HTTP_URI</code></strong> on the message.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[from("direct:start") .setHeader(Exchange.HTTP_URI, constant("http://newhost")) .to("ahc:http://oldhost"); ]]></script> -</div></div><h3 id="AHC-ConfiguringURIParameters">Configuring URI Parameters</h3><p>The <strong><code>ahc:</code></strong> producer supports URI parameters to be sent to the HTTP server. The URI parameters can either be set directly on the endpoint URI or as a header with the key <strong><code>Exchange.HTTP_QUERY</code></strong> on the message.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +</div></div><h3 id="AHC-ConfiguringURIParameters">Configuring URI Parameters</h3><p>The <strong><code>ahc</code></strong> producer supports URI parameters to be sent to the HTTP server. The URI parameters can either be set directly on the endpoint URI or as a header with the key <strong><code>Exchange.HTTP_QUERY</code></strong> on the message.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[from("direct:start") .to("ahc:http://oldhost?order=123&detail=short"); ]]></script> -</div></div><p>Or options provided in a header:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +</div></div><p>Or options provided via a header:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[from("direct:start") .setHeader(Exchange.HTTP_QUERY, constant("order=123&detail=short")) .to("ahc:http://oldhost"); ]]></script> -</div></div><h3 id="AHC-Howtosetthehttpmethod(GET/POST/PUT/DELETE/HEAD/OPTIONS/TRACE)totheHTTPproducer">How to set the http method (GET/POST/PUT/DELETE/HEAD/OPTIONS/TRACE) to the HTTP producer</h3><p>The HTTP component provides a way to set the HTTP request method by setting the message header. Here is an example;</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +</div></div><h3 id="AHC-HowtoSettheHTTPMethod(GET/POST/PUT/DELETE/HEAD/OPTIONS/TRACE)totheHTTPProducer">How to Set the HTTP Method (<code>GET</code>/<code>POST</code>/<code>PUT</code>/<code>DELETE</code>/<code>HEAD</code>/<code>OPTIONS</code>/<code>TRACE</code>) to the HTTP Producer</h3><p>The HTTP component provides a way to set the HTTP request method by setting the message header.</p><p><strong>Example</strong></p><p><strong>Java DSL</strong>:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[from("direct:start") .setHeader(Exchange.HTTP_METHOD, constant("POST")) .to("ahc:http://www.google.com") .to("mock:results"); ]]></script> -</div></div><p>And the equivalent Spring sample:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +</div></div><p><strong> Spring XML DSL</strong>:</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[<camelContext xmlns="http://activemq.apache.org/camel/schema/spring"> <route> <from uri="direct:start"/> @@ -148,21 +148,21 @@ ahc:https://hostname[:port][/resourceUri </route> </camelContext> ]]></script> -</div></div><h3 id="AHC-Configuringcharset">Configuring charset</h3><p>If you are using <strong><code>POST</code></strong> to send data you can configure the <code>charset</code> using the <code>Exchange</code> property:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +</div></div><h3 id="AHC-Configuringcharset">Configuring <code>charset</code></h3><p>If you are using <strong><code>POST</code></strong> to send data you can configure the <strong><code>charset</code></strong> using the <strong><code>Exchange</code></strong> property:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[exchange.setProperty(Exchange.CHARSET_NAME, "iso-8859-1"); ]]></script> -</div></div><h4 id="AHC-URIParametersfromtheendpointURI">URI Parameters from the endpoint URI</h4><p>In this sample we have the complete URI endpoint that is just what you would have typed in a web browser. Multiple URI parameters can of course be set using the <strong><code>&</code></strong> character as separator, just as you would in the web browser. Camel does no tricks here.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +</div></div><h4 id="AHC-URIParametersFromtheEndpointURI">URI Parameters From the Endpoint URI</h4><p>In this example we have the complete URI endpoint that is just what you would have typed in a web browser. Multiple URI parameters can of course be set using the <strong><code>&</code></strong> character as separator, just as you would in the web browser. Camel does no tricks here.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[// we query for Camel at the Google page template.sendBody("ahc:http://www.google.com/search?q=Camel", null); ]]></script> -</div></div><h4 id="AHC-URIParametersfromtheMessage">URI Parameters from the Message</h4><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +</div></div><h4 id="AHC-URIParametersFromtheMessage">URI Parameters From the Message</h4><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[Map headers = new HashMap(); headers.put(Exchange.HTTP_QUERY, "q=Camel&lr=lang_en"); // We query for Camel and English language at Google template.sendBody("ahc:http://www.google.com/search", null, headers); ]]></script> -</div></div><p>In the header value above notice that it should <strong>not</strong> be prefixed with <strong><code>?</code></strong> and you can separate parameters as usual with the <strong><code>&</code></strong> char.</p><h4 id="AHC-GettingtheResponseCode">Getting the Response Code</h4><p>You can get the HTTP response code from the AHC component by getting the value from the Out message header with <strong><code>Exchange.HTTP_RESPONSE_CODE</code></strong>.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +</div></div><p>In the header value above notice that it should <strong>not</strong> be prefixed with <strong><code>?</code></strong> and you can separate parameters as usual with the <strong><code>&</code></strong> char.</p><h4 id="AHC-GettingtheResponseCode">Getting the Response Code</h4><p>You can get the HTTP response code from the <strong><code>ahc</code></strong> component by getting the value from the <strong><code>OUT</code></strong> message header with <strong><code>Exchange.HTTP_RESPONSE_CODE</code></strong>.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[Exchange exchange = template.send("ahc:http://www.google.com/search", new Processor() { public void process(Exchange exchange) throws Exception { exchange.getIn().setHeader(Exchange.HTTP_QUERY, constant("hl=en&q=activemq")); @@ -172,7 +172,7 @@ template.sendBody("ahc:http://www.g Message out = exchange.getOut(); int responseCode = out.getHeader(Exchange.HTTP_RESPONSE_CODE, Integer.class); ]]></script> -</div></div><h3 id="AHC-ConfiguringAsyncHttpClient">Configuring AsyncHttpClient</h3><p>The <strong><code>AsyncHttpClient</code></strong> client uses a <strong><code>AsyncHttpClientConfig</code></strong> to configure the client. See the documentation at<br clear="none"> <a shape="rect" class="external-link" href="http://github.com/sonatype/async-http-client" rel="nofollow">Async Http Client</a> for more details.</p><p>In Camel <strong>2.8</strong>, configuration is limited to using the builder pattern provided by <strong><code>AsyncHttpClientConfig.Builder</code></strong>. In Camel 2.8, the <strong><code>AsyncHttpClientConfig</code></strong> doesn't support getters/setters so its not easy to create/configure using a Spring bean style e.g., the <strong><code><bean></code></strong> tag in the XML file.</p><p>The example below shows how to use a builder to create the <strong><code>AsyncHttpClientConfig</code></strong> which we configure on the <strong><code>AhcComponent</code ></strong>.</p><div class="code panel pdl" style="border-width: 1px;"><div >class="codeContent panelContent pdl"> +</div></div><h3 id="AHC-ConfiguringAsyncHttpClient">Configuring AsyncHttpClient</h3><p>The <strong><code>AsyncHttpClient</code></strong> client uses a <strong><code>AsyncHttpClientConfig</code></strong> to configure the client. See the documentation at<a shape="rect" class="external-link" href="http://github.com/sonatype/async-http-client" rel="nofollow"> Async Http Client</a> for more details.</p><p>In Camel <strong>2.8</strong>, configuration is limited to using the builder pattern provided by <strong><code>AsyncHttpClientConfig.Builder</code></strong>. In Camel <strong>2.8</strong>, the <strong><code>AsyncHttpClientConfig</code></strong> doesn't support getters/setters so its not easy to create/configure using a Spring bean style e.g., the <strong><code><bean></code></strong> tag in the XML file.</p><p>The example below shows how to use a builder to create the <strong><code>AsyncHttpClientConfig</code></strong> which we configure on the <strong><code>AhcComponent</code ></strong>.</p><div class="code panel pdl" style="border-width: 1px;"><div >class="codeContent panelContent pdl"> <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[ // create a client config builder DefaultAsyncHttpClientConfig.Builder builder = new DefaultAsyncHttpClientConfig.Builder(); @@ -185,11 +185,11 @@ AhcComponent component = context.getComp // and set our custom client config to be used component.setClientConfig(config); ]]></script> -</div></div>In Camel <strong>2.9</strong>, the AHC component uses Async HTTP library 1.6.4. This newer version provides added support for plain bean style configuration. The <strong><code>AsyncHttpClientConfigBean</code></strong> class provides getters and setters for the configuration options available in <strong><code>AsyncHttpClientConfig</code></strong>. An instance of <strong><code>AsyncHttpClientConfigBean</code></strong> may be passed directly to the AHC component or referenced in an endpoint URI using the <strong><code>clientConfig</code></strong> URI parameter.<p>Also available in Camel <strong>2.9</strong> is the ability to set configuration options directly in the URI. URI options starting with <strong><code>clientConfig</code></strong> can be used to set the various configurable properties of <strong><code>AsyncHttpClientConfig</code></strong>. Options specified in the endpoint URI are merged with those specified by the <strong><code>clientConfig</code></strong> opt ion. These options take precedence over the options specified on the URI endpoint. A copy of the <strong><code>AsyncHttpClientConfig</code></strong> is made for each new endpoint. The example below shows how to configure the AHC component using the <strong><code>clientConfig</code></strong> URI options.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +</div></div>In Camel <strong>2.9</strong>, the <strong><code>ahc</code></strong> component uses <code>Async HTTP library 1.6.4</code>. This newer version provides added support for plain bean style configuration. The <strong><code>AsyncHttpClientConfigBean</code></strong> class provides getters and setters for the configuration options available in <strong><code>AsyncHttpClientConfig</code></strong>. An instance of <strong><code>AsyncHttpClientConfigBean</code></strong> may be passed directly to the <strong><code>ahc</code></strong> component or referenced in an endpoint URI using the <strong><code>clientConfig</code></strong> URI parameter.<p>Also available in Camel <strong>2.9</strong> is the ability to set configuration options directly in the URI. URI options starting with <strong><code>clientConfig</code></strong> can be used to set the various configurable properties of <strong><code>AsyncHttpClientConfig</code></strong>. Options specified in the endpoint URI are mer ged with those specified by the <strong><code>clientConfig</code></strong> option. These options take precedence over the options specified on the URI endpoint. A copy of the <strong><code>AsyncHttpClientConfig</code></strong> is made for each new endpoint. The example below shows how to configure the <strong><code>ahc</code></strong> component using the <strong><code>clientConfig</code></strong> URI options.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[from("direct:start") .to("ahc:http://localhost:8080/foo?clientConfig.maxRequestRetry=3&clientConfig.followRedirects=true") ]]></script> -</div></div><h3 id="AHC-SSLSupport(HTTPS)">SSL Support (HTTPS)</h3><h5 id="AHC-UsingtheJSSEConfigurationUtility">Using the JSSE Configuration Utility</h5><p>As of Camel 2.9, the AHC component supports SSL/TLS configuration through the <a shape="rect" href="camel-configuration-utilities.html">Camel JSSE Configuration Utility</a>.  This utility greatly decreases the amount of component specific code you need to write and is configurable at the endpoint and component levels.  The following examples demonstrate how to use the utility with the AHC component.</p><h6 id="AHC-Programmaticconfigurationofthecomponent">Programmatic configuration of the component</h6><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +</div></div><h3 id="AHC-SSLSupport(HTTPS)">SSL Support (HTTPS)</h3><h5 id="AHC-UsingtheJSSEConfigurationUtility">Using the JSSE Configuration Utility</h5><p>From <strong>Camel 2.9</strong>, the <strong><code>ahc</code></strong> component supports SSL/TLS configuration through the <a shape="rect" href="camel-configuration-utilities.html">Camel JSSE Configuration Utility</a>.  This utility greatly decreases the amount of component specific code you need to write and is configurable at the endpoint and component levels.  The following examples demonstrate how to use the utility with the <strong><code>ahc</code></strong> component.</p><h6 id="AHC-Programmaticconfigurationofthecomponent">Programmatic configuration of the component</h6><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[KeyStoreParameters ksp = new KeyStoreParameters(); ksp.setResource("/users/home/server/keystore.jks"); ksp.setPassword("keystorePassword"); @@ -205,19 +205,13 @@ AhcComponent component = context.getComp component.setSslContextParameters(scp)); ]]></script> </div></div><h6 id="AHC-SpringDSLbasedconfigurationofendpoint">Spring DSL based configuration of endpoint</h6><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[... - <camel:sslContextParameters - id="sslContextParameters"> - <camel:keyManagers - keyPassword="keyPassword"> - <camel:keyStore - resource="/users/home/server/keystore.jks" - password="keystorePassword"/> - </camel:keyManagers> - </camel:sslContextParameters>... -... - <to uri="ahc:https://localhost/foo?sslContextParameters=#sslContextParameters"/> -... +<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[<camel:sslContextParameters id="sslContextParameters"> + <camel:keyManagers keyPassword="keyPassword"> + <camel:keyStore resource="/users/home/server/keystore.jks" password="keystorePassword"/> + </camel:keyManagers> +</camel:sslContextParameters> + +<to uri="ahc:https://localhost/foo?sslContextParameters=#sslContextParameters"/> ]]></script> </div></div><p></p><h3 id="AHC-SeeAlso">See Also</h3> <ul><li><a shape="rect" href="configuring-camel.html">Configuring Camel</a></li><li><a shape="rect" href="component.html">Component</a></li><li><a shape="rect" href="endpoint.html">Endpoint</a></li><li><a shape="rect" href="getting-started.html">Getting Started</a></li></ul><ul class="alternate"><li><a shape="rect" href="jetty.html">Jetty</a></li><li><a shape="rect" href="http.html">HTTP</a></li><li><a shape="rect" href="http4.html">HTTP4</a></li></ul></div> Modified: websites/production/camel/content/cache/main.pageCache ============================================================================== Binary files - no diff available.