This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new ed3ad8332459 faq update (#21804)
ed3ad8332459 is described below
commit ed3ad8332459e31a45752b9faef1e46c6a970de3
Author: Claus Ibsen <[email protected]>
AuthorDate: Sat Mar 7 17:35:09 2026 +0100
faq update (#21804)
* CAMEL-16861: Cleanup docs
---
.../src/main/docs/cxf-component.adoc | 86 +++++++++++++++
.../docs/modules/eips/pages/removeHeaders-eip.adoc | 14 +++
docs/user-manual/modules/ROOT/pages/component.adoc | 15 +++
docs/user-manual/modules/ROOT/pages/endpoint.adoc | 21 ++++
.../modules/ROOT/pages/exception-clause.adoc | 45 ++++++++
docs/user-manual/modules/faq/nav.adoc | 9 --
...tion-orgapachecamelnosuchendpointexception.adoc | 24 ----
.../exception-orgxmlsaxsaxparseexception.adoc | 25 -----
...-avoid-sending-some-or-all-message-headers.adoc | 121 ---------------------
...-without-touching-the-spring-configuration.adoc | 87 ---------------
docs/user-manual/modules/faq/pages/index.adoc | 14 ---
.../faq/pages/running-camel-standalone.adoc | 21 ----
...se-when-or-otherwise-in-a-java-camel-route.adoc | 87 ---------------
...-file-consumer-use-the-camel-error-handler.adoc | 48 --------
...ge-with-error-handler-not-work-as-expected.adoc | 15 ---
...-the-exception-null-when-i-use-onexception.adoc | 36 ------
16 files changed, 181 insertions(+), 487 deletions(-)
diff --git
a/components/camel-cxf/camel-cxf-soap/src/main/docs/cxf-component.adoc
b/components/camel-cxf/camel-cxf-soap/src/main/docs/cxf-component.adoc
index 8864b969fc4b..7c3b9f5c2bda 100644
--- a/components/camel-cxf/camel-cxf-soap/src/main/docs/cxf-component.adoc
+++ b/components/camel-cxf/camel-cxf-soap/src/main/docs/cxf-component.adoc
@@ -1134,4 +1134,90 @@ ServletRequest request = (ServletRequest)
cxfMessage.get("HTTP.REQUEST");
String remoteAddress = request.getRemoteAddr();
----
+== How to switch the CXF consumer between HTTP and HTTPS without touching the
Spring configuration?
+
+You can find general information how to secure your Camel CXF Consumer with
HTTPS in the
+http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html[Apache
CXF Client HTTP transport documentation].
+
+A simple Camel CXF Consumer configuration which use the `\http:conduit`
+configuration to enable SSL and an external properties file for all
+environment specific configurations could look like in Spring XML:
+
+.Spring XML
+[source,xml]
+----
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ctx="http://www.springframework.org/schema/context"
+ xmlns:camel="http://camel.apache.org/schema/spring"
+ xmlns:camel-cxf="http://camel.apache.org/schema/cxf"
+ xmlns:http="http://cxf.apache.org/transports/http/configuration"
+ xmlns:sec="http://cxf.apache.org/configuration/security"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
+ http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd
+ http://camel.apache.org/schema/osgi
http://camel.apache.org/schema/osgi/camel-osgi.xsd
+ http://camel.apache.org/schema/cxf
http://camel.apache.org/schema/cxf/camel-cxf.xsd
+ http://cxf.apache.org/transports/http/configuration
http://cxf.apache.org/schemas/configuration/http-conf.xsd
+ http://cxf.apache.org/configuration/security
http://cxf.apache.org/schemas/configuration/security.xsd
+ ">
+
+ <import resource="classpath:META-INF/cxf/cxf.xml" />
+ <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
+ <import resource="classpath:META-INF/cxf/cxf-extension-http-jetty.xml" />
+
+ <ctx:property-placeholder location="classpath:orderEntry.cfg" />
+
+ <camel-cxf:cxfEndpoint id="orderEntryEndpoint"
+ address="${endpointUri}"
+ serviceClass="com.company.product.OrderEntryService"
+ endpointName="ssp:OrderEntry"
+ serviceName="ssp:OrderEntryService"
+ wsdlURL="META-INF/orderEntry/orderEntry.wsdl"
+ xmlns:ssp="http://www.company.com/product/orderEntry/service/1" />
+
+ <http:conduit
name="{http://www.company.com/product/orderEntry/service/1}OrderEntry.http-conduit">
+ <http:tlsClientParameters disableCNCheck="true">
+ <sec:trustManagers>
+ <sec:keyStore type="JKS" password="${trustStore.password}"
file="${trustStore.file}"/>
+ </sec:trustManagers>
+ <sec:cipherSuitesFilter>
+ <sec:include>.*_EXPORT_.*</sec:include>
+ <sec:include>.*_EXPORT1024_.*</sec:include>
+ <sec:include>.*_WITH_DES_.*</sec:include>
+ <sec:include>.*_WITH_NULL_.*</sec:include>
+ <sec:exclude>.*_DH_anon_.*</sec:exclude>
+ </sec:cipherSuitesFilter>
+ </http:tlsClientParameters>
+ </http:conduit>
+
+ <camel:camelContext trace="true">
+ <camel:routeBuilder ref="orderEntryRoute" />
+ </camel:camelContext>
+
+ <bean id="orderEntryRoute" class="com.company.product.OrderEntryRoute" />
+</beans>
+----
+
+The environment specific configurations are externalized into a properties
file:
+
+*orderEntry.cfg*
+[source,java]
+----
+endpointUri=https://localhost:8181/OrderEntry
+trustStore.password=password
+trustStore.file=etc/myApp.ts
+----
+
+With this configuration, you Camel CXF consumer connects with HTTPS to the web
service provider.
+
+If you need to change the protocol to HTTP, maybe for tracing/debugging
+reasons, change the `endpointUri` property in your properties file to
+e.g. `\http://localhost:8080/OrderEntry`.
+
+Apache CXF detects that you _only_ use HTTP and instantiates a
+`HttpURLConnectionFactoryImpl` instead of a `HttpsURLConnectionFactory`.
+
+
include::spring-boot:partial$starter.adoc[]
diff --git
a/core/camel-core-engine/src/main/docs/modules/eips/pages/removeHeaders-eip.adoc
b/core/camel-core-engine/src/main/docs/modules/eips/pages/removeHeaders-eip.adoc
index 97598fe8b564..2bdd4abac88a 100644
---
a/core/camel-core-engine/src/main/docs/modules/eips/pages/removeHeaders-eip.adoc
+++
b/core/camel-core-engine/src/main/docs/modules/eips/pages/removeHeaders-eip.adoc
@@ -109,6 +109,20 @@ YAML::
----
====
+== Leaking Camel headers when sending to an endpoint
+
+When I send a message to a Camel endpoint such as the
+xref:components::mail-component.adoc[Mail] component, then the mail include
some message
+headers I do not want. How can I avoid this?
+
+This is a gotcha more people encounter. However, it's very easy to solve.
+To remove all headers (see above) use a `*` expression:
+
+Most components will automatically remove all Camel specific headers (the
header key starts with `Camel`) using
+the `DefaultHeaderFilterStrategy` which automatic removes these headers.
However if you use a component that does
+not do this, such as a custom component, or a Camel component which has not
been improved to do that, then you can
+remove all these Camel specific headers using `Camel*` with the
`removeHeaders` EIP as shown previously on this page.
+
== See Also
Camel provides the following EIPs for removing headers or exchange properties:
diff --git a/docs/user-manual/modules/ROOT/pages/component.adoc
b/docs/user-manual/modules/ROOT/pages/component.adoc
index 81f2f7dc1f54..34c74f28c7f3 100644
--- a/docs/user-manual/modules/ROOT/pages/component.adoc
+++ b/docs/user-manual/modules/ROOT/pages/component.adoc
@@ -139,6 +139,21 @@ Component-DSL is a builder API that allows using type-safe
construction of Camel
This is an advanced topic and described in more detail in the
xref:writing-components.adoc[Writing Components Guide].
+=== Using HeaderFilterStrategy with components
+
+Some components supports configuring a custom header filter strategy.
+
+This allows you to implement the
+`org.apache.camel.spi.HeaderFilterStrategy` interface, where one can
+filter unwanted headers from the communication while not removing them from the
+`Exchange`.
+
+Camel core offers a default filter strategy implementation, the
+`DefaultHeaderFilterStrategy`, to which one can provide a regular expression
+pattern or a set of header names to be filtered out.
+
+
+
== See Also
- List of all Camel xref:components::index.adoc[Components]
diff --git a/docs/user-manual/modules/ROOT/pages/endpoint.adoc
b/docs/user-manual/modules/ROOT/pages/endpoint.adoc
index 08d0283f20b9..489cbfeb03eb 100644
--- a/docs/user-manual/modules/ROOT/pages/endpoint.adoc
+++ b/docs/user-manual/modules/ROOT/pages/endpoint.adoc
@@ -177,6 +177,27 @@ So if you write the following XML it should work...
</route>
----
+If you do not escape the & sign, then you can `org.xml.sax.SAXParseException`
or other kind of XML parsing errors.
+
+In the URIs used for specifying Camel endpoints, the `&` is used to
+separate the parameters. However, `&` also is a reserved character in XML.
+
+Because of this, you have to replace all `&` in your URIs by `+&+` when
+using the XML DSL to configure Camel routes.
+
+An example: this snippet of code in Java DSL:
+
+[source,java]
+----
+from("timer://myTimer?fixedRate=true&delay=0&period=2000")
+----
+
+... matches this example in the XML syntax where `&` has been replaced with
`+&+`
+
+[source,xml]
+----
+<from uri="timer://myTimer?fixedRate=true&delay=0&period=2000"/>
+----
=== Configuring parameter values using raw values, such as passwords
diff --git a/docs/user-manual/modules/ROOT/pages/exception-clause.adoc
b/docs/user-manual/modules/ROOT/pages/exception-clause.adoc
index fc08a72fc348..cf2737cac53f 100644
--- a/docs/user-manual/modules/ROOT/pages/exception-clause.adoc
+++ b/docs/user-manual/modules/ROOT/pages/exception-clause.adoc
@@ -725,6 +725,51 @@ And the same example in YAML DSL
uri: mock:result
----
+== Why is the exception null when I use onException ?
+
+If you use `onException` to handle exceptions, and want to get the caused
+`Exception` from a `Processor` in Java code, such as shown below:
+
+[source,java]
+----
+.onException(Exception.class)
+ .handled(true)
+ .process(new Processor() {
+ @Override
+ public void process(Exchange exchange) throws Exception {
+ Exception cause = exchange.getException();
+ // why cause exception is null ???
+ }
+ })
+.end()
+----
+
+Then beware the caused exception is no longer available from
`exchange.getException()`, because
+the message is processed by the `onException` block.
+
+Instead, you can access the caused exception from exchange property on the
+exchange with the key `Exchange.EXCEPTION_CAUGHT`, as follows:
+
+[source,java]
+----
+Exception cause = exchange.getProperty(Exchange.EXCEPTION_CAUGHT,
Exception.class);
+----
+
+The correct code to use in the example is there:
+
+[source,java]
+----
+.onException(Exception.class).handled(true)
+ .process(new Processor() {
+ @Override
+ public void process(Exchange exchange) throws Exception {
+ Exception cause = exchange.getProperty(Exchange.EXCEPTION_CAUGHT,
Exception.class);
+ // we now have the caused exception
+ }
+ })
+.end()
+----
+
== Handling and Sending a Fixed Response Back to the Client
In the route above we handled the exception but routed it to a different
diff --git a/docs/user-manual/modules/faq/nav.adoc
b/docs/user-manual/modules/faq/nav.adoc
index 082415cfa567..ce01dab121e3 100644
--- a/docs/user-manual/modules/faq/nav.adoc
+++ b/docs/user-manual/modules/faq/nav.adoc
@@ -4,19 +4,10 @@
** xref:how-can-i-get-the-source-code.adoc[How can I get the source code?]
** xref:how-do-i-become-a-committer.adoc[How do I become a committer?]
** xref:how-do-i-edit-the-website.adoc[How do I edit the website?]
-** xref:running-camel-standalone.adoc[Running Camel standalone]
** xref:what-is-camel.adoc[What is Camel?]
** xref:ROOT:languages.adoc[What languages are supported?]
** xref:why-the-name-camel.adoc[Why the name Camel?]
-** xref:how-to-avoid-sending-some-or-all-message-headers.adoc[How to avoid
sending some or all message headers?]
** xref:how-to-remove-the-http-protocol-headers-in-the-camel-message.adoc[How
to remove the http protocol headers in the camel message?]
-**
xref:how-to-switch-the-cxf-consumer-between-http-and-https-without-touching-the-spring-configuration.adoc[How
to switch the CXF consumer between HTTP and HTTPS without touching the Spring
configuration?]
** xref:how-to-use-a-dynamic-uri-in-to.adoc[How to use a dynamic URI in to()?]
** xref:using-getin-or-getout-methods-on-exchange.adoc[Using getIn or getOut
methods on Exchange]
-** xref:why-can-i-not-use-when-or-otherwise-in-a-java-camel-route.adoc[Why can
I not use when or otherwise in a Java Camel route?]
-**
xref:why-does-my-file-consumer-not-pick-up-the-file-and-how-do-i-let-the-file-consumer-use-the-camel-error-handler.adoc[Why
does my file consumer not pick up the file, and how do I let the file consumer
use the Camel error handler?]
-**
xref:why-does-useoriginalmessage-with-error-handler-not-work-as-expected.adoc[Why
does useOriginalMessage with error handler not work as expected?]
** xref:why-is-my-message-body-empty.adoc[Why is my message body empty?]
-** xref:why-is-the-exception-null-when-i-use-onexception.adoc[Why is the
exception null when I use onException?]
-** xref:exception-orgapachecamelnosuchendpointexception.adoc[Exception -
org.apache.camel.NoSuchEndpointException]
-** xref:exception-orgxmlsaxsaxparseexception.adoc[Exception -
org.xml.sax.SAXParseException]
diff --git
a/docs/user-manual/modules/faq/pages/exception-orgapachecamelnosuchendpointexception.adoc
b/docs/user-manual/modules/faq/pages/exception-orgapachecamelnosuchendpointexception.adoc
deleted file mode 100644
index 487f046884eb..000000000000
---
a/docs/user-manual/modules/faq/pages/exception-orgapachecamelnosuchendpointexception.adoc
+++ /dev/null
@@ -1,24 +0,0 @@
-= Exception: `org.apache.camel.NoSuchEndpointException`
-
-The usual cause for this exception is a missing component JAR on the
-classpath. The exception detail message will tell you what the missing
-component is. You can solve the issue by adding the required JAR files
-to the classpath.
-
-== Example:
-
-If you try to use the definition below without having `camel-jetty.jar` on
-the classpath, you'll run into this exception:
-----
-org.apache.camel.NoSuchEndpointException: No endpoint could be found for:
jetty:http://localhost:8080/bus
-----
-
-For example in a route such as XML:
-
-[source,xml]
-----
-<route>
- <from uri="jetty:http://localhost:8080/bus" />
- <to uri="file://C:/tmp/something.xml" />
-</route>
-----
diff --git
a/docs/user-manual/modules/faq/pages/exception-orgxmlsaxsaxparseexception.adoc
b/docs/user-manual/modules/faq/pages/exception-orgxmlsaxsaxparseexception.adoc
deleted file mode 100644
index b67733a8ab71..000000000000
---
a/docs/user-manual/modules/faq/pages/exception-orgxmlsaxsaxparseexception.adoc
+++ /dev/null
@@ -1,25 +0,0 @@
-= Exception: `org.xml.sax.SAXParseException`
-
-----
-The reference to entity "..." must end with the ';' delimiter.
-----
-
-In the URIs used for specifying Camel endpoints, the `&` is used to
-separate the parameters. However, `&` also is a reserved character in XML.
-
-Because of this, you have to replace all & in your URIs by `+&+` when
-using the XML DSL to configure Camel routes.
-
-An example: this snippet of code in the xref:ROOT:dsl.adoc[DSL]...
-
-[source,java]
-----
-from("timer://myTimer?fixedRate=true&delay=0&period=2000")
-----
-
-... matches this example in the XML syntax where `&` has been replaced with
`+&+`
-
-[source,xml]
-----
-<from uri="timer://myTimer?fixedRate=true&delay=0&period=2000"/>
-----
diff --git
a/docs/user-manual/modules/faq/pages/how-to-avoid-sending-some-or-all-message-headers.adoc
b/docs/user-manual/modules/faq/pages/how-to-avoid-sending-some-or-all-message-headers.adoc
deleted file mode 100644
index 6091e4d1235a..000000000000
---
a/docs/user-manual/modules/faq/pages/how-to-avoid-sending-some-or-all-message-headers.adoc
+++ /dev/null
@@ -1,121 +0,0 @@
-= How to avoid sending some or all message headers?
-
-When I send a message to a Camel endpoint such as the
-xref:components::mail-component.adoc[Mail] component, then the mail include
some message
-headers I do not want. How can I avoid this?
-
-[[Howtoavoidsendingsomeorallmessageheaders-UseremoveHeadersintheroute]]
-== Use removeHeaders in the route
-
-This is a gotcha more people encounter. However it's very easy to solve.
-To remove all headers use a wildcard expression:
-
-[source,java]
-----
-from(...).removeHeaders("*").to("smtp://....")
-----
-
-Similarly to remove all headers except some of your own (`myheader1` and
-`myheader2`) use a wildcard with a vararg:
-
-[source,java]
-----
-from(...).removeHeaders("*", "myheader1", "myheader2").to("smtp://....")
-----
-
-To do (a similar thing) in XML DSL you simply do:
-
-[source,xml]
-----
-<route>
- <from uri="..."/>
- <removeHeaders pattern="*" excludePattern="header1|header2"/>
- <to uri="smtp://..."/>
-</route>
-----
-
-At present, the `excludePattern` only supports one header name (which
-can be include wild cards or regular expressions). We tackle this
-limitation with
-https://issues.apache.org/jira/browse/CAMEL-6445[CAMEL-6445].
-
-Again to remove only Camel headers but no other transport headers:
-
-[source,java]
-----
-from(...).removeHeaders("Camel*").to("smtp://....")
-----
-
-To do this in XML DSL you simply do:
-
-[source,xml]
-----
-<route>
- <from uri="..."/>
- <removeHeaders pattern="Camel*"/>
- <to uri="smtp://..."/>
-</route>
-----
-
-There is also a removeHeader in the DSL to remove a single header. But
-it does not support patterns, so you can only remove a single header by
-its name.
-
-[[Howtoavoidsendingsomeorallmessageheaders-UseHeaderFilterStrategy]]
-== Use HeaderFilterStrategy
-
-An alternative is that some of the Camel
-xref:ROOT:component.adoc[Components] supports configuring a custom header
-filter strategy.
-This allows you to implement the
-`org.apache.camel.spi.HeaderFilterStrategy` interface, where one can
-filter unwanted headers from the communication while not removing them from the
-Exchange. Though it's often easier to use the `removeHeaders` in the Camel
route
-as shown above.
-
-Camel core offers a default filter strategy implementation, the
-DefaultHeaderFilterStrategy class, to which one can provide a regular
expression
-pattern or a set of header names to be filtered out.
-
-[source,xml]
-----
-<bean class="org.apache.camel.impl.DefaultHeaderFilterStrategy" id="myFilter">
- <property name="outFilter">
- <set>
- <value>unwantedHeaderName</value>
- </set>
- </property>
-</bean>
-...
-<setHeader name="allowedHeaderName"><constant>some
metadata</constant></setHeader>
-<setHeader name="unwantedHeaderName"><constant>some private
data</constant></setHeader>
-<to id="publish"
uri="activemq:queue:destinationName?headerFilterStrategy=#myFilter"/>
-<log message="${header.unwantedHeaderName}"/>
-----
-
-The destination queue would receive a JMS message with the allowedHeaderName as
-JMS property. If the queue messages are consumed by a Camel route, then the
-exchange will have the allowedHeaderName as a header. The log would print "some
-private data" since the header has only been filtered out from the producer
-endpoint, but not removed from the Exchange.
-
-[[Howtoavoidsendingsomeorallmessageheaders-SelectingTheAcceptedHeaders]]
-== Selecting the accepted headers
-
-The more steps a route has, more headers tend to be present in the exchange.
-When the number of headers is large, undetermined, or one can't know in advance
-which headers must be filtered out, it is desirable not to deliver by default
-the headers to the destination endpoint.
-
-In this case, one can filter out everything and selectively send only certain
-headers to the destination endpoint. The DefaultHeaderFilterStrategy behavior
-can be reversed so only certain headers are accepted through the filterOnMatch
-property.
-
-[source,xml]
-----
-<bean class="org.apache.camel.impl.DefaultHeaderFilterStrategy" id="myFilter">
- <property name="filterOnMatch" value="false" />
- ...
-</bean>
-----
diff --git
a/docs/user-manual/modules/faq/pages/how-to-switch-the-cxf-consumer-between-http-and-https-without-touching-the-spring-configuration.adoc
b/docs/user-manual/modules/faq/pages/how-to-switch-the-cxf-consumer-between-http-and-https-without-touching-the-spring-configuration.adoc
deleted file mode 100644
index cc9d9c2d50e9..000000000000
---
a/docs/user-manual/modules/faq/pages/how-to-switch-the-cxf-consumer-between-http-and-https-without-touching-the-spring-configuration.adoc
+++ /dev/null
@@ -1,87 +0,0 @@
-= How to switch the CXF consumer between HTTP and HTTPS without touching the
Spring configuration?
-
-You can find general information how to secure your Camel CXF Consumer
-with HTTPS
-http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html[here].
-
-A simple Camel CXF Consumer configuration which use the `\http:conduit`
-configuration to enable SSL and an external properties file for all
-environment specific configurations could looks like:
-
-*bundle-context.xml*
-
-[source,xml]
-----
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:ctx="http://www.springframework.org/schema/context"
- xmlns:camel="http://camel.apache.org/schema/spring"
- xmlns:camel-cxf="http://camel.apache.org/schema/cxf"
- xmlns:http="http://cxf.apache.org/transports/http/configuration"
- xmlns:sec="http://cxf.apache.org/configuration/security"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
- http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd
- http://camel.apache.org/schema/osgi
http://camel.apache.org/schema/osgi/camel-osgi.xsd
- http://camel.apache.org/schema/cxf
http://camel.apache.org/schema/cxf/camel-cxf.xsd
- http://cxf.apache.org/transports/http/configuration
http://cxf.apache.org/schemas/configuration/http-conf.xsd
- http://cxf.apache.org/configuration/security
http://cxf.apache.org/schemas/configuration/security.xsd
- ">
-
- <import resource="classpath:META-INF/cxf/cxf.xml" />
- <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
- <import resource="classpath:META-INF/cxf/cxf-extension-http-jetty.xml" />
-
- <ctx:property-placeholder location="classpath:orderEntry.cfg" />
-
- <camel-cxf:cxfEndpoint id="orderEntryEndpoint"
- address="${endpointUri}"
- serviceClass="com.company.product.OrderEntryService"
- endpointName="ssp:OrderEntry"
- serviceName="ssp:OrderEntryService"
- wsdlURL="META-INF/orderEntry/orderEntry.wsdl"
- xmlns:ssp="http://www.company.com/product/orderEntry/service/1" />
-
- <http:conduit
name="{http://www.company.com/product/orderEntry/service/1}OrderEntry.http-conduit">
- <http:tlsClientParameters disableCNCheck="true">
- <sec:trustManagers>
- <sec:keyStore type="JKS" password="${trustStore.password}"
file="${trustStore.file}"/>
- </sec:trustManagers>
- <sec:cipherSuitesFilter>
- <sec:include>.*_EXPORT_.*</sec:include>
- <sec:include>.*_EXPORT1024_.*</sec:include>
- <sec:include>.*_WITH_DES_.*</sec:include>
- <sec:include>.*_WITH_NULL_.*</sec:include>
- <sec:exclude>.*_DH_anon_.*</sec:exclude>
- </sec:cipherSuitesFilter>
- </http:tlsClientParameters>
- </http:conduit>
-
- <camel:camelContext trace="true">
- <camel:routeBuilder ref="orderEntryRoute" />
- </camel:camelContext>
-
- <bean id="orderEntryRoute" class="com.company.product.OrderEntryRoute" />
-</beans>
-----
-
-The environment specific configurations are externalized into a
-properties file:
-
-*orderEntry.cfg*
-
-[source,java]
-----
-endpointUri=https://localhost:8181/OrderEntry
-trustStore.password=password
-trustStore.file=etc/myApp.ts
-----
-
-With this configuration, you Camel CXF consumer connects with HTTPS to
-the web service provider.
-If you need to change the protocol to HTTP, maybe for tracing/debugging
-reasons, change the `endpointUri` property in your properties file to
-e.g. `\http://localhost:8080/OrderEntry`. That's all! Isn't it easy?
-Apache CXF detects that you "only" use HTTP and instantiates a
-`HttpURLConnectionFactoryImpl` instead of a `HttpsURLConnectionFactory`.
diff --git a/docs/user-manual/modules/faq/pages/index.adoc
b/docs/user-manual/modules/faq/pages/index.adoc
index 93d14ebd7776..a90c274e152c 100644
--- a/docs/user-manual/modules/faq/pages/index.adoc
+++ b/docs/user-manual/modules/faq/pages/index.adoc
@@ -18,7 +18,6 @@ General questions about Camel
* xref:how-can-i-get-the-source-code.adoc[How can I get the source code?]
* xref:how-do-i-become-a-committer.adoc[How do I become a committer?]
* xref:how-do-i-edit-the-website.adoc[How do I edit the website?]
-* xref:running-camel-standalone.adoc[Running Camel standalone]
* xref:what-is-camel.adoc[What is Camel?]
* xref:ROOT:languages.adoc[What languages are supported?]
* xref:why-the-name-camel.adoc[Why the name Camel?]
@@ -28,21 +27,8 @@ General questions about Camel
Questions on using Apache Camel
-* xref:how-to-avoid-sending-some-or-all-message-headers.adoc[How to avoid
sending some or all message headers?]
* xref:how-to-remove-the-http-protocol-headers-in-the-camel-message.adoc[How
to remove the http protocol headers in the camel message?]
-*
xref:how-to-switch-the-cxf-consumer-between-http-and-https-without-touching-the-spring-configuration.adoc[How
to switch the CXF consumer between HTTP and HTTPS without touching the Spring
configuration?]
* xref:how-to-use-a-dynamic-uri-in-to.adoc[How to use a dynamic URI in to()?]
* xref:using-getin-or-getout-methods-on-exchange.adoc[Using getIn or getOut
methods on Exchange]
-* xref:why-can-i-not-use-when-or-otherwise-in-a-java-camel-route.adoc[Why can
I not use when or otherwise in a Java Camel route?]
-*
xref:why-does-my-file-consumer-not-pick-up-the-file-and-how-do-i-let-the-file-consumer-use-the-camel-error-handler.adoc[Why
does my file consumer not pick up the file, and how do I let the file consumer
use the Camel error handler?]
-*
xref:why-does-useoriginalmessage-with-error-handler-not-work-as-expected.adoc[Why
does useOriginalMessage with error handler not work as expected?]
* xref:why-is-my-message-body-empty.adoc[Why is my message body empty?]
-* xref:why-is-the-exception-null-when-i-use-onexception.adoc[Why is the
exception null when I use onException?]
-[[FAQ-CommonProblems]]
-== Common Problems
-
-Common Problems that people have when riding the Camel
-
-* xref:exception-orgapachecamelnosuchendpointexception.adoc[Exception -
org.apache.camel.NoSuchEndpointException]
-* xref:exception-orgxmlsaxsaxparseexception.adoc[Exception -
org.xml.sax.SAXParseException]
diff --git a/docs/user-manual/modules/faq/pages/running-camel-standalone.adoc
b/docs/user-manual/modules/faq/pages/running-camel-standalone.adoc
deleted file mode 100644
index 6e8cf0d13cf2..000000000000
--- a/docs/user-manual/modules/faq/pages/running-camel-standalone.adoc
+++ /dev/null
@@ -1,21 +0,0 @@
-= Is it possible to start Camel as a standalone application, without embedding
it in another application?
-
-Yes, Camel can run standalone or in any container. Running Standalone is
-as simple just to create a xref:ROOT:camelcontext.adoc[CamelContext], add
-routes and start it. If you don't want to write your own Java main, you
-could use the one from xref:ROOT:spring.adoc[camel-spring]
-(https://www.javadoc.io/doc/org.apache.camel/camel-spring/current/index.html)
also used
-by the xref:ROOT:camel-maven-plugin.adoc[Camel Maven Plugin].
-
-The starting guide is a good place to start: +
-xref:ROOT:getting-started.adoc[Getting Started]
-
-The FAQ have some more details: +
-xref:index.adoc[FAQ]
-
-And if you use Maven for your projects Camel has maven tools to boot up
-in standalone mode and quickly run you Camel application: +
-xref:ROOT:camel-maven-plugin.adoc[Camel Maven Plugin]
-
-This is how you can run the xref:ROOT:examples.adoc[Examples] that is
-included in the Camel distribution.
diff --git
a/docs/user-manual/modules/faq/pages/why-can-i-not-use-when-or-otherwise-in-a-java-camel-route.adoc
b/docs/user-manual/modules/faq/pages/why-can-i-not-use-when-or-otherwise-in-a-java-camel-route.adoc
deleted file mode 100644
index 73d74e734f08..000000000000
---
a/docs/user-manual/modules/faq/pages/why-can-i-not-use-when-or-otherwise-in-a-java-camel-route.adoc
+++ /dev/null
@@ -1,87 +0,0 @@
-= Why can I not use when/otherwise in a Java Camel route?
-
-When using the xref:components:eips:choice-eip.adoc[Content Based Router] in
-the Java DSL you may have a situation where the compiler will not accept
-the following `when()` or `otherwise()` statement.
-
-[TIP]
-====
-**Quick tip**
-
-Use `.endChoice()` to return "back" to the
-xref:components:eips:choice-eip.adoc[Content Based Router].
-====
-
-For example as shown in the route below where we use the
-xref:components:eips:loadBalance-eip.adoc[Load Balancer] inside the
-xref:components:eips:choice-eip.adoc[Content Based Router] in the first when:
-
-*Code will not compile*
-
-[source,java]
-----
-from("direct:start")
- .choice()
- .when(body().contains("Camel"))
- .loadBalance().roundRobin().to("mock:foo").to("mock:bar")
- .otherwise()
- .to("mock:result");
-----
-
-Well the first issue is that the
xref:components:eips:loadBalance-eip.adoc[Load Balancer]
-uses the additional routing to know what to use in the load balancing.
-In this example that would be the:
-
-[source,java]
-----
-.to("mock:foo").to("mock:bar")
-----
-
-To indicate when the balancing stops, you should use `.end()` to denote
-the end. So the route is updates as follows:
-
-*Code will still not compile*
-
-[source,java]
-----
-from("direct:start")
- .choice()
- .when(body().contains("Camel"))
- .loadBalance().roundRobin().to("mock:foo").to("mock:bar").end()
- .otherwise()
- .to("mock:result");
-----
-
-But the code will still not compile. The reason is we have stretched how
-far we can take the good old Java language in terms of
-xref:ROOT:dsl.adoc[DSL]. In a more modern language such as
-Scala or Groovy you would be able
-to let it be stack based, so the `.end()` will pop the last type of the
-stack, and you would return back to the scope of the
-xref:components:eips:choice-eip.adoc[Content Based Router]. However that's not
-easily doable in Java. So we need to help Java a bit, which you do by
-using `.endChoice()`, which tells Camel to "pop the stack" and return
-back to the scope of the xref:components:eips:choice-eip.adoc[Content Based
-Router].
-
-*Code compiles*
-
-[source,java]
-----
-from("direct:start")
- .choice()
- .when(body().contains("Camel"))
-
.loadBalance().roundRobin().to("mock:foo").to("mock:bar").endChoice()
- .otherwise()
- .to("mock:result");
-----
-
-You only need to use `.endChoice()` when using certain
-xref:components:eips:enterprise-integration-patterns.adoc[EIP]s which often
have additional
-methods to configure or as part of the
-xref:components:eips:enterprise-integration-patterns.adoc[EIP] itself. For
example the
-xref:components:eips:split-eip.adoc[Splitter] EIP has a sub-route which
denotes the
-routing of each split message. You would also have to use
-`.endChoice()` to indicate the end of the sub-route and to return back
-to the xref:components:eips:choice-eip.adoc[Content Based Router].
-
diff --git
a/docs/user-manual/modules/faq/pages/why-does-my-file-consumer-not-pick-up-the-file-and-how-do-i-let-the-file-consumer-use-the-camel-error-handler.adoc
b/docs/user-manual/modules/faq/pages/why-does-my-file-consumer-not-pick-up-the-file-and-how-do-i-let-the-file-consumer-use-the-camel-error-handler.adoc
deleted file mode 100644
index c7f59334521c..000000000000
---
a/docs/user-manual/modules/faq/pages/why-does-my-file-consumer-not-pick-up-the-file-and-how-do-i-let-the-file-consumer-use-the-camel-error-handler.adoc
+++ /dev/null
@@ -1,48 +0,0 @@
-= Why does my file consumer not pick up the file, and how do I let the file
consumer use the Camel error handler?
-
-There could be several reasons why the
xref:components::file-component.adoc[File] consumer is
-not picking up files. For example it may not run at all, or it cannot
-acquire a read lock on the file.
-xref:index.adoc#FAQ-LoggingQuestions[Check the logs] for any exceptions or
other
-informative messages. You can
-
-[[WhydoesmyfileconsumernotpickupthefileandhowdoIletthefileconsumerusetheCamelerrorhandler-HowtouseCamelsroutingerrorhandlerswiththefileconsumer]]
-== How to use Camel's routing error handlers with the file consumer
-
-Well, this is really a
-http://en.wikipedia.org/wiki/Chicken_or_the_egg["chicken or the egg"]
-question. The Camel xref:ROOT:error-handler.adoc[error handler]
-(e.g., in the routes) only applies when a message is being routed by the
-routing engine.
-Before this happens, a consumer must successfully receive a message,
-create a Camel xref:ROOT:exchange.adoc[Exchange], populate the
-xref:ROOT:exchange.adoc[Exchange] with message details (e.g., body and
-headers), and then pass the xref:ROOT:exchange.adoc[Exchange] to the routing
-engine. Only at this point can the routing error handler deal with
-exceptions occurring. Before this point, any error handling is really
-xref:ROOT:component.adoc[component]-specific.
-
-[NOTE]
-====
-**Bridge with error handler**
-
-From Camel 2.10 onwards the file and ftp consumers can now bridge to the
-Camel routing engine's error handler. See more details at the
-`bridgeErrorHandler` option on the xref:components::file-component.adoc[File]
-documentation.
-====
-
-If the component consumer extends the
-https://github.com/apache/camel/blob/main/camel-core/src/main/java/org/apache/camel/impl/DefaultConsumer.java[`DefaultConsumer`]
-from Camel, then it offers an
-https://github.com/apache/camel/blob/main/camel-core/src/main/java/org/apache/camel/spi/ExceptionHandler.java[`org.apache.camel.spi.ExceptionHandler`]
-hook for end users to plug-in a custom strategy. The default
-implementation from Camel is
-https://github.com/apache/camel/blob/main/camel-core/src/main/java/org/apache/camel/impl/LoggingExceptionHandler.java[`LoggingExceptionHandler`]
-that will log the exception at `ERROR`/`WARN` level, and then ignore the
-exception.
-
-See the xref:components::file-component.adoc[File] page in the bottom for an
example how to
-use a custom `ExceptionHandler` that sends a new message to the Camel
-routing engine, which then allows the routing engine to trigger its own
-error handling to deal with the exception.
diff --git
a/docs/user-manual/modules/faq/pages/why-does-useoriginalmessage-with-error-handler-not-work-as-expected.adoc
b/docs/user-manual/modules/faq/pages/why-does-useoriginalmessage-with-error-handler-not-work-as-expected.adoc
deleted file mode 100644
index aee6cc4232ca..000000000000
---
a/docs/user-manual/modules/faq/pages/why-does-useoriginalmessage-with-error-handler-not-work-as-expected.adoc
+++ /dev/null
@@ -1,15 +0,0 @@
-= Why does useOriginalMessage with error handler not work as expected?
-
-If you use the xref:ROOT:exception-clause.adoc[useOriginalMessage] option
-from the Camel xref:ROOT:exception-clause.adoc[Error Handler] then it matters
-if you use this with
xref:components:eips:enterprise-integration-patterns.adoc[EIP]s such as:
-
-* xref:components:eips:recipientList-eip.adoc[Recipient List]
-* xref:components:eips:split-eip.adoc[Splitter]
-* xref:components:eips:multicast-eip.adoc[Multicast]
-
-Then the option `shareUnitOfWork` on these
xref:components:eips:enterprise-integration-patterns.adoc[EIP]s
-influence the message in use by the `useOriginalMessage` option.
-
-See more details at xref:components:eips:split-eip.adoc[Splitter] and further
below with
-the examples explaining this in more detail.
diff --git
a/docs/user-manual/modules/faq/pages/why-is-the-exception-null-when-i-use-onexception.adoc
b/docs/user-manual/modules/faq/pages/why-is-the-exception-null-when-i-use-onexception.adoc
deleted file mode 100644
index c15df27bc653..000000000000
---
a/docs/user-manual/modules/faq/pages/why-is-the-exception-null-when-i-use-onexception.adoc
+++ /dev/null
@@ -1,36 +0,0 @@
-= Why is the exception null when I use onException?
-
-If you use `onException` to handle exceptions, such as shown below:
-
-[source,java]
-----
-.onException(Exception.class).handled(true)
- .process(new Processor() {
- @Override
- public void process(Exchange exchange) throws Exception {
- Exception cause = exchange.getException();
- // why cause exception is null ???
- }
- })
-.end()
-----
-
-Then make notice the caused
-exception is no longer available from `exchange.getException()`, because
-the message is in the onException block.
-
-Instead you can access the caused exception from a property on the
-exchange with the key `Exchange.EXCEPTION_CAUGHT`, as shown below:
-
-[source,java]
-----
-.onException(Exception.class).handled(true)
- .process(new Processor() {
- @Override
- public void process(Exchange exchange) throws Exception {
- Exception cause = exchange.getProperty(Exchange.EXCEPTION_CAUGHT,
Exception.class);
- // we now have the caused exception
- }
- })
-.end()
-----