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 9a45b3e8ca7e CAMEL-27759: camel-alibaba - correct the body types and
texts of kms, fc, eventbridge and sms (#31147)
9a45b3e8ca7e is described below
commit 9a45b3e8ca7e0e2c5c10f4fb458ed1551dc13bed
Author: Saravanakumar Selvaraj <[email protected]>
AuthorDate: Tue Dec 1 06:20:41 2026 +0000
CAMEL-27759: camel-alibaba - correct the body types and texts of kms, fc,
eventbridge and sms (#31147)
Some body type texts, a header text, two doc sections and a guide entry did
not match the producers.
- kms: decrypt now lists bytes, a stream and a file too, as the producer
reads the body as text. The body type now
depends on the plaintext and ciphertextBlob options. So it is not known
for a step that sets one of them. With
plaintext, encrypt does not read the body, and with ciphertextBlob,
decrypt does not.
- kms: the texts name the exchange property and the keys that every
response Map holds. The header text says that a
Map or a POJO in the plaintext header fails every operation. The doc
section gives the rules of the body and of
the header one by one, as they differ.
- kms: the 4.24 upgrade guide entry of CAMEL-27035 said that the header
takes every java.time value. It now names
the values that the producer reads as before, and says that a ZoneId or a
MonthDay fails.
- kms and fc: the texts say that a body fails when it does not convert to
bytes. A Map or a POJO is an example of
such a body, not the rule.
- fc: the text says that getFunction sets the CamelAlibabaFcStatusCode
header too. It says that the Map of
getFunction holds no status code.
- eventbridge: the text says that the producer reads a POJO that converts
to bytes as JSON text. It names the
exchange properties, and Gson as the serializer of the data of a Map body.
- sms: the text says that sendSms takes the external transaction ID too,
and reads the exchange properties of the
same names.
No producer changes its behavior. The body types of kms change in the
catalog, which tools such as the YAML validator
read. The builds regenerated the component JSON files and their catalog
copies. They also regenerated the catalog
copies of the two doc pages and the Endpoint DSL of kms.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
.../catalog/components/alibaba-eventbridge.json | 2 +-
.../camel/catalog/components/alibaba-fc.json | 4 ++--
.../camel/catalog/components/alibaba-kms.json | 6 ++---
.../camel/catalog/components/alibaba-sms.json | 2 +-
.../camel/catalog/docs/alibaba-fc-component.adoc | 6 ++---
.../camel/catalog/docs/alibaba-kms-component.adoc | 22 ++++++++++-------
.../alibaba/eventbridge/alibaba-eventbridge.json | 2 +-
.../eventbridge/AlibabaEventBridgeEndpoint.java | 14 ++++++-----
.../camel/component/alibaba/fc/alibaba-fc.json | 4 ++--
.../src/main/docs/alibaba-fc-component.adoc | 6 ++---
.../camel/component/alibaba/fc/FCEndpoint.java | 13 +++++-----
.../camel/component/alibaba/kms/alibaba-kms.json | 6 ++---
.../src/main/docs/alibaba-kms-component.adoc | 22 ++++++++++-------
.../camel/component/alibaba/kms/KMSEndpoint.java | 28 ++++++++++++----------
.../alibaba/kms/constants/KMSHeaders.java | 5 ++--
.../camel/component/alibaba/sms/alibaba-sms.json | 2 +-
.../camel/component/alibaba/sms/SMSEndpoint.java | 7 +++---
.../ROOT/pages/camel-4x-upgrade-guide-4_24.adoc | 5 ++--
.../endpoint/dsl/KMSEndpointBuilderFactory.java | 6 +++--
19 files changed, 93 insertions(+), 69 deletions(-)
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/alibaba-eventbridge.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/alibaba-eventbridge.json
index 01436e11bddc..1087a399529d 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/alibaba-eventbridge.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/alibaba-eventbridge.json
@@ -43,7 +43,7 @@
"CamelAlibabaEventBridgeRequestId": { "index": 10, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "String", "deprecated": false, "autowired": false, "secret": false,
"description": "The request ID that EventBridge returns in the response to the
operation. The producer sets it, unless the exchange fails.", "constantName":
"org.apache.camel.component.alibaba.eventbridge.constants.AlibabaEventBridgeHeaders#REQUEST_ID"
}
},
"bodyTypes": {
- "producerIn": { "carriers": [ "text", "bytes", "stream", "file", "map",
"list", "pojo" ], "description": "The event to publish: the JSON text of the
data of the event, as text, or as bytes, a stream or a file read in the charset
of the exchange (UTF-8 by default), with the source, the type and the bus from
the options or headers; a Map of the event fields, such as eventSource,
eventType and eventData, where a Map or a POJO as data is serialized to JSON; a
CloudEvent of the Alibaba SD [...]
+ "producerIn": { "carriers": [ "text", "bytes", "stream", "file", "map",
"list", "pojo" ], "description": "The event to publish: the JSON text of the
data of the event, as text, or as bytes, a stream, a file or a POJO that
converts to bytes, such as a ByteBuffer, read in the charset of the exchange
(UTF-8 by default), with the source, the type and the bus from the options,
headers or exchange properties; a Map of the event fields, such as eventSource,
eventType and eventData, where a [...]
"producerOut": { "carriers": [ "map" ], "javaType": "java.util.Map",
"description": "A Map with the requestId, the failedEntryCount, the
resourceOwnerAccountId and the entryList of the response, with the request id
in the CamelAlibabaEventBridgeRequestId header too. An event that EventBridge
rejects does not fail the exchange: check failedEntryCount" }
},
"properties": {
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/alibaba-fc.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/alibaba-fc.json
index 3d2402aa9977..68fa72c329be 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/alibaba-fc.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/alibaba-fc.json
@@ -39,8 +39,8 @@
"CamelAlibabaFcFunctionError": { "index": 6, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "String", "deprecated": false, "autowired": false, "secret": false,
"description": "The error type that Function Compute returns with the status
200 for a function error, such as UnhandledInvocationError. The producer sets
it for invokeFunction, or removes it if the response has none, unless the
exchange fails. Such a function erro [...]
},
"bodyTypes": {
- "producerIn": { "carriers": [ "any" ], "byOption": [ { "option":
"operation", "value": "invokeFunction", "carriers": [ "text", "bytes",
"stream", "file", "null" ] } ], "description": "invokeFunction sends the body
as the payload of the function: text in UTF-8, bytes as they are, a stream or a
file as its bytes, so binary data is kept, and no body as an empty payload. A
Map or a POJO fails, as it does not convert to bytes, so marshal it first.
getFunction does not use the body" },
- "producerOut": { "carriers": [ "map" ], "javaType": "java.util.Map",
"description": "A Map: for invokeFunction the statusCode, the headers and the
body of the response, which holds the payload the function returns as bytes,
with the status code in the CamelAlibabaFcStatusCode header too; for
getFunction the fields of the function, such as functionName, runtime and
handler" }
+ "producerIn": { "carriers": [ "any" ], "byOption": [ { "option":
"operation", "value": "invokeFunction", "carriers": [ "text", "bytes",
"stream", "file", "null" ] } ], "description": "invokeFunction sends the body
as the payload of the function: text in UTF-8, bytes as they are, a stream or a
file as its bytes, so binary data is kept, and no body as an empty payload. A
body that does not convert to bytes, such as a Map or a POJO, fails, so marshal
it first. getFunction does not use t [...]
+ "producerOut": { "carriers": [ "map" ], "javaType": "java.util.Map",
"description": "A Map: for invokeFunction the statusCode, the headers and the
body of the response, which holds the payload the function returns as bytes;
for getFunction the fields of the function, such as functionName, runtime and
handler. The status code of both operations is in the CamelAlibabaFcStatusCode
header, and not in the Map of getFunction" }
},
"properties": {
"operation": { "index": 0, "kind": "path", "displayName": "Operation",
"group": "producer", "label": "producer", "required": true, "type": "enum",
"javaType": "java.lang.String", "enum": [ "invokeFunction", "getFunction" ],
"deprecated": false, "autowired": false, "secret": false, "description": "The
operation that the producer performs. The CamelAlibabaFcOperation header
replaces this option for a request that the producer sends. If that header is
not set, an exchange property of th [...]
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/alibaba-kms.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/alibaba-kms.json
index 1fe1e8a4c731..d4b9a47bc408 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/alibaba-kms.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/alibaba-kms.json
@@ -32,15 +32,15 @@
"headers": {
"CamelAlibabaKmsOperation": { "index": 0, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"String", "enum": [ "encrypt", "decrypt", "generateDataKey" ], "deprecated":
false, "autowired": false, "secret": false, "description": "The operation that
the producer performs, which replaces the operation of the endpoint. If this
header is not set, an exchange property of the same name replaces it.",
"constantName": "org.apache.cam [...]
"CamelAlibabaKmsKeyId": { "index": 1, "kind": "header", "displayName": "",
"group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "The ID, alias or ARN of the KMS key for encrypt and
generateDataKey. This header replaces the keyId option. If this header is not
set, an exchange property of the same name replaces the keyId option.",
"constantName": "org.apache.camel.component.alibaba.km [...]
- "CamelAlibabaKmsPlaintext": { "index": 2, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "The plaintext for encrypt. The producer encodes it in UTF-8 and
sends it to KMS in Base64. This header replaces the plaintext option. If this
header is not set, an exchange property of the same name replaces the plaintext
option. A Map or a POJO fails, [...]
+ "CamelAlibabaKmsPlaintext": { "index": 2, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "The plaintext for encrypt. The producer encodes it in UTF-8 and
sends it to KMS in Base64. This header replaces the plaintext option. If this
header is not set, an exchange property of the same name replaces the plaintext
option. A Map or a POJO that C [...]
"CamelAlibabaKmsCiphertextBlob": { "index": 3, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "String", "deprecated": false, "autowired": false, "secret": false,
"description": "The ciphertext blob for decrypt, for example from the response
to encrypt or generateDataKey. This header replaces the ciphertextBlob option.
If this header is not set, an exchange property of the same name replaces the
ciphertextBlob option.", "c [...]
"CamelAlibabaKmsKeySpec": { "index": 4, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"String", "enum": [ "AES_256", "AES_128" ], "deprecated": false, "autowired":
false, "secret": false, "description": "The key spec of the data key for
generateDataKey. The value must be AES_256 or AES_128. KMS does not use it when
the number of bytes is set as well. This header replaces the keySpec option. If
this header is not set, an [...]
"CamelAlibabaKmsNumberOfBytes": { "index": 5, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "Integer", "deprecated": false, "autowired": false, "secret":
false, "description": "The number of bytes of the data key for generateDataKey.
The value must be from 1 to 1024. This header replaces the numberOfBytes
option. If this header is not set, an exchange property of the same name
replaces the numberOfBytes option. Only gene [...]
"CamelAlibabaKmsRequestId": { "index": 6, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "The request ID that KMS returns in the response to the
operation. The producer sets it, unless the exchange fails.", "constantName":
"org.apache.camel.component.alibaba.kms.constants.KMSHeaders#REQUEST_ID" }
},
"bodyTypes": {
- "producerIn": { "carriers": [ "any" ], "byOption": [ { "option":
"operation", "value": "encrypt", "carriers": [ "text", "bytes", "stream",
"file" ] }, { "option": "operation", "value": "decrypt", "carriers": [ "text" ]
} ], "description": "encrypt encrypts the body unless the plaintext option or
header is set: text in UTF-8, bytes as they are, and a stream or a file as its
bytes, so binary data is kept. A Map or a POJO fails, as it does not convert to
bytes, so marshal it first. decr [...]
- "producerOut": { "carriers": [ "map" ], "javaType": "java.util.Map",
"description": "A Map with the statusCode and the fields of the response: the
ciphertextBlob and keyId of encrypt, the plaintext of decrypt, which is Base64
when this component encrypted it, and the plaintext and ciphertextBlob of
generateDataKey. The request id is in the CamelAlibabaKmsRequestId header too" }
+ "producerIn": { "carriers": [ "any" ], "dependsOn": [ "plaintext",
"ciphertextBlob" ], "byOption": [ { "option": "operation", "value": "encrypt",
"carriers": [ "text", "bytes", "stream", "file" ] }, { "option": "operation",
"value": "decrypt", "carriers": [ "text", "bytes", "stream", "file" ] } ],
"description": "encrypt encrypts the body unless the plaintext option, header
or exchange property is set: text in UTF-8, bytes as they are, and a stream or
a file as its bytes, so binary d [...]
+ "producerOut": { "carriers": [ "map" ], "javaType": "java.util.Map",
"description": "A Map with the statusCode and the fields of the response: the
keyId, keyVersionId and requestId of each operation, the ciphertextBlob of
encrypt, the plaintext of decrypt, which is Base64 when this component
encrypted it, and the plaintext and ciphertextBlob of generateDataKey. The
request id is in the CamelAlibabaKmsRequestId header too" }
},
"properties": {
"operation": { "index": 0, "kind": "path", "displayName": "Operation",
"group": "producer", "label": "producer", "required": true, "type": "enum",
"javaType": "java.lang.String", "enum": [ "encrypt", "decrypt",
"generateDataKey" ], "deprecated": false, "autowired": false, "secret": false,
"description": "The operation that the producer performs. The
CamelAlibabaKmsOperation header replaces this option for a request that the
producer sends. If that header is not set, an exchange prope [...]
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/alibaba-sms.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/alibaba-sms.json
index 31ead0d1ed72..d2f62062bb7c 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/alibaba-sms.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/alibaba-sms.json
@@ -39,7 +39,7 @@
"CamelAlibabaSmsRequestId": { "index": 6, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "The request ID that Short Message Service returns in the
response to the operation. The producer sets it, unless the exchange fails.",
"constantName":
"org.apache.camel.component.alibaba.sms.constants.SMSHeaders#REQUEST_ID" }
},
"bodyTypes": {
- "producerIn": { "carriers": [ "any" ], "description": "Not used: sendSms
takes the phone numbers, sign name, template code and template parameters from
options or headers, such as CamelAlibabaSmsTemplateParam" },
+ "producerIn": { "carriers": [ "any" ], "description": "Not used: sendSms
takes the phone numbers, sign name, template code, template parameters and
external transaction ID from options, from headers such as
CamelAlibabaSmsTemplateParam, or from exchange properties of the same names" },
"producerOut": { "carriers": [ "map" ], "description": "A Map of the
response: the statusCode, and the code, message, bizId and requestId the
service returns. The producer fails the exchange with a
com.aliyun.tea.TeaException for a Code other than OK, or none" }
},
"properties": {
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/alibaba-fc-component.adoc
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/alibaba-fc-component.adoc
index 60aed42ffab8..80add8b9024e 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/alibaba-fc-component.adoc
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/alibaba-fc-component.adoc
@@ -54,9 +54,9 @@ The component supports the following operations:
=== Payload of invokeFunction
The message body is the payload of the function. A `String` is sent in UTF-8,
and a `byte[]`, an `InputStream` or a
-file is sent as its bytes, so binary data is kept. Without a body the function
is invoked with an empty payload. A `Map`
-or a POJO does not convert to bytes and fails with an
`InvalidPayloadException`, so marshal it first, for example to
-JSON with `marshal().json()`.
+file is sent as its bytes, so binary data is kept. Without a body the function
is invoked with an empty payload. A
+body that does not convert to bytes, such as a `Map` or a POJO, fails with an
`InvalidPayloadException`, so marshal it
+first, for example to JSON with `marshal().json()`.
=== Function error
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/alibaba-kms-component.adoc
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/alibaba-kms-component.adoc
index dd54685aedb9..90cec42ffee3 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/alibaba-kms-component.adoc
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/alibaba-kms-component.adoc
@@ -54,14 +54,20 @@ The component supports the following operations:
=== Plaintext of encrypt
-`encrypt` encrypts the `plaintext` option or the `CamelAlibabaKmsPlaintext`
header when one is set, else the message
-body. A `String` is encrypted in UTF-8, and a `byte[]`, an `InputStream` or a
file as its bytes, so binary data is
-kept. The component sends these bytes to KMS in Base64, so the `plaintext`
that `decrypt` returns for them is Base64:
-decode it to get the original bytes back. A `Map` or a POJO fails instead of
being encrypted as its `toString()`: in
-the body with an `InvalidPayloadException`, and in the header or in the
exchange property of the same name with an
-`IllegalArgumentException`. Marshal such a value first, for example with
`marshal().json()`. A value whose text is
-its `toString()`, such as a `UUID`, a `URI` or a `java.time` value, is
encrypted as that text. A message without a
-body fails with an `IllegalArgumentException`.
+`encrypt` encrypts the `CamelAlibabaKmsPlaintext` header, the exchange
property of the same name or the `plaintext`
+option when one is set, else the message body. The component sends the bytes
of the plaintext to KMS in Base64. So the
+`plaintext` that `decrypt` returns for them is Base64: decode it to get these
bytes back.
+
+In the body, a `String` is encrypted in UTF-8, and a `byte[]`, an
`InputStream` or a file as its bytes, so binary data
+is kept. A body that does not convert to bytes, such as a `Map`, a POJO or a
`UUID`, fails with an
+`InvalidPayloadException`. Marshal a `Map` or a POJO first, for example with
`marshal().json()`, and convert a `UUID` to
+a `String`. A message without a body fails with an `IllegalArgumentException`.
+
+In the header or the exchange property, the producer reads the value as text,
so binary data is not kept there. A `Map`
+or a POJO that Camel reads only as its `toString()` fails with an
`IllegalArgumentException`. It fails `decrypt` and
+`generateDataKey` too, as the producer reads the header and the exchange
property for every operation. A `UUID`, a
+`URI`, a `Date` and a `java.time` value that is a `Temporal` or a
`TemporalAmount`, such as an `Instant`, do not fail:
+the producer encrypts their text. A `ZoneId` or a `MonthDay` is neither, so it
fails.
=== Producer example
diff --git
a/components/camel-alibaba/camel-alibaba-eventbridge/src/generated/resources/META-INF/org/apache/camel/component/alibaba/eventbridge/alibaba-eventbridge.json
b/components/camel-alibaba/camel-alibaba-eventbridge/src/generated/resources/META-INF/org/apache/camel/component/alibaba/eventbridge/alibaba-eventbridge.json
index 01436e11bddc..1087a399529d 100644
---
a/components/camel-alibaba/camel-alibaba-eventbridge/src/generated/resources/META-INF/org/apache/camel/component/alibaba/eventbridge/alibaba-eventbridge.json
+++
b/components/camel-alibaba/camel-alibaba-eventbridge/src/generated/resources/META-INF/org/apache/camel/component/alibaba/eventbridge/alibaba-eventbridge.json
@@ -43,7 +43,7 @@
"CamelAlibabaEventBridgeRequestId": { "index": 10, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "String", "deprecated": false, "autowired": false, "secret": false,
"description": "The request ID that EventBridge returns in the response to the
operation. The producer sets it, unless the exchange fails.", "constantName":
"org.apache.camel.component.alibaba.eventbridge.constants.AlibabaEventBridgeHeaders#REQUEST_ID"
}
},
"bodyTypes": {
- "producerIn": { "carriers": [ "text", "bytes", "stream", "file", "map",
"list", "pojo" ], "description": "The event to publish: the JSON text of the
data of the event, as text, or as bytes, a stream or a file read in the charset
of the exchange (UTF-8 by default), with the source, the type and the bus from
the options or headers; a Map of the event fields, such as eventSource,
eventType and eventData, where a Map or a POJO as data is serialized to JSON; a
CloudEvent of the Alibaba SD [...]
+ "producerIn": { "carriers": [ "text", "bytes", "stream", "file", "map",
"list", "pojo" ], "description": "The event to publish: the JSON text of the
data of the event, as text, or as bytes, a stream, a file or a POJO that
converts to bytes, such as a ByteBuffer, read in the charset of the exchange
(UTF-8 by default), with the source, the type and the bus from the options,
headers or exchange properties; a Map of the event fields, such as eventSource,
eventType and eventData, where a [...]
"producerOut": { "carriers": [ "map" ], "javaType": "java.util.Map",
"description": "A Map with the requestId, the failedEntryCount, the
resourceOwnerAccountId and the entryList of the response, with the request id
in the CamelAlibabaEventBridgeRequestId header too. An event that EventBridge
rejects does not fail the exchange: check failedEntryCount" }
},
"properties": {
diff --git
a/components/camel-alibaba/camel-alibaba-eventbridge/src/main/java/org/apache/camel/component/alibaba/eventbridge/AlibabaEventBridgeEndpoint.java
b/components/camel-alibaba/camel-alibaba-eventbridge/src/main/java/org/apache/camel/component/alibaba/eventbridge/AlibabaEventBridgeEndpoint.java
index d533cdb7a623..4eeb411046c6 100644
---
a/components/camel-alibaba/camel-alibaba-eventbridge/src/main/java/org/apache/camel/component/alibaba/eventbridge/AlibabaEventBridgeEndpoint.java
+++
b/components/camel-alibaba/camel-alibaba-eventbridge/src/main/java/org/apache/camel/component/alibaba/eventbridge/AlibabaEventBridgeEndpoint.java
@@ -41,12 +41,14 @@ import org.apache.camel.support.DefaultEndpoint;
@BodyTypes(producerIn = @BodyType(value = {
Carrier.TEXT, Carrier.BYTES, Carrier.STREAM, Carrier.FILE,
Carrier.MAP, Carrier.LIST, Carrier.POJO },
description = "The event to publish: the
JSON text of the data of the event, as text, or as"
- + " bytes, a stream or a file
read in the charset of the exchange (UTF-8 by"
- + " default), with the source,
the type and the bus from the options or"
- + " headers; a Map of the
event fields, such as eventSource, eventType and"
- + " eventData, where a Map or
a POJO as data is serialized to JSON; a"
- + " CloudEvent of the Alibaba
SDK; or a List of these for a batch. Another POJO"
- + " or no body fails"),
+ + " bytes, a stream, a file or
a POJO that converts to bytes, such as a"
+ + " ByteBuffer, read in the
charset of the exchange (UTF-8 by default), with"
+ + " the source, the type and
the bus from the options, headers or exchange"
+ + " properties; a Map of the
event fields, such as eventSource, eventType and"
+ + " eventData, where a Map or
a POJO as data is serialized to JSON with Gson,"
+ + " so pass a Jackson JsonNode
as its JSON text; a CloudEvent of the Alibaba"
+ + " SDK; or a List of these
for a batch. Another collection, an array other"
+ + " than a byte[], a POJO that
does not convert to bytes, or no body fails"),
producerOut = @BodyType(value = Carrier.MAP, javaType =
"java.util.Map",
description = "A Map with the requestId,
the failedEntryCount, the resourceOwnerAccountId"
+ " and the entryList of the
response, with the request id in the"
diff --git
a/components/camel-alibaba/camel-alibaba-fc/src/generated/resources/META-INF/org/apache/camel/component/alibaba/fc/alibaba-fc.json
b/components/camel-alibaba/camel-alibaba-fc/src/generated/resources/META-INF/org/apache/camel/component/alibaba/fc/alibaba-fc.json
index 3d2402aa9977..68fa72c329be 100644
---
a/components/camel-alibaba/camel-alibaba-fc/src/generated/resources/META-INF/org/apache/camel/component/alibaba/fc/alibaba-fc.json
+++
b/components/camel-alibaba/camel-alibaba-fc/src/generated/resources/META-INF/org/apache/camel/component/alibaba/fc/alibaba-fc.json
@@ -39,8 +39,8 @@
"CamelAlibabaFcFunctionError": { "index": 6, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "String", "deprecated": false, "autowired": false, "secret": false,
"description": "The error type that Function Compute returns with the status
200 for a function error, such as UnhandledInvocationError. The producer sets
it for invokeFunction, or removes it if the response has none, unless the
exchange fails. Such a function erro [...]
},
"bodyTypes": {
- "producerIn": { "carriers": [ "any" ], "byOption": [ { "option":
"operation", "value": "invokeFunction", "carriers": [ "text", "bytes",
"stream", "file", "null" ] } ], "description": "invokeFunction sends the body
as the payload of the function: text in UTF-8, bytes as they are, a stream or a
file as its bytes, so binary data is kept, and no body as an empty payload. A
Map or a POJO fails, as it does not convert to bytes, so marshal it first.
getFunction does not use the body" },
- "producerOut": { "carriers": [ "map" ], "javaType": "java.util.Map",
"description": "A Map: for invokeFunction the statusCode, the headers and the
body of the response, which holds the payload the function returns as bytes,
with the status code in the CamelAlibabaFcStatusCode header too; for
getFunction the fields of the function, such as functionName, runtime and
handler" }
+ "producerIn": { "carriers": [ "any" ], "byOption": [ { "option":
"operation", "value": "invokeFunction", "carriers": [ "text", "bytes",
"stream", "file", "null" ] } ], "description": "invokeFunction sends the body
as the payload of the function: text in UTF-8, bytes as they are, a stream or a
file as its bytes, so binary data is kept, and no body as an empty payload. A
body that does not convert to bytes, such as a Map or a POJO, fails, so marshal
it first. getFunction does not use t [...]
+ "producerOut": { "carriers": [ "map" ], "javaType": "java.util.Map",
"description": "A Map: for invokeFunction the statusCode, the headers and the
body of the response, which holds the payload the function returns as bytes;
for getFunction the fields of the function, such as functionName, runtime and
handler. The status code of both operations is in the CamelAlibabaFcStatusCode
header, and not in the Map of getFunction" }
},
"properties": {
"operation": { "index": 0, "kind": "path", "displayName": "Operation",
"group": "producer", "label": "producer", "required": true, "type": "enum",
"javaType": "java.lang.String", "enum": [ "invokeFunction", "getFunction" ],
"deprecated": false, "autowired": false, "secret": false, "description": "The
operation that the producer performs. The CamelAlibabaFcOperation header
replaces this option for a request that the producer sends. If that header is
not set, an exchange property of th [...]
diff --git
a/components/camel-alibaba/camel-alibaba-fc/src/main/docs/alibaba-fc-component.adoc
b/components/camel-alibaba/camel-alibaba-fc/src/main/docs/alibaba-fc-component.adoc
index 60aed42ffab8..80add8b9024e 100644
---
a/components/camel-alibaba/camel-alibaba-fc/src/main/docs/alibaba-fc-component.adoc
+++
b/components/camel-alibaba/camel-alibaba-fc/src/main/docs/alibaba-fc-component.adoc
@@ -54,9 +54,9 @@ The component supports the following operations:
=== Payload of invokeFunction
The message body is the payload of the function. A `String` is sent in UTF-8,
and a `byte[]`, an `InputStream` or a
-file is sent as its bytes, so binary data is kept. Without a body the function
is invoked with an empty payload. A `Map`
-or a POJO does not convert to bytes and fails with an
`InvalidPayloadException`, so marshal it first, for example to
-JSON with `marshal().json()`.
+file is sent as its bytes, so binary data is kept. Without a body the function
is invoked with an empty payload. A
+body that does not convert to bytes, such as a `Map` or a POJO, fails with an
`InvalidPayloadException`, so marshal it
+first, for example to JSON with `marshal().json()`.
=== Function error
diff --git
a/components/camel-alibaba/camel-alibaba-fc/src/main/java/org/apache/camel/component/alibaba/fc/FCEndpoint.java
b/components/camel-alibaba/camel-alibaba-fc/src/main/java/org/apache/camel/component/alibaba/fc/FCEndpoint.java
index e5212f5d3dbd..f2a6b98cd5e3 100644
---
a/components/camel-alibaba/camel-alibaba-fc/src/main/java/org/apache/camel/component/alibaba/fc/FCEndpoint.java
+++
b/components/camel-alibaba/camel-alibaba-fc/src/main/java/org/apache/camel/component/alibaba/fc/FCEndpoint.java
@@ -45,14 +45,15 @@ import org.apache.camel.support.DefaultEndpoint;
Carrier.NULL }),
description = "invokeFunction sends the body
as the payload of the function: text in UTF-8,"
+ " bytes as they are, a
stream or a file as its bytes, so binary data is kept,"
- + " and no body as an empty
payload. A Map or a POJO fails, as it does not"
- + " convert to bytes, so
marshal it first. getFunction does not use the body"),
+ + " and no body as an empty
payload. A body that does not convert to bytes,"
+ + " such as a Map or a POJO,
fails, so marshal it first. getFunction does not"
+ + " use the body"),
producerOut = @BodyType(value = Carrier.MAP, javaType =
"java.util.Map",
description = "A Map: for invokeFunction
the statusCode, the headers and the body of the"
- + " response, which holds the
payload the function returns as bytes, with"
- + " the status code in the
CamelAlibabaFcStatusCode header too; for"
- + " getFunction the fields of
the function, such as functionName, runtime"
- + " and handler"))
+ + " response, which holds the
payload the function returns as bytes; for"
+ + " getFunction the fields of
the function, such as functionName, runtime and"
+ + " handler. The status code
of both operations is in the"
+ + " CamelAlibabaFcStatusCode
header, and not in the Map of getFunction"))
public class FCEndpoint extends DefaultEndpoint {
@UriPath(description = "The operation that the producer performs. The
CamelAlibabaFcOperation header replaces this option"
diff --git
a/components/camel-alibaba/camel-alibaba-kms/src/generated/resources/META-INF/org/apache/camel/component/alibaba/kms/alibaba-kms.json
b/components/camel-alibaba/camel-alibaba-kms/src/generated/resources/META-INF/org/apache/camel/component/alibaba/kms/alibaba-kms.json
index 1fe1e8a4c731..d4b9a47bc408 100644
---
a/components/camel-alibaba/camel-alibaba-kms/src/generated/resources/META-INF/org/apache/camel/component/alibaba/kms/alibaba-kms.json
+++
b/components/camel-alibaba/camel-alibaba-kms/src/generated/resources/META-INF/org/apache/camel/component/alibaba/kms/alibaba-kms.json
@@ -32,15 +32,15 @@
"headers": {
"CamelAlibabaKmsOperation": { "index": 0, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"String", "enum": [ "encrypt", "decrypt", "generateDataKey" ], "deprecated":
false, "autowired": false, "secret": false, "description": "The operation that
the producer performs, which replaces the operation of the endpoint. If this
header is not set, an exchange property of the same name replaces it.",
"constantName": "org.apache.cam [...]
"CamelAlibabaKmsKeyId": { "index": 1, "kind": "header", "displayName": "",
"group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "The ID, alias or ARN of the KMS key for encrypt and
generateDataKey. This header replaces the keyId option. If this header is not
set, an exchange property of the same name replaces the keyId option.",
"constantName": "org.apache.camel.component.alibaba.km [...]
- "CamelAlibabaKmsPlaintext": { "index": 2, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "The plaintext for encrypt. The producer encodes it in UTF-8 and
sends it to KMS in Base64. This header replaces the plaintext option. If this
header is not set, an exchange property of the same name replaces the plaintext
option. A Map or a POJO fails, [...]
+ "CamelAlibabaKmsPlaintext": { "index": 2, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "The plaintext for encrypt. The producer encodes it in UTF-8 and
sends it to KMS in Base64. This header replaces the plaintext option. If this
header is not set, an exchange property of the same name replaces the plaintext
option. A Map or a POJO that C [...]
"CamelAlibabaKmsCiphertextBlob": { "index": 3, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "String", "deprecated": false, "autowired": false, "secret": false,
"description": "The ciphertext blob for decrypt, for example from the response
to encrypt or generateDataKey. This header replaces the ciphertextBlob option.
If this header is not set, an exchange property of the same name replaces the
ciphertextBlob option.", "c [...]
"CamelAlibabaKmsKeySpec": { "index": 4, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"String", "enum": [ "AES_256", "AES_128" ], "deprecated": false, "autowired":
false, "secret": false, "description": "The key spec of the data key for
generateDataKey. The value must be AES_256 or AES_128. KMS does not use it when
the number of bytes is set as well. This header replaces the keySpec option. If
this header is not set, an [...]
"CamelAlibabaKmsNumberOfBytes": { "index": 5, "kind": "header",
"displayName": "", "group": "producer", "label": "producer", "required": false,
"javaType": "Integer", "deprecated": false, "autowired": false, "secret":
false, "description": "The number of bytes of the data key for generateDataKey.
The value must be from 1 to 1024. This header replaces the numberOfBytes
option. If this header is not set, an exchange property of the same name
replaces the numberOfBytes option. Only gene [...]
"CamelAlibabaKmsRequestId": { "index": 6, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "The request ID that KMS returns in the response to the
operation. The producer sets it, unless the exchange fails.", "constantName":
"org.apache.camel.component.alibaba.kms.constants.KMSHeaders#REQUEST_ID" }
},
"bodyTypes": {
- "producerIn": { "carriers": [ "any" ], "byOption": [ { "option":
"operation", "value": "encrypt", "carriers": [ "text", "bytes", "stream",
"file" ] }, { "option": "operation", "value": "decrypt", "carriers": [ "text" ]
} ], "description": "encrypt encrypts the body unless the plaintext option or
header is set: text in UTF-8, bytes as they are, and a stream or a file as its
bytes, so binary data is kept. A Map or a POJO fails, as it does not convert to
bytes, so marshal it first. decr [...]
- "producerOut": { "carriers": [ "map" ], "javaType": "java.util.Map",
"description": "A Map with the statusCode and the fields of the response: the
ciphertextBlob and keyId of encrypt, the plaintext of decrypt, which is Base64
when this component encrypted it, and the plaintext and ciphertextBlob of
generateDataKey. The request id is in the CamelAlibabaKmsRequestId header too" }
+ "producerIn": { "carriers": [ "any" ], "dependsOn": [ "plaintext",
"ciphertextBlob" ], "byOption": [ { "option": "operation", "value": "encrypt",
"carriers": [ "text", "bytes", "stream", "file" ] }, { "option": "operation",
"value": "decrypt", "carriers": [ "text", "bytes", "stream", "file" ] } ],
"description": "encrypt encrypts the body unless the plaintext option, header
or exchange property is set: text in UTF-8, bytes as they are, and a stream or
a file as its bytes, so binary d [...]
+ "producerOut": { "carriers": [ "map" ], "javaType": "java.util.Map",
"description": "A Map with the statusCode and the fields of the response: the
keyId, keyVersionId and requestId of each operation, the ciphertextBlob of
encrypt, the plaintext of decrypt, which is Base64 when this component
encrypted it, and the plaintext and ciphertextBlob of generateDataKey. The
request id is in the CamelAlibabaKmsRequestId header too" }
},
"properties": {
"operation": { "index": 0, "kind": "path", "displayName": "Operation",
"group": "producer", "label": "producer", "required": true, "type": "enum",
"javaType": "java.lang.String", "enum": [ "encrypt", "decrypt",
"generateDataKey" ], "deprecated": false, "autowired": false, "secret": false,
"description": "The operation that the producer performs. The
CamelAlibabaKmsOperation header replaces this option for a request that the
producer sends. If that header is not set, an exchange prope [...]
diff --git
a/components/camel-alibaba/camel-alibaba-kms/src/main/docs/alibaba-kms-component.adoc
b/components/camel-alibaba/camel-alibaba-kms/src/main/docs/alibaba-kms-component.adoc
index dd54685aedb9..90cec42ffee3 100644
---
a/components/camel-alibaba/camel-alibaba-kms/src/main/docs/alibaba-kms-component.adoc
+++
b/components/camel-alibaba/camel-alibaba-kms/src/main/docs/alibaba-kms-component.adoc
@@ -54,14 +54,20 @@ The component supports the following operations:
=== Plaintext of encrypt
-`encrypt` encrypts the `plaintext` option or the `CamelAlibabaKmsPlaintext`
header when one is set, else the message
-body. A `String` is encrypted in UTF-8, and a `byte[]`, an `InputStream` or a
file as its bytes, so binary data is
-kept. The component sends these bytes to KMS in Base64, so the `plaintext`
that `decrypt` returns for them is Base64:
-decode it to get the original bytes back. A `Map` or a POJO fails instead of
being encrypted as its `toString()`: in
-the body with an `InvalidPayloadException`, and in the header or in the
exchange property of the same name with an
-`IllegalArgumentException`. Marshal such a value first, for example with
`marshal().json()`. A value whose text is
-its `toString()`, such as a `UUID`, a `URI` or a `java.time` value, is
encrypted as that text. A message without a
-body fails with an `IllegalArgumentException`.
+`encrypt` encrypts the `CamelAlibabaKmsPlaintext` header, the exchange
property of the same name or the `plaintext`
+option when one is set, else the message body. The component sends the bytes
of the plaintext to KMS in Base64. So the
+`plaintext` that `decrypt` returns for them is Base64: decode it to get these
bytes back.
+
+In the body, a `String` is encrypted in UTF-8, and a `byte[]`, an
`InputStream` or a file as its bytes, so binary data
+is kept. A body that does not convert to bytes, such as a `Map`, a POJO or a
`UUID`, fails with an
+`InvalidPayloadException`. Marshal a `Map` or a POJO first, for example with
`marshal().json()`, and convert a `UUID` to
+a `String`. A message without a body fails with an `IllegalArgumentException`.
+
+In the header or the exchange property, the producer reads the value as text,
so binary data is not kept there. A `Map`
+or a POJO that Camel reads only as its `toString()` fails with an
`IllegalArgumentException`. It fails `decrypt` and
+`generateDataKey` too, as the producer reads the header and the exchange
property for every operation. A `UUID`, a
+`URI`, a `Date` and a `java.time` value that is a `Temporal` or a
`TemporalAmount`, such as an `Instant`, do not fail:
+the producer encrypts their text. A `ZoneId` or a `MonthDay` is neither, so it
fails.
=== Producer example
diff --git
a/components/camel-alibaba/camel-alibaba-kms/src/main/java/org/apache/camel/component/alibaba/kms/KMSEndpoint.java
b/components/camel-alibaba/camel-alibaba-kms/src/main/java/org/apache/camel/component/alibaba/kms/KMSEndpoint.java
index 8015af5d3775..b02f1b6c2887 100644
---
a/components/camel-alibaba/camel-alibaba-kms/src/main/java/org/apache/camel/component/alibaba/kms/KMSEndpoint.java
+++
b/components/camel-alibaba/camel-alibaba-kms/src/main/java/org/apache/camel/component/alibaba/kms/KMSEndpoint.java
@@ -39,23 +39,27 @@ import org.apache.camel.support.DefaultEndpoint;
syntax = "alibaba-kms:operation", category = { Category.CLOUD },
headersClass = KMSHeaders.class, producerOnly = true)
@BodyTypes(producerIn = @BodyType(value = Carrier.ANY,
+ dependsOn = { "plaintext", "ciphertextBlob"
},
byOption = {
@BodyType.When(option = "operation",
value = "encrypt",
carriers = {
Carrier.TEXT,
Carrier.BYTES, Carrier.STREAM, Carrier.FILE }),
- @BodyType.When(option = "operation",
value = "decrypt", carriers = Carrier.TEXT) },
- description = "encrypt encrypts the body
unless the plaintext option or header is set: text"
- + " in UTF-8, bytes as they
are, and a stream or a file as its bytes, so binary"
- + " data is kept. A Map or a
POJO fails, as it does not convert to bytes, so"
- + " marshal it first. decrypt
takes the ciphertext blob as text, unless the"
- + " ciphertextBlob option or
header is set. No body fails both; generateDataKey"
- + " does not use the body"),
+ @BodyType.When(option = "operation",
value = "decrypt",
+ carriers = {
+ Carrier.TEXT,
Carrier.BYTES, Carrier.STREAM, Carrier.FILE }) },
+ description = "encrypt encrypts the body
unless the plaintext option, header or exchange"
+ + " property is set: text in
UTF-8, bytes as they are, and a stream or a file"
+ + " as its bytes, so binary
data is kept. A body that does not convert to"
+ + " bytes, such as a Map or a
POJO, fails, so marshal it first. decrypt reads"
+ + " the body as the text of
the ciphertext blob, unless the ciphertextBlob"
+ + " option, header or exchange
property is set. No body fails both;"
+ + " generateDataKey does not
use the body"),
producerOut = @BodyType(value = Carrier.MAP, javaType =
"java.util.Map",
- description = "A Map with the statusCode
and the fields of the response: the ciphertextBlob"
- + " and keyId of encrypt, the
plaintext of decrypt, which is Base64 when this"
- + " component encrypted it,
and the plaintext and ciphertextBlob of"
- + " generateDataKey. The
request id is in the CamelAlibabaKmsRequestId header"
- + " too"))
+ description = "A Map with the statusCode
and the fields of the response: the keyId,"
+ + " keyVersionId and
requestId of each operation, the ciphertextBlob of"
+ + " encrypt, the plaintext of
decrypt, which is Base64 when this component"
+ + " encrypted it, and the
plaintext and ciphertextBlob of generateDataKey. The"
+ + " request id is in the
CamelAlibabaKmsRequestId header too"))
public class KMSEndpoint extends DefaultEndpoint {
@UriPath(description = "The operation that the producer performs. The
CamelAlibabaKmsOperation header replaces this option"
diff --git
a/components/camel-alibaba/camel-alibaba-kms/src/main/java/org/apache/camel/component/alibaba/kms/constants/KMSHeaders.java
b/components/camel-alibaba/camel-alibaba-kms/src/main/java/org/apache/camel/component/alibaba/kms/constants/KMSHeaders.java
index 58afbce3a52b..123c91bab6fa 100644
---
a/components/camel-alibaba/camel-alibaba-kms/src/main/java/org/apache/camel/component/alibaba/kms/constants/KMSHeaders.java
+++
b/components/camel-alibaba/camel-alibaba-kms/src/main/java/org/apache/camel/component/alibaba/kms/constants/KMSHeaders.java
@@ -36,8 +36,9 @@ public final class KMSHeaders {
@Metadata(label = "producer",
description = "The plaintext for encrypt. The producer encodes
it in UTF-8 and sends it to KMS in Base64. This"
+ " header replaces the plaintext option. If this
header is not set, an exchange property of the"
- + " same name replaces the plaintext option. A Map
or a POJO fails, as it does in the message"
- + " body, since Camel reads it only as its
toString().",
+ + " same name replaces the plaintext option. A Map
or a POJO that Camel reads only as its"
+ + " toString() fails every operation, as the
producer reads this header for each one. A UUID, a"
+ + " URI, a Date and a java.time Temporal or
TemporalAmount do not fail.",
javaType = "String")
public static final String PLAINTEXT = "CamelAlibabaKmsPlaintext";
diff --git
a/components/camel-alibaba/camel-alibaba-sms/src/generated/resources/META-INF/org/apache/camel/component/alibaba/sms/alibaba-sms.json
b/components/camel-alibaba/camel-alibaba-sms/src/generated/resources/META-INF/org/apache/camel/component/alibaba/sms/alibaba-sms.json
index 31ead0d1ed72..d2f62062bb7c 100644
---
a/components/camel-alibaba/camel-alibaba-sms/src/generated/resources/META-INF/org/apache/camel/component/alibaba/sms/alibaba-sms.json
+++
b/components/camel-alibaba/camel-alibaba-sms/src/generated/resources/META-INF/org/apache/camel/component/alibaba/sms/alibaba-sms.json
@@ -39,7 +39,7 @@
"CamelAlibabaSmsRequestId": { "index": 6, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "The request ID that Short Message Service returns in the
response to the operation. The producer sets it, unless the exchange fails.",
"constantName":
"org.apache.camel.component.alibaba.sms.constants.SMSHeaders#REQUEST_ID" }
},
"bodyTypes": {
- "producerIn": { "carriers": [ "any" ], "description": "Not used: sendSms
takes the phone numbers, sign name, template code and template parameters from
options or headers, such as CamelAlibabaSmsTemplateParam" },
+ "producerIn": { "carriers": [ "any" ], "description": "Not used: sendSms
takes the phone numbers, sign name, template code, template parameters and
external transaction ID from options, from headers such as
CamelAlibabaSmsTemplateParam, or from exchange properties of the same names" },
"producerOut": { "carriers": [ "map" ], "description": "A Map of the
response: the statusCode, and the code, message, bizId and requestId the
service returns. The producer fails the exchange with a
com.aliyun.tea.TeaException for a Code other than OK, or none" }
},
"properties": {
diff --git
a/components/camel-alibaba/camel-alibaba-sms/src/main/java/org/apache/camel/component/alibaba/sms/SMSEndpoint.java
b/components/camel-alibaba/camel-alibaba-sms/src/main/java/org/apache/camel/component/alibaba/sms/SMSEndpoint.java
index 263a4200daba..fbcf9a86cdd1 100644
---
a/components/camel-alibaba/camel-alibaba-sms/src/main/java/org/apache/camel/component/alibaba/sms/SMSEndpoint.java
+++
b/components/camel-alibaba/camel-alibaba-sms/src/main/java/org/apache/camel/component/alibaba/sms/SMSEndpoint.java
@@ -39,9 +39,10 @@ import org.apache.camel.support.DefaultEndpoint;
syntax = "alibaba-sms:operation", category = { Category.CLOUD,
Category.MESSAGING },
headersClass = SMSHeaders.class, producerOnly = true)
@BodyTypes(producerIn = @BodyType(value = Carrier.ANY,
- description = "Not used: sendSms takes the
phone numbers, sign name, template code and"
- + " template parameters from
options or headers, such as"
- + "
CamelAlibabaSmsTemplateParam"),
+ description = "Not used: sendSms takes the
phone numbers, sign name, template code, template"
+ + " parameters and external
transaction ID from options, from headers such as"
+ + "
CamelAlibabaSmsTemplateParam, or from exchange properties of the same"
+ + " names"),
producerOut = @BodyType(value = Carrier.MAP,
description = "A Map of the response: the
statusCode, and the code, message, bizId and"
+ " requestId the service
returns. The producer fails the exchange with a"
diff --git
a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc
b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc
index 5532203ea06d..c4a3ba82a7be 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc
@@ -12398,8 +12398,9 @@ the object is the text to send, say so with
`convertBodyTo(String.class)` before
A `Map` or a POJO in the `CamelAlibabaKmsPlaintext` header, or in the exchange
property of the same name, now fails
with an `IllegalArgumentException` instead of being encrypted as its
`toString()`. CAMEL-26258 made the same value in
the message body fail with an `InvalidPayloadException`; the header kept
encrypting the text of the object. Marshal
-such a value first, for example with `marshal().json()`, or set the header to
the text. Text, bytes, a stream, a file
-and a value whose text is its `toString()`, such as a `UUID`, a `URI` or a
`java.time` value, are read as before.
+such a value first, for example with `marshal().json()`, or set the header to
the text. Text, bytes, a stream, a file,
+a `UUID`, a `URI`, a `Date` and a `java.time` value that is a `Temporal` or a
`TemporalAmount`, such as an `Instant`,
+are read as before. A `ZoneId` or a `MonthDay` is neither, so it now fails as
a POJO does.
The `CamelAlibabaKmsNumberOfBytes` header and the exchange property of the
same name are now read only by
`generateDataKey`, which is the only operation that sends the value. Before,
every exchange resolved them, so a value
diff --git
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KMSEndpointBuilderFactory.java
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KMSEndpointBuilderFactory.java
index 17d6897946c7..440b4cdcc938 100644
---
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KMSEndpointBuilderFactory.java
+++
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KMSEndpointBuilderFactory.java
@@ -472,8 +472,10 @@ public interface KMSEndpointBuilderFactory {
* The plaintext for encrypt. The producer encodes it in UTF-8 and
sends
* it to KMS in Base64. This header replaces the plaintext option. If
* this header is not set, an exchange property of the same name
- * replaces the plaintext option. A Map or a POJO fails, as it does in
- * the message body, since Camel reads it only as its toString().
+ * replaces the plaintext option. A Map or a POJO that Camel reads only
+ * as its toString() fails every operation, as the producer reads this
+ * header for each one. A UUID, a URI, a Date and a java.time Temporal
+ * or TemporalAmount do not fail.
*
* The option is a: {@code String} type.
*