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-kamelets.git


The following commit(s) were added to refs/heads/main by this push:
     new d8d9667f3 chore: default data types on the counter, cron, Docling and 
Tika Kamelets (#3117) (#3303)
d8d9667f3 is described below

commit d8d9667f383601e300d3dd450c18fea298d2451a
Author: Claus Ibsen <[email protected]>
AuthorDate: Fri Nov 20 21:22:34 2026 +0100

    chore: default data types on the counter, cron, Docling and Tika Kamelets 
(#3117) (#3303)
    
    Batch 7 of #3117: a `text` default on the out side of counter-source,
    cron-source, docling-convert-action and tika-extract-text-action.
    
    - counter-source: the number is now a String instead of an Integer;
      Content-Type stays text/plain.
    - cron-source: sets Content-Type text/plain (decision D1), also when
      the message option is JSON or XML.
    - docling-convert-action: sets Content-Type text/plain, replacing the
      incoming one that was kept before, also for HTML output.
    - tika-extract-text-action: sets Content-Type text/plain, also for
      XHTML output.
    
    No in default on the Docling and Tika actions: it would read a file or
    a stream before their maxDocumentSize check.
    
    The counter, cron, docling and tika Citrus routes now record the body
    class and Content-Type, and the tests check them. The source checks
    need CAMEL-27258.
    
    
    Claude-Session: https://claude.ai/code/session_016Y4dDmBDsSWV117kccuNf9
    
    Co-authored-by: Claude Opus 5.5 <[email protected]>
---
 kamelets/counter-source.kamelet.yaml                        |  8 +++++++-
 kamelets/cron-source.kamelet.yaml                           | 10 +++++++++-
 kamelets/docling-convert-action.kamelet.yaml                |  9 ++++++++-
 kamelets/tika-extract-text-action.kamelet.yaml              |  9 ++++++++-
 .../src/main/resources/META-INF/kamelets-index.json         |  8 ++++----
 .../src/main/resources/kamelets/counter-source.kamelet.yaml |  8 +++++++-
 .../src/main/resources/kamelets/cron-source.kamelet.yaml    | 10 +++++++++-
 .../resources/kamelets/docling-convert-action.kamelet.yaml  |  9 ++++++++-
 .../kamelets/tika-extract-text-action.kamelet.yaml          |  9 ++++++++-
 .../resources/counter/counter-source-route.citrus.it.yaml   |  7 +++++++
 .../src/test/resources/counter/counter-source-route.yaml    |  2 ++
 .../test/resources/cron/cron-source-route.citrus.it.yaml    |  5 +++++
 .../src/test/resources/cron/cron-source-route.yaml          |  2 ++
 .../langchain4j-ingest/docling-convert-route.citrus.it.yaml |  5 +++++
 .../resources/langchain4j-ingest/docling-convert-route.yaml | 13 +++++++++++++
 .../tika-extract-text-route.citrus.it.yaml                  |  5 +++++
 .../langchain4j-ingest/tika-extract-text-route.yaml         | 13 +++++++++++++
 17 files changed, 120 insertions(+), 12 deletions(-)

diff --git a/kamelets/counter-source.kamelet.yaml 
b/kamelets/counter-source.kamelet.yaml
index 58ee2daf2..878fc660c 100644
--- a/kamelets/counter-source.kamelet.yaml
+++ b/kamelets/counter-source.kamelet.yaml
@@ -37,7 +37,7 @@ spec:
 
       Use it to try out a sink or an action with messages that are each 
different and easy to follow, or to make ordered test data. For the same fixed 
message every time use `timer-source`, and for a calendar schedule such as 
"every weekday at 9:00" use `cron-source`.
 
-      Output: the body is the number, as an Integer (a whole number, not 
text). The `Content-Type` header is `text/plain`.
+      Output: the body is the number, as text, such as `42`. The 
`Content-Type` header is `text/plain`.
 
       Good to know: it keeps sending until the integration is stopped, unless 
`numbers` is set. The count starts again from `start` when the integration 
restarts.
     type: object
@@ -61,11 +61,17 @@ spec:
         example: 10
   dataTypes:
     out:
+      default: text
       headers:
         Content-Type:
           title: Content Type
           description: "Always `text/plain`."
           type: string
+      types:
+        text:
+          format: "text-plain"
+          description: "The number, as text, such as `42`."
+          mediaType: text/plain
   dependencies:
     - "camel:timer"
     - "camel:kamelet"
diff --git a/kamelets/cron-source.kamelet.yaml 
b/kamelets/cron-source.kamelet.yaml
index 9c4cf8c8e..4399d21d6 100644
--- a/kamelets/cron-source.kamelet.yaml
+++ b/kamelets/cron-source.kamelet.yaml
@@ -36,7 +36,7 @@ spec:
 
       Use it to start a flow at set times, such as a report every morning or a 
clean-up every night. For a message every few seconds or minutes, 
`timer-source` is simpler, and for a message that counts up use 
`counter-source`.
 
-      Output: the body is the `message` option as text, the same on every 
message. Headers about the schedule are set too, such as `fireTime` (the time 
of this message) and `nextFireTime`.
+      Output: the body is the `message` option as text, the same on every 
message. The `Content-Type` header is `text/plain`, also when the message is 
JSON or XML. Headers about the schedule are set too, such as `fireTime` (the 
time of this message) and `nextFireTime`.
 
       Good to know: the times are in the time zone of the machine it runs on. 
It keeps sending until the integration is stopped.
     required:
@@ -57,6 +57,14 @@ spec:
   types:
     out:
       mediaType: text/plain
+  dataTypes:
+    out:
+      default: text
+      types:
+        text:
+          format: "text-plain"
+          description: "The `message` option, as text."
+          mediaType: text/plain
   dependencies:
   - "camel:quartz"
   - "camel:cron"
diff --git a/kamelets/docling-convert-action.kamelet.yaml 
b/kamelets/docling-convert-action.kamelet.yaml
index 21bf94715..ab8a2024a 100644
--- a/kamelets/docling-convert-action.kamelet.yaml
+++ b/kamelets/docling-convert-action.kamelet.yaml
@@ -39,7 +39,7 @@ spec:
 
       Input: the document, as bytes, a stream, a file or text. The header 
named in `documentIdHeader` (by default `CamelLangChain4jIngestDocumentId`) is 
the id of the document, if any; it is kept for `langchain4j-ingest-sink` 
further on.
 
-      Output: the body is the document as Markdown, as text, or as HTML or 
plain text with `operation`. The headers of the message are kept.
+      Output: the body is the document as Markdown, as text, or as HTML or 
plain text with `operation`. The `Content-Type` header is set to `text/plain`, 
also for HTML. The other headers of the message are kept.
 
       Good to know: to use a Docling Serve server, which is the usual setup, 
set both `useDoclingServe` to true and `doclingServeUrl`; otherwise it runs the 
`docling` command-line program, which must be installed on the machine of the 
integration. A server started with an API key needs `authenticationScheme` set 
to `API_KEY` and the key in `authenticationToken`. A conversion that takes 
longer than `processTimeout`, 30 seconds when it is not set, fails the message; 
the first conversion af [...]
     type: object
@@ -119,6 +119,13 @@ spec:
           title: Document ID
           description: The id of the document, such as its file name, kept for 
`langchain4j-ingest-sink`. Read from this header unless `documentIdHeader` 
names another one.
           type: string
+    out:
+      default: text
+      types:
+        text:
+          format: "text-plain"
+          description: "The document as Markdown, HTML or plain text, as 
`operation` says."
+          mediaType: text/plain
   dependencies:
     - "camel:docling"
     - "camel:kamelet"
diff --git a/kamelets/tika-extract-text-action.kamelet.yaml 
b/kamelets/tika-extract-text-action.kamelet.yaml
index fe7b5f090..d89783d72 100644
--- a/kamelets/tika-extract-text-action.kamelet.yaml
+++ b/kamelets/tika-extract-text-action.kamelet.yaml
@@ -39,7 +39,7 @@ spec:
 
       Input: the document, as bytes, a stream, a file or text. The header 
named in `documentIdHeader` (by default `CamelLangChain4jIngestDocumentId`) is 
the id of the document, if any; it is kept for `langchain4j-ingest-sink` 
further on.
 
-      Output: the body is the plain text of the document, as text in UTF-8, 
with its blocks on separate lines; with `outputFormat` set to `html` or `xml`, 
it is the document as XHTML text instead. All the headers of the message are 
removed, except the Camel ones, such as the file name headers of 
`langchain4j-ingest-file-source`.
+      Output: the body is the plain text of the document, as text in UTF-8, 
with its blocks on separate lines; with `outputFormat` set to `html` or `xml`, 
it is the document as XHTML text instead. The `Content-Type` header is set to 
`text/plain`, also for XHTML. All the other headers of the message are removed, 
except the Camel ones, such as the file name headers of 
`langchain4j-ingest-file-source`.
 
       Good to know: only HTML and plain text are read out of the box. For PDF, 
add the Tika PDF parser module (`org.apache.tika:tika-parser-pdf-module`, in 
the Tika version of your Camel) to the integration, and add the other Tika 
parser modules for other formats; without the module, a PDF gives an empty 
text, and does not fail. With `maxDocumentSize`, a larger document fails the 
message without being read.
     type: object
@@ -69,6 +69,13 @@ spec:
           title: Document ID
           description: The id of the document, such as its file name, kept for 
`langchain4j-ingest-sink`. Read from this header unless `documentIdHeader` 
names another one.
           type: string
+    out:
+      default: text
+      types:
+        text:
+          format: "text-plain"
+          description: "The text of the document, or the document as XHTML, as 
`outputFormat` says."
+          mediaType: text/plain
   dependencies:
     - "camel:tika"
     - "camel:kamelet"
diff --git 
a/library/camel-kamelets/src/main/resources/META-INF/kamelets-index.json 
b/library/camel-kamelets/src/main/resources/META-INF/kamelets-index.json
index d1c58f662..33c209bbb 100644
--- a/library/camel-kamelets/src/main/resources/META-INF/kamelets-index.json
+++ b/library/camel-kamelets/src/main/resources/META-INF/kamelets-index.json
@@ -565,7 +565,7 @@
     "supportLevel" : "Stable",
     "title" : "Counter Source",
     "summary" : "Sends a message with a number that counts up by one, such as 
1, 2, 3, at a regular interval.",
-    "description" : "Sends a message with a number that counts up by one, such 
as 1, 2, 3, at a regular interval.\n\nUse it to try out a sink or an action 
with messages that are each different and easy to follow, or to make ordered 
test data. For the same fixed message every time use `timer-source`, and for a 
calendar schedule such as \"every weekday at 9:00\" use 
`cron-source`.\n\nOutput: the body is the number, as an Integer (a whole 
number, not text). The `Content-Type` header is `tex [...]
+    "description" : "Sends a message with a number that counts up by one, such 
as 1, 2, 3, at a regular interval.\n\nUse it to try out a sink or an action 
with messages that are each different and easy to follow, or to make ordered 
test data. For the same fixed message every time use `timer-source`, and for a 
calendar schedule such as \"every weekday at 9:00\" use 
`cron-source`.\n\nOutput: the body is the number, as text, such as `42`. The 
`Content-Type` header is `text/plain`.\n\nGood t [...]
     "group" : "Timer",
     "namespace" : "Scheduling",
     "provider" : "Apache Software Foundation"
@@ -575,7 +575,7 @@
     "supportLevel" : "Stable",
     "title" : "Cron Source",
     "summary" : "Sends the same fixed message on a calendar schedule, written 
as a cron expression, such as every weekday at 9:00.",
-    "description" : "Sends the same fixed message on a calendar schedule, 
written as a cron expression, such as every weekday at 9:00.\n\nUse it to start 
a flow at set times, such as a report every morning or a clean-up every night. 
For a message every few seconds or minutes, `timer-source` is simpler, and for 
a message that counts up use `counter-source`.\n\nOutput: the body is the 
`message` option as text, the same on every message. Headers about the schedule 
are set too, such as `fire [...]
+    "description" : "Sends the same fixed message on a calendar schedule, 
written as a cron expression, such as every weekday at 9:00.\n\nUse it to start 
a flow at set times, such as a report every morning or a clean-up every night. 
For a message every few seconds or minutes, `timer-source` is simpler, and for 
a message that counts up use `counter-source`.\n\nOutput: the body is the 
`message` option as text, the same on every message. The `Content-Type` header 
is `text/plain`, also when  [...]
     "group" : "Cron",
     "namespace" : "Scheduling",
     "provider" : "Apache Software Foundation"
@@ -675,7 +675,7 @@
     "supportLevel" : "Preview",
     "title" : "Docling Convert Action",
     "summary" : "Turns each document, such as a PDF, an office document or an 
HTML page, into Markdown, HTML or plain text with Docling, keeping its 
headings, lists and tables.",
-    "description" : "Turns each document, such as a PDF, an office document or 
an HTML page, into Markdown, HTML or plain text with Docling, keeping its 
headings, lists and tables.\n\nUse it to get well-structured text out of 
documents before an AI step, for example in front of `langchain4j-ingest-sink` 
to load them into a vector store. For plain text without a Docling server, use 
`tika-extract-text-action`.\n\nInput: the document, as bytes, a stream, a file 
or text. The header named in  [...]
+    "description" : "Turns each document, such as a PDF, an office document or 
an HTML page, into Markdown, HTML or plain text with Docling, keeping its 
headings, lists and tables.\n\nUse it to get well-structured text out of 
documents before an AI step, for example in front of `langchain4j-ingest-sink` 
to load them into a vector store. For plain text without a Docling server, use 
`tika-extract-text-action`.\n\nInput: the document, as bytes, a stream, a file 
or text. The header named in  [...]
     "group" : "Actions",
     "namespace" : "AI",
     "provider" : "Apache Software Foundation"
@@ -2125,7 +2125,7 @@
     "supportLevel" : "Preview",
     "title" : "Tika Extract Text Action",
     "summary" : "Turns each document, such as an HTML page, a text file or a 
PDF, into its plain text, or into XHTML, with Apache Tika, inside the 
integration.",
-    "description" : "Turns each document, such as an HTML page, a text file or 
a PDF, into its plain text, or into XHTML, with Apache Tika, inside the 
integration.\n\nUse it to get the text of documents before searching, indexing 
or summarising them, for example in front of `langchain4j-ingest-sink` to load 
documents into a vector store for an AI assistant. For a richer conversion to 
Markdown that keeps headings and tables, use `docling-convert-action`, which 
needs a Docling server.\n\nI [...]
+    "description" : "Turns each document, such as an HTML page, a text file or 
a PDF, into its plain text, or into XHTML, with Apache Tika, inside the 
integration.\n\nUse it to get the text of documents before searching, indexing 
or summarising them, for example in front of `langchain4j-ingest-sink` to load 
documents into a vector store for an AI assistant. For a richer conversion to 
Markdown that keeps headings and tables, use `docling-convert-action`, which 
needs a Docling server.\n\nI [...]
     "group" : "Actions",
     "namespace" : "AI",
     "provider" : "Apache Software Foundation"
diff --git 
a/library/camel-kamelets/src/main/resources/kamelets/counter-source.kamelet.yaml
 
b/library/camel-kamelets/src/main/resources/kamelets/counter-source.kamelet.yaml
index 58ee2daf2..878fc660c 100644
--- 
a/library/camel-kamelets/src/main/resources/kamelets/counter-source.kamelet.yaml
+++ 
b/library/camel-kamelets/src/main/resources/kamelets/counter-source.kamelet.yaml
@@ -37,7 +37,7 @@ spec:
 
       Use it to try out a sink or an action with messages that are each 
different and easy to follow, or to make ordered test data. For the same fixed 
message every time use `timer-source`, and for a calendar schedule such as 
"every weekday at 9:00" use `cron-source`.
 
-      Output: the body is the number, as an Integer (a whole number, not 
text). The `Content-Type` header is `text/plain`.
+      Output: the body is the number, as text, such as `42`. The 
`Content-Type` header is `text/plain`.
 
       Good to know: it keeps sending until the integration is stopped, unless 
`numbers` is set. The count starts again from `start` when the integration 
restarts.
     type: object
@@ -61,11 +61,17 @@ spec:
         example: 10
   dataTypes:
     out:
+      default: text
       headers:
         Content-Type:
           title: Content Type
           description: "Always `text/plain`."
           type: string
+      types:
+        text:
+          format: "text-plain"
+          description: "The number, as text, such as `42`."
+          mediaType: text/plain
   dependencies:
     - "camel:timer"
     - "camel:kamelet"
diff --git 
a/library/camel-kamelets/src/main/resources/kamelets/cron-source.kamelet.yaml 
b/library/camel-kamelets/src/main/resources/kamelets/cron-source.kamelet.yaml
index 9c4cf8c8e..4399d21d6 100644
--- 
a/library/camel-kamelets/src/main/resources/kamelets/cron-source.kamelet.yaml
+++ 
b/library/camel-kamelets/src/main/resources/kamelets/cron-source.kamelet.yaml
@@ -36,7 +36,7 @@ spec:
 
       Use it to start a flow at set times, such as a report every morning or a 
clean-up every night. For a message every few seconds or minutes, 
`timer-source` is simpler, and for a message that counts up use 
`counter-source`.
 
-      Output: the body is the `message` option as text, the same on every 
message. Headers about the schedule are set too, such as `fireTime` (the time 
of this message) and `nextFireTime`.
+      Output: the body is the `message` option as text, the same on every 
message. The `Content-Type` header is `text/plain`, also when the message is 
JSON or XML. Headers about the schedule are set too, such as `fireTime` (the 
time of this message) and `nextFireTime`.
 
       Good to know: the times are in the time zone of the machine it runs on. 
It keeps sending until the integration is stopped.
     required:
@@ -57,6 +57,14 @@ spec:
   types:
     out:
       mediaType: text/plain
+  dataTypes:
+    out:
+      default: text
+      types:
+        text:
+          format: "text-plain"
+          description: "The `message` option, as text."
+          mediaType: text/plain
   dependencies:
   - "camel:quartz"
   - "camel:cron"
diff --git 
a/library/camel-kamelets/src/main/resources/kamelets/docling-convert-action.kamelet.yaml
 
b/library/camel-kamelets/src/main/resources/kamelets/docling-convert-action.kamelet.yaml
index 21bf94715..ab8a2024a 100644
--- 
a/library/camel-kamelets/src/main/resources/kamelets/docling-convert-action.kamelet.yaml
+++ 
b/library/camel-kamelets/src/main/resources/kamelets/docling-convert-action.kamelet.yaml
@@ -39,7 +39,7 @@ spec:
 
       Input: the document, as bytes, a stream, a file or text. The header 
named in `documentIdHeader` (by default `CamelLangChain4jIngestDocumentId`) is 
the id of the document, if any; it is kept for `langchain4j-ingest-sink` 
further on.
 
-      Output: the body is the document as Markdown, as text, or as HTML or 
plain text with `operation`. The headers of the message are kept.
+      Output: the body is the document as Markdown, as text, or as HTML or 
plain text with `operation`. The `Content-Type` header is set to `text/plain`, 
also for HTML. The other headers of the message are kept.
 
       Good to know: to use a Docling Serve server, which is the usual setup, 
set both `useDoclingServe` to true and `doclingServeUrl`; otherwise it runs the 
`docling` command-line program, which must be installed on the machine of the 
integration. A server started with an API key needs `authenticationScheme` set 
to `API_KEY` and the key in `authenticationToken`. A conversion that takes 
longer than `processTimeout`, 30 seconds when it is not set, fails the message; 
the first conversion af [...]
     type: object
@@ -119,6 +119,13 @@ spec:
           title: Document ID
           description: The id of the document, such as its file name, kept for 
`langchain4j-ingest-sink`. Read from this header unless `documentIdHeader` 
names another one.
           type: string
+    out:
+      default: text
+      types:
+        text:
+          format: "text-plain"
+          description: "The document as Markdown, HTML or plain text, as 
`operation` says."
+          mediaType: text/plain
   dependencies:
     - "camel:docling"
     - "camel:kamelet"
diff --git 
a/library/camel-kamelets/src/main/resources/kamelets/tika-extract-text-action.kamelet.yaml
 
b/library/camel-kamelets/src/main/resources/kamelets/tika-extract-text-action.kamelet.yaml
index fe7b5f090..d89783d72 100644
--- 
a/library/camel-kamelets/src/main/resources/kamelets/tika-extract-text-action.kamelet.yaml
+++ 
b/library/camel-kamelets/src/main/resources/kamelets/tika-extract-text-action.kamelet.yaml
@@ -39,7 +39,7 @@ spec:
 
       Input: the document, as bytes, a stream, a file or text. The header 
named in `documentIdHeader` (by default `CamelLangChain4jIngestDocumentId`) is 
the id of the document, if any; it is kept for `langchain4j-ingest-sink` 
further on.
 
-      Output: the body is the plain text of the document, as text in UTF-8, 
with its blocks on separate lines; with `outputFormat` set to `html` or `xml`, 
it is the document as XHTML text instead. All the headers of the message are 
removed, except the Camel ones, such as the file name headers of 
`langchain4j-ingest-file-source`.
+      Output: the body is the plain text of the document, as text in UTF-8, 
with its blocks on separate lines; with `outputFormat` set to `html` or `xml`, 
it is the document as XHTML text instead. The `Content-Type` header is set to 
`text/plain`, also for XHTML. All the other headers of the message are removed, 
except the Camel ones, such as the file name headers of 
`langchain4j-ingest-file-source`.
 
       Good to know: only HTML and plain text are read out of the box. For PDF, 
add the Tika PDF parser module (`org.apache.tika:tika-parser-pdf-module`, in 
the Tika version of your Camel) to the integration, and add the other Tika 
parser modules for other formats; without the module, a PDF gives an empty 
text, and does not fail. With `maxDocumentSize`, a larger document fails the 
message without being read.
     type: object
@@ -69,6 +69,13 @@ spec:
           title: Document ID
           description: The id of the document, such as its file name, kept for 
`langchain4j-ingest-sink`. Read from this header unless `documentIdHeader` 
names another one.
           type: string
+    out:
+      default: text
+      types:
+        text:
+          format: "text-plain"
+          description: "The text of the document, or the document as XHTML, as 
`outputFormat` says."
+          mediaType: text/plain
   dependencies:
     - "camel:tika"
     - "camel:kamelet"
diff --git 
a/tests/camel-kamelets-itest/src/test/resources/counter/counter-source-route.citrus.it.yaml
 
b/tests/camel-kamelets-itest/src/test/resources/counter/counter-source-route.citrus.it.yaml
index b8e2d53f9..b1e29c9a0 100644
--- 
a/tests/camel-kamelets-itest/src/test/resources/counter/counter-source-route.citrus.it.yaml
+++ 
b/tests/camel-kamelets-itest/src/test/resources/counter/counter-source-route.citrus.it.yaml
@@ -31,3 +31,10 @@ actions:
         verify:
           integration: "counter-source-route"
           logMessage: "777777"
+
+  # The number arrives as text
+  - camel:
+      cli:
+        verify:
+          integration: "counter-source-route"
+          logMessage: "counter-source X-Body-Type=java.lang.String 
X-Content-Type=ct=text/plain"
diff --git 
a/tests/camel-kamelets-itest/src/test/resources/counter/counter-source-route.yaml
 
b/tests/camel-kamelets-itest/src/test/resources/counter/counter-source-route.yaml
index 258264a98..055ff6c32 100644
--- 
a/tests/camel-kamelets-itest/src/test/resources/counter/counter-source-route.yaml
+++ 
b/tests/camel-kamelets-itest/src/test/resources/counter/counter-source-route.yaml
@@ -23,6 +23,8 @@
         start: 777777
         numbers: 1
       steps:
+        # the class and Content-Type of the body that the source hands on
+        - log: "counter-source X-Body-Type=${body.getClass().getName()} 
X-Content-Type=ct=${header.Content-Type}"
         - to:
             uri: "kamelet:log-sink"
             parameters:
diff --git 
a/tests/camel-kamelets-itest/src/test/resources/cron/cron-source-route.citrus.it.yaml
 
b/tests/camel-kamelets-itest/src/test/resources/cron/cron-source-route.citrus.it.yaml
index f4979534d..645759643 100644
--- 
a/tests/camel-kamelets-itest/src/test/resources/cron/cron-source-route.citrus.it.yaml
+++ 
b/tests/camel-kamelets-itest/src/test/resources/cron/cron-source-route.citrus.it.yaml
@@ -28,3 +28,8 @@ actions:
         verify:
           integration: "cron-source-route"
           logMessage: "cron-test-12345"
+  - camel:
+      cli:
+        verify:
+          integration: "cron-source-route"
+          logMessage: "cron-source X-Body-Type=java.lang.String 
X-Content-Type=ct=text/plain"
diff --git 
a/tests/camel-kamelets-itest/src/test/resources/cron/cron-source-route.yaml 
b/tests/camel-kamelets-itest/src/test/resources/cron/cron-source-route.yaml
index 482d9b2b6..d41bf6243 100644
--- a/tests/camel-kamelets-itest/src/test/resources/cron/cron-source-route.yaml
+++ b/tests/camel-kamelets-itest/src/test/resources/cron/cron-source-route.yaml
@@ -22,6 +22,8 @@
         schedule: "0/1 * * * * ?"
         message: "cron-test-12345"
       steps:
+      # the class and Content-Type of the body that the source hands on
+      - log: "cron-source X-Body-Type=${body.getClass().getName()} 
X-Content-Type=ct=${header.Content-Type}"
       - to:
           uri: "kamelet:log-sink"
           parameters:
diff --git 
a/tests/camel-kamelets-itest/src/test/resources/langchain4j-ingest/docling-convert-route.citrus.it.yaml
 
b/tests/camel-kamelets-itest/src/test/resources/langchain4j-ingest/docling-convert-route.citrus.it.yaml
index e44dbfb91..a01229f3f 100644
--- 
a/tests/camel-kamelets-itest/src/test/resources/langchain4j-ingest/docling-convert-route.citrus.it.yaml
+++ 
b/tests/camel-kamelets-itest/src/test/resources/langchain4j-ingest/docling-convert-route.citrus.it.yaml
@@ -77,6 +77,11 @@ actions:
         POST:
           path: "/result/docling"
           type: "plaintext"
+          headers:
+            - name: "X-Body-Type"
+              value: "java.lang.String"
+            - name: "X-Content-Type"
+              value: "ct=text/plain"
           body:
             data: "@contains('documentId=scan.pdf, segmentsWritten=1, 
outcome=INGESTED')@"
 
diff --git 
a/tests/camel-kamelets-itest/src/test/resources/langchain4j-ingest/docling-convert-route.yaml
 
b/tests/camel-kamelets-itest/src/test/resources/langchain4j-ingest/docling-convert-route.yaml
index bd99c155b..6a6289e65 100644
--- 
a/tests/camel-kamelets-itest/src/test/resources/langchain4j-ingest/docling-convert-route.yaml
+++ 
b/tests/camel-kamelets-itest/src/test/resources/langchain4j-ingest/docling-convert-route.yaml
@@ -54,8 +54,21 @@
             name: "CamelLangChain4jIngestDocumentId"
             constant: "scan.pdf"
         - to: 
"kamelet:docling-convert-action?useDoclingServe=true&doclingServeUrl={{docling.serve.url}}"
+        # the class and Content-Type of the body that the action gives, 
reported below
+        - setVariable:
+            name: bodyType
+            simple: "${body.getClass().getName()}"
+        - setVariable:
+            name: contentType
+            simple: "ct=${header.Content-Type}"
         - to: 
"kamelet:langchain4j-ingest-sink?embeddingStore=#bean:store&embeddingModel=#bean:model"
         - log: "INGEST ${body}"
         - convertBodyTo:
             type: "java.lang.String"
+        - setHeader:
+            name: "X-Body-Type"
+            simple: "${variable.bodyType}"
+        - setHeader:
+            name: "X-Content-Type"
+            simple: "${variable.contentType}"
         - to: "{{report.url}}"
diff --git 
a/tests/camel-kamelets-itest/src/test/resources/langchain4j-ingest/tika-extract-text-route.citrus.it.yaml
 
b/tests/camel-kamelets-itest/src/test/resources/langchain4j-ingest/tika-extract-text-route.citrus.it.yaml
index a68d554d7..66d8bc241 100644
--- 
a/tests/camel-kamelets-itest/src/test/resources/langchain4j-ingest/tika-extract-text-route.citrus.it.yaml
+++ 
b/tests/camel-kamelets-itest/src/test/resources/langchain4j-ingest/tika-extract-text-route.citrus.it.yaml
@@ -50,6 +50,11 @@ actions:
         POST:
           path: "/result/tika"
           type: "plaintext"
+          headers:
+            - name: "X-Body-Type"
+              value: "java.lang.String"
+            - name: "X-Content-Type"
+              value: "ct=text/plain"
           body:
             data: "@contains('documentId=notice.html, segmentsWritten=1, 
outcome=INGESTED')@"
 
diff --git 
a/tests/camel-kamelets-itest/src/test/resources/langchain4j-ingest/tika-extract-text-route.yaml
 
b/tests/camel-kamelets-itest/src/test/resources/langchain4j-ingest/tika-extract-text-route.yaml
index d75aa182a..28816f755 100644
--- 
a/tests/camel-kamelets-itest/src/test/resources/langchain4j-ingest/tika-extract-text-route.yaml
+++ 
b/tests/camel-kamelets-itest/src/test/resources/langchain4j-ingest/tika-extract-text-route.yaml
@@ -53,8 +53,21 @@
             name: "CamelLangChain4jIngestDocumentId"
             constant: "notice.html"
         - to: "kamelet:tika-extract-text-action"
+        # the class and Content-Type of the body that the action gives, 
reported below
+        - setVariable:
+            name: bodyType
+            simple: "${body.getClass().getName()}"
+        - setVariable:
+            name: contentType
+            simple: "ct=${header.Content-Type}"
         - to: 
"kamelet:langchain4j-ingest-sink?embeddingStore=#bean:store&embeddingModel=#bean:model"
         - log: "INGEST ${body}"
         - convertBodyTo:
             type: "java.lang.String"
+        - setHeader:
+            name: "X-Body-Type"
+            simple: "${variable.bodyType}"
+        - setHeader:
+            name: "X-Content-Type"
+            simple: "${variable.contentType}"
         - to: "{{report.url}}"

Reply via email to