You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2025/03/12 20:13:17 UTC
(camel) branch as2 created (now 1c3d45d007d)
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a change to branch as2
in repository https://gitbox.apache.org/repos/asf/camel.git
at 1c3d45d007d CAMEL-21863: camel-as2 - Make configuring endpoint more tooling friendly
This branch includes the following new commits:
new 1c3d45d007d CAMEL-21863: camel-as2 - Make configuring endpoint more tooling friendly
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(camel) 01/01: CAMEL-21863: camel-as2 - Make configuring endpoint more tooling friendly
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch as2
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 1c3d45d007d55be3ed17947c811e9c531ac6c16a
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Mar 12 21:12:59 2025 +0100
CAMEL-21863: camel-as2 - Make configuring endpoint more tooling friendly
---
.../org/apache/camel/catalog/components/as2.json | 67 +++++-----
.../camel/component/as2/api/AS2ClientManager.java | 19 ++-
.../component/as2/api/protocol/RequestMDN.java | 17 +--
.../camel/component/as2/api/AS2MessageTest.java | 18 +--
.../component/as2/api/AS2MessageTestBase.java | 2 +-
.../as2/api/AS2UnencryptedMessageTest.java | 6 +-
components/camel-as2/camel-as2-component/pom.xml | 1 +
...rverManagerEndpointConfigurationConfigurer.java | 19 ++-
.../as2/AS2ClientManagerEndpointConfiguration.java | 25 +++-
...ientManagerEndpointConfigurationConfigurer.java | 25 ++--
.../component/as2/AS2ConfigurationConfigurer.java | 19 ++-
.../camel/component/as2/AS2EndpointConfigurer.java | 19 ++-
.../camel/component/as2/AS2EndpointUriFactory.java | 3 +-
...rverManagerEndpointConfigurationConfigurer.java | 19 ++-
.../component/as2/internal/AS2ApiCollection.java | 2 +-
.../as2/internal/AS2ClientManagerApiMethod.java | 5 +-
.../org/apache/camel/component/as2/as2.json | 67 +++++-----
.../camel/component/as2/AS2Configuration.java | 30 +++--
.../apache/camel/component/as2/AS2Endpoint.java | 9 +-
.../component/as2/AS2AsyncMDNServerManagerIT.java | 5 +-
.../camel/component/as2/AS2ClientManagerIT.java | 37 +++---
.../component/as2/AS2ServerManagerEncryptedIT.java | 6 +-
.../camel/component/as2/AS2ServerManagerIT.java | 17 ++-
.../component/as2/AS2ServerManagerITBase.java | 2 +-
.../camel/component/as2/AS2ServerSecTestBase.java | 6 +-
.../as2/CreateEndpointManualIssueTest.java | 9 +-
.../ROOT/pages/camel-4x-upgrade-guide-4_11.adoc | 10 ++
.../endpoint/dsl/AS2EndpointBuilderFactory.java | 141 ++++++---------------
28 files changed, 303 insertions(+), 302 deletions(-)
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/as2.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/as2.json
index 40d6002d035..ccaaa24d037 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/as2.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/as2.json
@@ -42,45 +42,46 @@
"clientFqdn": { "index": 8, "kind": "parameter", "displayName": "Client Fqdn", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "camel.apache.org", "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The Client Fully Qualified Domain Name (FQDN). Used in message ids sent by endpoint." },
"compressionAlgorithm": { "index": 9, "kind": "parameter", "displayName": "Compression Algorithm", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.as2.api.AS2CompressionAlgorithm", "enum": [ "ZLIB" ], "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The algorithm used to compress EDI message." },
"dispositionNotificationTo": { "index": 10, "kind": "parameter", "displayName": "Disposition Notification To", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The value of the Disposition-Notification-To header. Assigning a value to this parameter r [...]
- "ediMessageTransferEncoding": { "index": 11, "kind": "parameter", "displayName": "Edi Message Transfer Encoding", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The transfer encoding of EDI message." },
- "ediMessageType": { "index": 12, "kind": "parameter", "displayName": "Edi Message Type", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.hc.core5.http.ContentType", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The content type of EDI message. One of application\/edifact, application\/edi-x12, applicat [...]
- "from": { "index": 13, "kind": "parameter", "displayName": "From", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The value of the From header of AS2 message." },
- "hostnameVerifier": { "index": 14, "kind": "parameter", "displayName": "Hostname Verifier", "group": "common", "label": "", "required": false, "type": "object", "javaType": "javax.net.ssl.HostnameVerifier", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "Set hostname verifier for SSL session." },
- "httpConnectionPoolSize": { "index": 15, "kind": "parameter", "displayName": "Http Connection Pool Size", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "5", "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The maximum size of the connection pool for http connections (client only)" },
- "httpConnectionPoolTtl": { "index": 16, "kind": "parameter", "displayName": "Http Connection Pool Ttl", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.time.Duration", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "15m", "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The time to live for connections in the connection pool (client only)" },
- "httpConnectionTimeout": { "index": 17, "kind": "parameter", "displayName": "Http Connection Timeout", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.time.Duration", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "5s", "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The timeout of the http connection (client only)" },
- "httpSocketTimeout": { "index": 18, "kind": "parameter", "displayName": "Http Socket Timeout", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.time.Duration", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "5s", "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The timeout of the underlying http socket (client only)" },
- "inBody": { "index": 19, "kind": "parameter", "displayName": "In Body", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the name of a parameter to be passed in the exchange In Body" },
- "mdnMessageTemplate": { "index": 20, "kind": "parameter", "displayName": "Mdn Message Template", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The template used to format MDN message" },
- "receiptDeliveryOption": { "index": 21, "kind": "parameter", "displayName": "Receipt Delivery Option", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The return URL that the message receiver should send an asynchronous MDN to. If not present the re [...]
- "requestUri": { "index": 22, "kind": "parameter", "displayName": "Request Uri", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "\/", "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The request URI of EDI message." },
- "server": { "index": 23, "kind": "parameter", "displayName": "Server", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "Camel AS2 Server Endpoint", "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The value included in the Server message header identifying the AS2 Server." },
- "serverFqdn": { "index": 24, "kind": "parameter", "displayName": "Server Fqdn", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "camel.apache.org", "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The Server Fully Qualified Domain Name (FQDN). Used in message ids sent by endpoint." },
- "serverPortNumber": { "index": 25, "kind": "parameter", "displayName": "Server Port Number", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The port number of server." },
- "sslContext": { "index": 26, "kind": "parameter", "displayName": "Ssl Context", "group": "common", "label": "", "required": false, "type": "object", "javaType": "javax.net.ssl.SSLContext", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "Set SSL context for connection to remote server." },
- "subject": { "index": 27, "kind": "parameter", "displayName": "Subject", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The value of Subject header of AS2 message." },
- "targetHostname": { "index": 28, "kind": "parameter", "displayName": "Target Hostname", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The host name (IP or DNS name) of target host." },
- "targetPortNumber": { "index": 29, "kind": "parameter", "displayName": "Target Port Number", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "80", "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The port number of target host. -1 indicates the scheme default port." },
- "userAgent": { "index": 30, "kind": "parameter", "displayName": "User Agent", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "Camel AS2 Client Endpoint", "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The value included in the User-Agent message header identifying the AS2 user a [...]
- "exceptionHandler": { "index": 31, "kind": "parameter", "displayName": "Exception Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", "deprecated": false, "autowired": false, "secret": false, "description": "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By de [...]
- "exchangePattern": { "index": 32, "kind": "parameter", "displayName": "Exchange Pattern", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut" ], "deprecated": false, "autowired": false, "secret": false, "description": "Sets the exchange pattern when the consumer creates an exchange." },
- "lazyStartProducer": { "index": 33, "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a produ [...]
- "decryptingPrivateKey": { "index": 34, "kind": "parameter", "displayName": "Decrypting Private Key", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "java.security.PrivateKey", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The key used to encrypt the EDI message." },
- "encryptingAlgorithm": { "index": 35, "kind": "parameter", "displayName": "Encrypting Algorithm", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "org.apache.camel.component.as2.api.AS2EncryptionAlgorithm", "enum": [ "AES128_CBC", "AES192_CBC", "AES256_CBC", "AES128_CCM", "AES192_CCM", "AES256_CCM", "AES128_GCM", "AES192_GCM", "AES256_GCM", "CAMELLIA128_CBC", "CAMELLIA192_CBC", "CAMELLIA256_CBC", "CAST5_CBC", "DES_CBC", "DES_EDE3_CBC", "GOST [...]
- "encryptingCertificateChain": { "index": 36, "kind": "parameter", "displayName": "Encrypting Certificate Chain", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "java.security.cert.Certificate[]", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The chain of certificates used to encrypt EDI message." },
- "signedReceiptMicAlgorithms": { "index": 37, "kind": "parameter", "displayName": "Signed Receipt Mic Algorithms", "group": "security", "label": "security", "required": false, "type": "array", "javaType": "java.lang.String[]", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The list of algorithms, in order of preference, requested to generate a mess [...]
- "signingAlgorithm": { "index": 38, "kind": "parameter", "displayName": "Signing Algorithm", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "org.apache.camel.component.as2.api.AS2SignatureAlgorithm", "enum": [ "SHA3_224WITHRSA", "SHA3_256WITHRSA", "SHA3_384withRSA", "SHA3_512WITHRSA", "MD5WITHRSA", "SHA1WITHRSA", "MD2WITHRSA", "SHA224WITHRSA", "SHA256WITHRSA", "SHA384WITHRSA", "SHA512WITHRSA", "RIPEMD128WITHRSA", "RIPEMD160WITHRSA", "RIPEMD2 [...]
- "signingCertificateChain": { "index": 39, "kind": "parameter", "displayName": "Signing Certificate Chain", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "java.security.cert.Certificate[]", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The chain of certificates used to sign EDI message." },
- "signingPrivateKey": { "index": 40, "kind": "parameter", "displayName": "Signing Private Key", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "java.security.PrivateKey", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The key used to sign the EDI message." },
- "validateSigningCertificateChain": { "index": 41, "kind": "parameter", "displayName": "Validate Signing Certificate Chain", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "java.security.cert.Certificate[]", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "Certificates to validate the message's signature ag [...]
+ "ediMessageCharset": { "index": 11, "kind": "parameter", "displayName": "Edi Message Charset", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "us-ascii", "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The charset of the content type of EDI message." },
+ "ediMessageTransferEncoding": { "index": 12, "kind": "parameter", "displayName": "Edi Message Transfer Encoding", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The transfer encoding of EDI message." },
+ "ediMessageType": { "index": 13, "kind": "parameter", "displayName": "Edi Message Type", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "enum": [ "application\/edifact", "application\/edi-x12", "application\/edi-consent", "application\/xml" ], "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The [...]
+ "from": { "index": 14, "kind": "parameter", "displayName": "From", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The value of the From header of AS2 message." },
+ "hostnameVerifier": { "index": 15, "kind": "parameter", "displayName": "Hostname Verifier", "group": "common", "label": "", "required": false, "type": "object", "javaType": "javax.net.ssl.HostnameVerifier", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "Set hostname verifier for SSL session." },
+ "httpConnectionPoolSize": { "index": 16, "kind": "parameter", "displayName": "Http Connection Pool Size", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "5", "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The maximum size of the connection pool for http connections (client only)" },
+ "httpConnectionPoolTtl": { "index": 17, "kind": "parameter", "displayName": "Http Connection Pool Ttl", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.time.Duration", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "15m", "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The time to live for connections in the connection pool (client only)" },
+ "httpConnectionTimeout": { "index": 18, "kind": "parameter", "displayName": "Http Connection Timeout", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.time.Duration", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "5s", "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The timeout of the http connection (client only)" },
+ "httpSocketTimeout": { "index": 19, "kind": "parameter", "displayName": "Http Socket Timeout", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.time.Duration", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "5s", "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The timeout of the underlying http socket (client only)" },
+ "inBody": { "index": 20, "kind": "parameter", "displayName": "In Body", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the name of a parameter to be passed in the exchange In Body" },
+ "mdnMessageTemplate": { "index": 21, "kind": "parameter", "displayName": "Mdn Message Template", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The template used to format MDN message" },
+ "receiptDeliveryOption": { "index": 22, "kind": "parameter", "displayName": "Receipt Delivery Option", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The return URL that the message receiver should send an asynchronous MDN to. If not present the re [...]
+ "requestUri": { "index": 23, "kind": "parameter", "displayName": "Request Uri", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "\/", "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The request URI of EDI message." },
+ "server": { "index": 24, "kind": "parameter", "displayName": "Server", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "Camel AS2 Server Endpoint", "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The value included in the Server message header identifying the AS2 Server." },
+ "serverFqdn": { "index": 25, "kind": "parameter", "displayName": "Server Fqdn", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "camel.apache.org", "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The Server Fully Qualified Domain Name (FQDN). Used in message ids sent by endpoint." },
+ "serverPortNumber": { "index": 26, "kind": "parameter", "displayName": "Server Port Number", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The port number of server." },
+ "sslContext": { "index": 27, "kind": "parameter", "displayName": "Ssl Context", "group": "common", "label": "", "required": false, "type": "object", "javaType": "javax.net.ssl.SSLContext", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "Set SSL context for connection to remote server." },
+ "subject": { "index": 28, "kind": "parameter", "displayName": "Subject", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The value of Subject header of AS2 message." },
+ "targetHostname": { "index": 29, "kind": "parameter", "displayName": "Target Hostname", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The host name (IP or DNS name) of target host." },
+ "targetPortNumber": { "index": 30, "kind": "parameter", "displayName": "Target Port Number", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "80", "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The port number of target host. -1 indicates the scheme default port." },
+ "userAgent": { "index": 31, "kind": "parameter", "displayName": "User Agent", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "Camel AS2 Client Endpoint", "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The value included in the User-Agent message header identifying the AS2 user a [...]
+ "exceptionHandler": { "index": 32, "kind": "parameter", "displayName": "Exception Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", "deprecated": false, "autowired": false, "secret": false, "description": "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By de [...]
+ "exchangePattern": { "index": 33, "kind": "parameter", "displayName": "Exchange Pattern", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut" ], "deprecated": false, "autowired": false, "secret": false, "description": "Sets the exchange pattern when the consumer creates an exchange." },
+ "lazyStartProducer": { "index": 34, "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a produ [...]
+ "decryptingPrivateKey": { "index": 35, "kind": "parameter", "displayName": "Decrypting Private Key", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "java.security.PrivateKey", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The key used to encrypt the EDI message." },
+ "encryptingAlgorithm": { "index": 36, "kind": "parameter", "displayName": "Encrypting Algorithm", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "org.apache.camel.component.as2.api.AS2EncryptionAlgorithm", "enum": [ "AES128_CBC", "AES192_CBC", "AES256_CBC", "AES128_CCM", "AES192_CCM", "AES256_CCM", "AES128_GCM", "AES192_GCM", "AES256_GCM", "CAMELLIA128_CBC", "CAMELLIA192_CBC", "CAMELLIA256_CBC", "CAST5_CBC", "DES_CBC", "DES_EDE3_CBC", "GOST [...]
+ "encryptingCertificateChain": { "index": 37, "kind": "parameter", "displayName": "Encrypting Certificate Chain", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "java.security.cert.Certificate[]", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The chain of certificates used to encrypt EDI message." },
+ "signedReceiptMicAlgorithms": { "index": 38, "kind": "parameter", "displayName": "Signed Receipt Mic Algorithms", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The list of algorithms, in order of preference, requested to generate a messa [...]
+ "signingAlgorithm": { "index": 39, "kind": "parameter", "displayName": "Signing Algorithm", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "org.apache.camel.component.as2.api.AS2SignatureAlgorithm", "enum": [ "SHA3_224WITHRSA", "SHA3_256WITHRSA", "SHA3_384withRSA", "SHA3_512WITHRSA", "MD5WITHRSA", "SHA1WITHRSA", "MD2WITHRSA", "SHA224WITHRSA", "SHA256WITHRSA", "SHA384WITHRSA", "SHA512WITHRSA", "RIPEMD128WITHRSA", "RIPEMD160WITHRSA", "RIPEMD2 [...]
+ "signingCertificateChain": { "index": 40, "kind": "parameter", "displayName": "Signing Certificate Chain", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "java.security.cert.Certificate[]", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The chain of certificates used to sign EDI message." },
+ "signingPrivateKey": { "index": 41, "kind": "parameter", "displayName": "Signing Private Key", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "java.security.PrivateKey", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The key used to sign the EDI message." },
+ "validateSigningCertificateChain": { "index": 42, "kind": "parameter", "displayName": "Validate Signing Certificate Chain", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "java.security.cert.Certificate[]", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "Certificates to validate the message's signature ag [...]
},
"apis": {
- "client": { "consumerOnly": false, "producerOnly": true, "description": "Sends EDI Messages over HTTP", "methods": { "send": { "description": "Send ediMessage to trading partner", "signatures": [ "org.apache.hc.core5.http.protocol.HttpCoreContext send(Object ediMessage, String requestUri, String subject, String from, String as2From, String as2To, org.apache.camel.component.as2.api.AS2MessageStructure as2MessageStructure, org.apache.hc.core5.http.ContentType ediMessageContentType, Str [...]
+ "client": { "consumerOnly": false, "producerOnly": true, "description": "Sends EDI Messages over HTTP", "methods": { "send": { "description": "Send ediMessage to trading partner", "signatures": [ "org.apache.hc.core5.http.protocol.HttpCoreContext send(Object ediMessage, String requestUri, String subject, String from, String as2From, String as2To, org.apache.camel.component.as2.api.AS2MessageStructure as2MessageStructure, String ediMessageContentType, String ediMessageCharset, String [...]
"receipt": { "consumerOnly": true, "producerOnly": false, "description": "Receives the asynchronous AS2-MDN that is requested by the sender of an AS2 message", "methods": { "receive": { "description": "", "signatures": [ "void receive(String requestUriPattern, org.apache.hc.core5.http.io.HttpRequestHandler handler)" ] } } },
"server": { "consumerOnly": true, "producerOnly": false, "description": "Receives EDI Messages over HTTP", "methods": { "listen": { "description": "", "signatures": [ "void listen(String requestUriPattern, org.apache.hc.core5.http.io.HttpRequestHandler handler)" ] } } }
},
"apiProperties": {
- "client": { "methods": { "send": { "properties": { "as2From": { "index": 0, "kind": "parameter", "displayName": "As2 From", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "AS2 name of sender", "optional": false }, "as2MessageStructure": { "index": 1, "kind": "parameter", "displayName": "As2 Message Structure", "group": "producer", "label": "", "required": f [...]
+ "client": { "methods": { "send": { "properties": { "as2From": { "index": 0, "kind": "parameter", "displayName": "As2 From", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "AS2 name of sender", "optional": false }, "as2MessageStructure": { "index": 1, "kind": "parameter", "displayName": "As2 Message Structure", "group": "producer", "label": "", "required": f [...]
"receipt": { "methods": { "receive": { "properties": { "requestUriPattern": { "index": 0, "kind": "parameter", "displayName": "Request Uri Pattern", "group": "consumer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "", "optional": false } } } } },
"server": { "methods": { "listen": { "properties": { "requestUriPattern": { "index": 0, "kind": "parameter", "displayName": "Request Uri Pattern", "group": "consumer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "", "optional": false } } } } }
}
diff --git a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ClientManager.java b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ClientManager.java
index 17059e7ef5b..7692e6e2636 100644
--- a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ClientManager.java
+++ b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ClientManager.java
@@ -70,6 +70,11 @@ public class AS2ClientManager {
*/
public static final String EDI_MESSAGE_CONTENT_TYPE = CAMEL_AS2_CLIENT_PREFIX + "edi-message-content-type";
+ /**
+ * The HTTP Context Attribute indicating the EDI message content charset to be sent.
+ */
+ public static final String EDI_MESSAGE_CHARSET = CAMEL_AS2_CLIENT_PREFIX + "edi-message-charset";
+
/**
* The HTTP Context Attribute indicating the EDI message transfer encoding to be sent.
*/
@@ -178,6 +183,7 @@ public class AS2ClientManager {
* @param as2To - AS2 name of recipient
* @param as2MessageStructure - the structure of AS2 to send; see {@link AS2MessageStructure}
* @param ediMessageContentType - the content type of EDI message
+ * @param ediMessageCharset - the charset of the EDI message.
* @param ediMessageTransferEncoding - the transfer encoding used to transport EDI message
* @param signingAlgorithm - the algorithm used to sign the message or <code>null</code> if sending EDI
* message unsigned
@@ -208,14 +214,15 @@ public class AS2ClientManager {
String as2From,
String as2To,
AS2MessageStructure as2MessageStructure,
- ContentType ediMessageContentType,
+ String ediMessageContentType,
+ String ediMessageCharset,
String ediMessageTransferEncoding,
AS2SignatureAlgorithm signingAlgorithm,
Certificate[] signingCertificateChain,
PrivateKey signingPrivateKey,
AS2CompressionAlgorithm compressionAlgorithm,
String dispositionNotificationTo,
- String[] signedReceiptMicAlgorithms,
+ String signedReceiptMicAlgorithms,
AS2EncryptionAlgorithm encryptingAlgorithm,
Certificate[] encryptingCertificateChain,
String attachedFileName,
@@ -240,6 +247,7 @@ public class AS2ClientManager {
httpContext.setAttribute(AS2ClientManager.AS2_TO, as2To);
httpContext.setAttribute(AS2ClientManager.AS2_MESSAGE_STRUCTURE, as2MessageStructure);
httpContext.setAttribute(AS2ClientManager.EDI_MESSAGE_CONTENT_TYPE, ediMessageContentType);
+ httpContext.setAttribute(AS2ClientManager.EDI_MESSAGE_CHARSET, ediMessageCharset);
httpContext.setAttribute(AS2ClientManager.EDI_MESSAGE_TRANSFER_ENCODING, ediMessageTransferEncoding);
httpContext.setAttribute(AS2ClientManager.SIGNING_ALGORITHM, signingAlgorithm);
httpContext.setAttribute(AS2ClientManager.SIGNING_CERTIFICATE_CHAIN, signingCertificateChain);
@@ -258,18 +266,19 @@ public class AS2ClientManager {
// Create Message Body
ApplicationEntity applicationEntity;
try {
+ ContentType ct = ContentType.create(ediMessageContentType, ediMessageCharset);
byte[] msgBytes;
if (ediMessage instanceof InputStream isMsg) {
msgBytes = isMsg.readAllBytes();
} else if (ediMessage instanceof String strMsg) {
- msgBytes = strMsg.getBytes(ediMessageContentType.getCharset() == null
- ? StandardCharsets.US_ASCII : ediMessageContentType.getCharset());
+ msgBytes = strMsg.getBytes(ct.getCharset() == null
+ ? StandardCharsets.US_ASCII : ct.getCharset());
} else {
throw new IllegalArgumentException(
"Message type not supported. Must be InputStream or String");
}
applicationEntity
- = EntityUtils.createEDIEntity(msgBytes, ediMessageContentType, ediMessageTransferEncoding, false,
+ = EntityUtils.createEDIEntity(msgBytes, ct, ediMessageTransferEncoding, false,
attachedFileName);
} catch (Exception e) {
throw new HttpException("Failed to create EDI message entity", e);
diff --git a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/protocol/RequestMDN.java b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/protocol/RequestMDN.java
index a63f0c8141a..ca2f841761a 100644
--- a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/protocol/RequestMDN.java
+++ b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/protocol/RequestMDN.java
@@ -26,7 +26,6 @@ import org.apache.hc.core5.http.HttpRequest;
import org.apache.hc.core5.http.HttpRequestInterceptor;
import org.apache.hc.core5.http.protocol.HttpContext;
import org.apache.hc.core5.http.protocol.HttpCoreContext;
-import org.apache.hc.core5.util.CharArrayBuffer;
public class RequestMDN implements HttpRequestInterceptor {
@@ -43,19 +42,15 @@ public class RequestMDN implements HttpRequestInterceptor {
if (dispositionNotificationTo != null) {
request.addHeader(AS2Header.DISPOSITION_NOTIFICATION_TO, dispositionNotificationTo);
- String[] micAlgorithms = coreContext.getAttribute(AS2ClientManager.SIGNED_RECEIPT_MIC_ALGORITHMS, String[].class);
+ String micAlgorithms = coreContext.getAttribute(AS2ClientManager.SIGNED_RECEIPT_MIC_ALGORITHMS, String.class);
if (micAlgorithms == null) {
// requesting unsigned receipt: indicate by not setting Disposition-Notification-Options header
} else {
-
- CharArrayBuffer options = new CharArrayBuffer(
- SIGNED_RECEIPT_PREFIX.length() + 5 * micAlgorithms.length);
- options.append(SIGNED_RECEIPT_PREFIX);
- for (String micAlgorithm : micAlgorithms) {
- options.append("," + micAlgorithm);
- }
-
- request.addHeader(AS2Header.DISPOSITION_NOTIFICATION_OPTIONS, options.toString());
+ StringBuilder sb = new StringBuilder();
+ sb.append(SIGNED_RECEIPT_PREFIX);
+ sb.append(",");
+ sb.append(micAlgorithms);
+ request.addHeader(AS2Header.DISPOSITION_NOTIFICATION_OPTIONS, sb.toString());
}
}
diff --git a/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/AS2MessageTest.java b/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/AS2MessageTest.java
index ea07b6d25fe..8a0678b90da 100644
--- a/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/AS2MessageTest.java
+++ b/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/AS2MessageTest.java
@@ -169,7 +169,7 @@ public class AS2MessageTest extends AS2MessageTestBase {
AS2ClientManager clientManager = createDefaultClientManager();
HttpCoreContext httpContext = clientManager.send(EDI_MESSAGE, REQUEST_URI, SUBJECT, FROM, AS2_NAME, AS2_NAME,
- AS2MessageStructure.SIGNED, ContentType.create(AS2MediaType.APPLICATION_EDIFACT, StandardCharsets.US_ASCII),
+ AS2MessageStructure.SIGNED, AS2MediaType.APPLICATION_EDIFACT, null,
null, AS2SignatureAlgorithm.SHA256WITHRSA, certList.toArray(new Certificate[0]), signingKP.getPrivate(),
null, DISPOSITION_NOTIFICATION_TO, SIGNED_RECEIPT_MIC_ALGORITHMS, null, null, "file.txt", null);
@@ -323,7 +323,7 @@ public class AS2MessageTest extends AS2MessageTestBase {
HttpCoreContext httpContext = clientManager.send(EDI_MESSAGE, REQUEST_URI, SUBJECT, FROM, AS2_NAME, AS2_NAME,
AS2MessageStructure.ENCRYPTED,
- ContentType.create(AS2MediaType.APPLICATION_EDIFACT, StandardCharsets.US_ASCII), null,
+ AS2MediaType.APPLICATION_EDIFACT, null, null,
AS2SignatureAlgorithm.SHA256WITHRSA, certList.toArray(new Certificate[0]), signingKP.getPrivate(), null,
DISPOSITION_NOTIFICATION_TO, SIGNED_RECEIPT_MIC_ALGORITHMS, encryptionAlgorithm,
certList.toArray(new Certificate[0]), "file.txt", null);
@@ -380,7 +380,7 @@ public class AS2MessageTest extends AS2MessageTestBase {
HttpCoreContext httpContext = clientManager.send(EDI_MESSAGE, REQUEST_URI, SUBJECT, FROM, AS2_NAME, AS2_NAME,
AS2MessageStructure.SIGNED_ENCRYPTED,
- ContentType.create(AS2MediaType.APPLICATION_EDIFACT, StandardCharsets.US_ASCII), null,
+ AS2MediaType.APPLICATION_EDIFACT, null, null,
AS2SignatureAlgorithm.SHA256WITHRSA, certList.toArray(new Certificate[0]), signingKP.getPrivate(), null,
DISPOSITION_NOTIFICATION_TO, SIGNED_RECEIPT_MIC_ALGORITHMS, encryptionAlgorithm,
certList.toArray(new Certificate[0]), "file.txt", null);
@@ -444,7 +444,7 @@ public class AS2MessageTest extends AS2MessageTestBase {
AS2ClientManager clientManager = createDefaultClientManager();
HttpCoreContext httpContext = clientManager.send(EDI_MESSAGE, REQUEST_URI, SUBJECT, FROM, AS2_NAME, AS2_NAME,
- AS2MessageStructure.SIGNED, ContentType.create(AS2MediaType.APPLICATION_EDIFACT, StandardCharsets.US_ASCII),
+ AS2MessageStructure.SIGNED, AS2MediaType.APPLICATION_EDIFACT, null,
null, AS2SignatureAlgorithm.SHA256WITHRSA, certList.toArray(new Certificate[0]), signingKP.getPrivate(),
null, DISPOSITION_NOTIFICATION_TO, SIGNED_RECEIPT_MIC_ALGORITHMS, null, null, "file.txt", null);
@@ -555,7 +555,7 @@ public class AS2MessageTest extends AS2MessageTestBase {
HttpCoreContext httpContext = clientManager.send(msg, REQUEST_URI, SUBJECT, FROM, AS2_NAME, AS2_NAME,
AS2MessageStructure.SIGNED_COMPRESSED,
- ContentType.create(AS2MediaType.APPLICATION_EDIFACT, StandardCharsets.US_ASCII), "base64",
+ AS2MediaType.APPLICATION_EDIFACT, null, "base64",
AS2SignatureAlgorithm.SHA256WITHRSA, certList.toArray(new Certificate[0]), signingKP.getPrivate(),
AS2CompressionAlgorithm.ZLIB,
DISPOSITION_NOTIFICATION_TO, SIGNED_RECEIPT_MIC_ALGORITHMS, null,
@@ -630,7 +630,7 @@ public class AS2MessageTest extends AS2MessageTestBase {
HttpCoreContext httpContext = clientManager.send(msg, REQUEST_URI, SUBJECT, FROM, AS2_NAME, AS2_NAME,
AS2MessageStructure.ENCRYPTED_COMPRESSED,
- ContentType.create(AS2MediaType.APPLICATION_EDIFACT, StandardCharsets.US_ASCII), "base64", null, null, null,
+ AS2MediaType.APPLICATION_EDIFACT, null, "base64", null, null, null,
AS2CompressionAlgorithm.ZLIB, DISPOSITION_NOTIFICATION_TO, SIGNED_RECEIPT_MIC_ALGORITHMS,
AS2EncryptionAlgorithm.AES128_CBC, certList.toArray(new Certificate[0]), "file.txt", null);
@@ -699,7 +699,7 @@ public class AS2MessageTest extends AS2MessageTestBase {
AS2ClientManager clientManager = createDefaultClientManager();
HttpCoreContext httpContext = clientManager.send(msg, REQUEST_URI, SUBJECT, FROM, AS2_NAME, AS2_NAME,
AS2MessageStructure.COMPRESSED_SIGNED,
- ContentType.create(AS2MediaType.APPLICATION_EDIFACT, StandardCharsets.US_ASCII), "base64",
+ AS2MediaType.APPLICATION_EDIFACT, null, "base64",
AS2SignatureAlgorithm.SHA256WITHRSA, certList.toArray(new Certificate[0]), signingKP.getPrivate(),
AS2CompressionAlgorithm.ZLIB,
DISPOSITION_NOTIFICATION_TO, SIGNED_RECEIPT_MIC_ALGORITHMS, null,
@@ -735,7 +735,7 @@ public class AS2MessageTest extends AS2MessageTestBase {
AS2ClientManager clientManager = createDefaultClientManager();
HttpCoreContext httpContext = clientManager.send(msg, REQUEST_URI, SUBJECT, FROM, AS2_NAME, AS2_NAME,
AS2MessageStructure.ENCRYPTED_COMPRESSED_SIGNED,
- ContentType.create(AS2MediaType.APPLICATION_EDIFACT, StandardCharsets.US_ASCII), null,
+ AS2MediaType.APPLICATION_EDIFACT, null, null,
AS2SignatureAlgorithm.SHA256WITHRSA, certList.toArray(new Certificate[0]), signingKP.getPrivate(),
AS2CompressionAlgorithm.ZLIB, DISPOSITION_NOTIFICATION_TO, SIGNED_RECEIPT_MIC_ALGORITHMS,
AS2EncryptionAlgorithm.AES128_CBC, certList.toArray(new Certificate[0]), "file.txt", null);
@@ -780,7 +780,7 @@ public class AS2MessageTest extends AS2MessageTestBase {
HttpCoreContext httpContext = clientManager.send(msg, REQUEST_URI, SUBJECT, FROM, AS2_NAME, AS2_NAME,
AS2MessageStructure.ENCRYPTED_SIGNED_COMPRESSED,
- ContentType.create(AS2MediaType.APPLICATION_EDIFACT, StandardCharsets.US_ASCII), null,
+ AS2MediaType.APPLICATION_EDIFACT, null, null,
AS2SignatureAlgorithm.SHA256WITHRSA, certList.toArray(new Certificate[0]), signingKP.getPrivate(),
AS2CompressionAlgorithm.ZLIB, DISPOSITION_NOTIFICATION_TO, SIGNED_RECEIPT_MIC_ALGORITHMS,
AS2EncryptionAlgorithm.AES128_CBC, certList.toArray(new Certificate[0]), "file.txt", null);
diff --git a/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/AS2MessageTestBase.java b/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/AS2MessageTestBase.java
index d3a4e6f50b4..2938a032809 100644
--- a/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/AS2MessageTestBase.java
+++ b/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/AS2MessageTestBase.java
@@ -103,7 +103,7 @@ public class AS2MessageTestBase {
protected static final String DISPOSITION_NOTIFICATION_TO = "mrAS@example.org";
protected static final String DISPOSITION_NOTIFICATION_OPTIONS
= "signed-receipt-protocol=optional,pkcs7-signature; signed-receipt-micalg=optional,sha1";
- protected static final String[] SIGNED_RECEIPT_MIC_ALGORITHMS = new String[] { "sha1", "md5" };
+ protected static final String SIGNED_RECEIPT_MIC_ALGORITHMS = "sha1,md5";
protected static final String MDN_MESSAGE_TEMPLATE = "TBD";
protected static final HttpDateGenerator DATE_GENERATOR = HttpDateGenerator.INSTANCE;
protected static AS2ServerConnection testServer;
diff --git a/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/AS2UnencryptedMessageTest.java b/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/AS2UnencryptedMessageTest.java
index e96a9856b97..0f4e5917d0f 100644
--- a/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/AS2UnencryptedMessageTest.java
+++ b/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/AS2UnencryptedMessageTest.java
@@ -84,7 +84,7 @@ public class AS2UnencryptedMessageTest extends AS2MessageTestBase {
AS2ClientManager clientManager = createDefaultClientManager();
HttpCoreContext httpContext = clientManager.send(EDI_MESSAGE, REQUEST_URI, SUBJECT, FROM, AS2_NAME, AS2_NAME,
- AS2MessageStructure.PLAIN, ContentType.create(AS2MediaType.APPLICATION_EDIFACT, StandardCharsets.US_ASCII),
+ AS2MessageStructure.PLAIN, AS2MediaType.APPLICATION_EDIFACT, null,
null, null, null, null, null,
DISPOSITION_NOTIFICATION_TO, SIGNED_RECEIPT_MIC_ALGORITHMS, null, null,
"file.txt", null);
@@ -125,7 +125,7 @@ public class AS2UnencryptedMessageTest extends AS2MessageTestBase {
HttpCoreContext httpContext = clientManager.send(EDI_MESSAGE, REQUEST_URI, SUBJECT, FROM, AS2_NAME, AS2_NAME,
AS2MessageStructure.PLAIN_COMPRESSED,
- ContentType.create(AS2MediaType.APPLICATION_EDIFACT, StandardCharsets.US_ASCII), null,
+ AS2MediaType.APPLICATION_EDIFACT, null, null,
null, null, null, AS2CompressionAlgorithm.ZLIB,
DISPOSITION_NOTIFICATION_TO, SIGNED_RECEIPT_MIC_ALGORITHMS, null,
null, "file.txt", null);
@@ -172,7 +172,7 @@ public class AS2UnencryptedMessageTest extends AS2MessageTestBase {
AS2ClientManager clientManager = createDefaultClientManager();
HttpCoreContext httpContext = clientManager.send(EDI_MESSAGE, REQUEST_URI, SUBJECT, FROM, AS2_NAME, AS2_NAME,
- AS2MessageStructure.PLAIN, ContentType.create(AS2MediaType.APPLICATION_EDIFACT, StandardCharsets.US_ASCII),
+ AS2MessageStructure.PLAIN, AS2MediaType.APPLICATION_EDIFACT, null,
null, null, null, null, null,
DISPOSITION_NOTIFICATION_TO, SIGNED_RECEIPT_MIC_ALGORITHMS, null, null,
"file.txt", null);
diff --git a/components/camel-as2/camel-as2-component/pom.xml b/components/camel-as2/camel-as2-component/pom.xml
index b5e25b0209b..e250c4be8f8 100644
--- a/components/camel-as2/camel-as2-component/pom.xml
+++ b/components/camel-as2/camel-as2-component/pom.xml
@@ -125,6 +125,7 @@
<nullableOption>encryptingCertificateChain</nullableOption>
<nullableOption>attachedFileName</nullableOption>
<nullableOption>receiptDeliveryOption</nullableOption>
+ <nullableOption>ediMessageCharset</nullableOption>
</nullableOptions>
</api>
<api>
diff --git a/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2AsyncMDNServerManagerEndpointConfigurationConfigurer.java b/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2AsyncMDNServerManagerEndpointConfigurationConfigurer.java
index dd1f5798a46..52e9ee4d83c 100644
--- a/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2AsyncMDNServerManagerEndpointConfigurationConfigurer.java
+++ b/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2AsyncMDNServerManagerEndpointConfigurationConfigurer.java
@@ -33,8 +33,9 @@ public class AS2AsyncMDNServerManagerEndpointConfigurationConfigurer extends org
map.put("CompressionAlgorithm", org.apache.camel.component.as2.api.AS2CompressionAlgorithm.class);
map.put("DecryptingPrivateKey", java.security.PrivateKey.class);
map.put("DispositionNotificationTo", java.lang.String.class);
+ map.put("EdiMessageCharset", java.lang.String.class);
map.put("EdiMessageTransferEncoding", java.lang.String.class);
- map.put("EdiMessageType", org.apache.hc.core5.http.ContentType.class);
+ map.put("EdiMessageType", java.lang.String.class);
map.put("EncryptingAlgorithm", org.apache.camel.component.as2.api.AS2EncryptionAlgorithm.class);
map.put("EncryptingCertificateChain", java.security.cert.Certificate[].class);
map.put("From", java.lang.String.class);
@@ -51,7 +52,7 @@ public class AS2AsyncMDNServerManagerEndpointConfigurationConfigurer extends org
map.put("Server", java.lang.String.class);
map.put("ServerFqdn", java.lang.String.class);
map.put("ServerPortNumber", java.lang.Integer.class);
- map.put("SignedReceiptMicAlgorithms", java.lang.String[].class);
+ map.put("SignedReceiptMicAlgorithms", java.lang.String.class);
map.put("SigningAlgorithm", org.apache.camel.component.as2.api.AS2SignatureAlgorithm.class);
map.put("SigningCertificateChain", java.security.cert.Certificate[].class);
map.put("SigningPrivateKey", java.security.PrivateKey.class);
@@ -90,10 +91,12 @@ public class AS2AsyncMDNServerManagerEndpointConfigurationConfigurer extends org
case "decryptingPrivateKey": target.setDecryptingPrivateKey(property(camelContext, java.security.PrivateKey.class, value)); return true;
case "dispositionnotificationto":
case "dispositionNotificationTo": target.setDispositionNotificationTo(property(camelContext, java.lang.String.class, value)); return true;
+ case "edimessagecharset":
+ case "ediMessageCharset": target.setEdiMessageCharset(property(camelContext, java.lang.String.class, value)); return true;
case "edimessagetransferencoding":
case "ediMessageTransferEncoding": target.setEdiMessageTransferEncoding(property(camelContext, java.lang.String.class, value)); return true;
case "edimessagetype":
- case "ediMessageType": target.setEdiMessageType(property(camelContext, org.apache.hc.core5.http.ContentType.class, value)); return true;
+ case "ediMessageType": target.setEdiMessageType(property(camelContext, java.lang.String.class, value)); return true;
case "encryptingalgorithm":
case "encryptingAlgorithm": target.setEncryptingAlgorithm(property(camelContext, org.apache.camel.component.as2.api.AS2EncryptionAlgorithm.class, value)); return true;
case "encryptingcertificatechain":
@@ -125,7 +128,7 @@ public class AS2AsyncMDNServerManagerEndpointConfigurationConfigurer extends org
case "serverportnumber":
case "serverPortNumber": target.setServerPortNumber(property(camelContext, java.lang.Integer.class, value)); return true;
case "signedreceiptmicalgorithms":
- case "signedReceiptMicAlgorithms": target.setSignedReceiptMicAlgorithms(property(camelContext, java.lang.String[].class, value)); return true;
+ case "signedReceiptMicAlgorithms": target.setSignedReceiptMicAlgorithms(property(camelContext, java.lang.String.class, value)); return true;
case "signingalgorithm":
case "signingAlgorithm": target.setSigningAlgorithm(property(camelContext, org.apache.camel.component.as2.api.AS2SignatureAlgorithm.class, value)); return true;
case "signingcertificatechain":
@@ -177,10 +180,12 @@ public class AS2AsyncMDNServerManagerEndpointConfigurationConfigurer extends org
case "decryptingPrivateKey": return java.security.PrivateKey.class;
case "dispositionnotificationto":
case "dispositionNotificationTo": return java.lang.String.class;
+ case "edimessagecharset":
+ case "ediMessageCharset": return java.lang.String.class;
case "edimessagetransferencoding":
case "ediMessageTransferEncoding": return java.lang.String.class;
case "edimessagetype":
- case "ediMessageType": return org.apache.hc.core5.http.ContentType.class;
+ case "ediMessageType": return java.lang.String.class;
case "encryptingalgorithm":
case "encryptingAlgorithm": return org.apache.camel.component.as2.api.AS2EncryptionAlgorithm.class;
case "encryptingcertificatechain":
@@ -212,7 +217,7 @@ public class AS2AsyncMDNServerManagerEndpointConfigurationConfigurer extends org
case "serverportnumber":
case "serverPortNumber": return java.lang.Integer.class;
case "signedreceiptmicalgorithms":
- case "signedReceiptMicAlgorithms": return java.lang.String[].class;
+ case "signedReceiptMicAlgorithms": return java.lang.String.class;
case "signingalgorithm":
case "signingAlgorithm": return org.apache.camel.component.as2.api.AS2SignatureAlgorithm.class;
case "signingcertificatechain":
@@ -260,6 +265,8 @@ public class AS2AsyncMDNServerManagerEndpointConfigurationConfigurer extends org
case "decryptingPrivateKey": return target.getDecryptingPrivateKey();
case "dispositionnotificationto":
case "dispositionNotificationTo": return target.getDispositionNotificationTo();
+ case "edimessagecharset":
+ case "ediMessageCharset": return target.getEdiMessageCharset();
case "edimessagetransferencoding":
case "ediMessageTransferEncoding": return target.getEdiMessageTransferEncoding();
case "edimessagetype":
diff --git a/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2ClientManagerEndpointConfiguration.java b/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2ClientManagerEndpointConfiguration.java
index d4cceb7cf71..757aa6152d4 100644
--- a/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2ClientManagerEndpointConfiguration.java
+++ b/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2ClientManagerEndpointConfiguration.java
@@ -15,7 +15,7 @@ import org.apache.camel.spi.UriParams;
*/
@ApiParams(apiName = "client", producerOnly = true,
description = "Sends EDI Messages over HTTP",
- apiMethods = {@ApiMethod(methodName = "send", description="Send ediMessage to trading partner", signatures={"org.apache.hc.core5.http.protocol.HttpCoreContext send(Object ediMessage, String requestUri, String subject, String from, String as2From, String as2To, org.apache.camel.component.as2.api.AS2MessageStructure as2MessageStructure, org.apache.hc.core5.http.ContentType ediMessageContentType, String ediMessageTransferEncoding, org.apache.camel.component.as2.api.AS2SignatureAl [...]
+ apiMethods = {@ApiMethod(methodName = "send", description="Send ediMessage to trading partner", signatures={"org.apache.hc.core5.http.protocol.HttpCoreContext send(Object ediMessage, String requestUri, String subject, String from, String as2From, String as2To, org.apache.camel.component.as2.api.AS2MessageStructure as2MessageStructure, String ediMessageContentType, String ediMessageCharset, String ediMessageTransferEncoding, org.apache.camel.component.as2.api.AS2SignatureAlgori [...]
@UriParams
@Configurer(extended = true)
public final class AS2ClientManagerEndpointConfiguration extends AS2Configuration {
@@ -41,8 +41,11 @@ public final class AS2ClientManagerEndpointConfiguration extends AS2Configuratio
@ApiParam(optional = false, apiMethods = {@ApiMethod(methodName = "send", description="EDI message to transport")})
private Object ediMessage;
@UriParam
+ @ApiParam(optional = true, apiMethods = {@ApiMethod(methodName = "send", description="The charset of the EDI message")})
+ private String ediMessageCharset;
+ @UriParam
@ApiParam(optional = false, apiMethods = {@ApiMethod(methodName = "send", description="The content type of EDI message")})
- private org.apache.hc.core5.http.ContentType ediMessageContentType;
+ private String ediMessageContentType;
@UriParam
@ApiParam(optional = true, apiMethods = {@ApiMethod(methodName = "send", description="The transfer encoding used to transport EDI message")})
private String ediMessageTransferEncoding;
@@ -63,7 +66,7 @@ public final class AS2ClientManagerEndpointConfiguration extends AS2Configuratio
private String requestUri;
@UriParam
@ApiParam(optional = true, apiMethods = {@ApiMethod(methodName = "send", description="The senders list of signing algorithms for signing receipt, in preferred order, or null if requesting an unsigned receipt.")})
- private String[] signedReceiptMicAlgorithms;
+ private String signedReceiptMicAlgorithms;
@UriParam
@ApiParam(optional = true, apiMethods = {@ApiMethod(methodName = "send", description="The algorithm used to sign the message or null if sending EDI message unsigned")})
private org.apache.camel.component.as2.api.AS2SignatureAlgorithm signingAlgorithm;
@@ -133,11 +136,19 @@ public final class AS2ClientManagerEndpointConfiguration extends AS2Configuratio
this.ediMessage = ediMessage;
}
- public org.apache.hc.core5.http.ContentType getEdiMessageContentType() {
+ public String getEdiMessageCharset() {
+ return ediMessageCharset;
+ }
+
+ public void setEdiMessageCharset(String ediMessageCharset) {
+ this.ediMessageCharset = ediMessageCharset;
+ }
+
+ public String getEdiMessageContentType() {
return ediMessageContentType;
}
- public void setEdiMessageContentType(org.apache.hc.core5.http.ContentType ediMessageContentType) {
+ public void setEdiMessageContentType(String ediMessageContentType) {
this.ediMessageContentType = ediMessageContentType;
}
@@ -189,11 +200,11 @@ public final class AS2ClientManagerEndpointConfiguration extends AS2Configuratio
this.requestUri = requestUri;
}
- public String[] getSignedReceiptMicAlgorithms() {
+ public String getSignedReceiptMicAlgorithms() {
return signedReceiptMicAlgorithms;
}
- public void setSignedReceiptMicAlgorithms(String[] signedReceiptMicAlgorithms) {
+ public void setSignedReceiptMicAlgorithms(String signedReceiptMicAlgorithms) {
this.signedReceiptMicAlgorithms = signedReceiptMicAlgorithms;
}
diff --git a/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2ClientManagerEndpointConfigurationConfigurer.java b/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2ClientManagerEndpointConfigurationConfigurer.java
index 9b67ded9300..9d9e685ea0f 100644
--- a/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2ClientManagerEndpointConfigurationConfigurer.java
+++ b/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2ClientManagerEndpointConfigurationConfigurer.java
@@ -34,9 +34,10 @@ public class AS2ClientManagerEndpointConfigurationConfigurer extends org.apache.
map.put("DecryptingPrivateKey", java.security.PrivateKey.class);
map.put("DispositionNotificationTo", java.lang.String.class);
map.put("EdiMessage", java.lang.Object.class);
- map.put("EdiMessageContentType", org.apache.hc.core5.http.ContentType.class);
+ map.put("EdiMessageCharset", java.lang.String.class);
+ map.put("EdiMessageContentType", java.lang.String.class);
map.put("EdiMessageTransferEncoding", java.lang.String.class);
- map.put("EdiMessageType", org.apache.hc.core5.http.ContentType.class);
+ map.put("EdiMessageType", java.lang.String.class);
map.put("EncryptingAlgorithm", org.apache.camel.component.as2.api.AS2EncryptionAlgorithm.class);
map.put("EncryptingCertificateChain", java.security.cert.Certificate[].class);
map.put("From", java.lang.String.class);
@@ -52,7 +53,7 @@ public class AS2ClientManagerEndpointConfigurationConfigurer extends org.apache.
map.put("Server", java.lang.String.class);
map.put("ServerFqdn", java.lang.String.class);
map.put("ServerPortNumber", java.lang.Integer.class);
- map.put("SignedReceiptMicAlgorithms", java.lang.String[].class);
+ map.put("SignedReceiptMicAlgorithms", java.lang.String.class);
map.put("SigningAlgorithm", org.apache.camel.component.as2.api.AS2SignatureAlgorithm.class);
map.put("SigningCertificateChain", java.security.cert.Certificate[].class);
map.put("SigningPrivateKey", java.security.PrivateKey.class);
@@ -93,12 +94,14 @@ public class AS2ClientManagerEndpointConfigurationConfigurer extends org.apache.
case "dispositionNotificationTo": target.setDispositionNotificationTo(property(camelContext, java.lang.String.class, value)); return true;
case "edimessage":
case "ediMessage": target.setEdiMessage(property(camelContext, java.lang.Object.class, value)); return true;
+ case "edimessagecharset":
+ case "ediMessageCharset": target.setEdiMessageCharset(property(camelContext, java.lang.String.class, value)); return true;
case "edimessagecontenttype":
- case "ediMessageContentType": target.setEdiMessageContentType(property(camelContext, org.apache.hc.core5.http.ContentType.class, value)); return true;
+ case "ediMessageContentType": target.setEdiMessageContentType(property(camelContext, java.lang.String.class, value)); return true;
case "edimessagetransferencoding":
case "ediMessageTransferEncoding": target.setEdiMessageTransferEncoding(property(camelContext, java.lang.String.class, value)); return true;
case "edimessagetype":
- case "ediMessageType": target.setEdiMessageType(property(camelContext, org.apache.hc.core5.http.ContentType.class, value)); return true;
+ case "ediMessageType": target.setEdiMessageType(property(camelContext, java.lang.String.class, value)); return true;
case "encryptingalgorithm":
case "encryptingAlgorithm": target.setEncryptingAlgorithm(property(camelContext, org.apache.camel.component.as2.api.AS2EncryptionAlgorithm.class, value)); return true;
case "encryptingcertificatechain":
@@ -128,7 +131,7 @@ public class AS2ClientManagerEndpointConfigurationConfigurer extends org.apache.
case "serverportnumber":
case "serverPortNumber": target.setServerPortNumber(property(camelContext, java.lang.Integer.class, value)); return true;
case "signedreceiptmicalgorithms":
- case "signedReceiptMicAlgorithms": target.setSignedReceiptMicAlgorithms(property(camelContext, java.lang.String[].class, value)); return true;
+ case "signedReceiptMicAlgorithms": target.setSignedReceiptMicAlgorithms(property(camelContext, java.lang.String.class, value)); return true;
case "signingalgorithm":
case "signingAlgorithm": target.setSigningAlgorithm(property(camelContext, org.apache.camel.component.as2.api.AS2SignatureAlgorithm.class, value)); return true;
case "signingcertificatechain":
@@ -182,12 +185,14 @@ public class AS2ClientManagerEndpointConfigurationConfigurer extends org.apache.
case "dispositionNotificationTo": return java.lang.String.class;
case "edimessage":
case "ediMessage": return java.lang.Object.class;
+ case "edimessagecharset":
+ case "ediMessageCharset": return java.lang.String.class;
case "edimessagecontenttype":
- case "ediMessageContentType": return org.apache.hc.core5.http.ContentType.class;
+ case "ediMessageContentType": return java.lang.String.class;
case "edimessagetransferencoding":
case "ediMessageTransferEncoding": return java.lang.String.class;
case "edimessagetype":
- case "ediMessageType": return org.apache.hc.core5.http.ContentType.class;
+ case "ediMessageType": return java.lang.String.class;
case "encryptingalgorithm":
case "encryptingAlgorithm": return org.apache.camel.component.as2.api.AS2EncryptionAlgorithm.class;
case "encryptingcertificatechain":
@@ -217,7 +222,7 @@ public class AS2ClientManagerEndpointConfigurationConfigurer extends org.apache.
case "serverportnumber":
case "serverPortNumber": return java.lang.Integer.class;
case "signedreceiptmicalgorithms":
- case "signedReceiptMicAlgorithms": return java.lang.String[].class;
+ case "signedReceiptMicAlgorithms": return java.lang.String.class;
case "signingalgorithm":
case "signingAlgorithm": return org.apache.camel.component.as2.api.AS2SignatureAlgorithm.class;
case "signingcertificatechain":
@@ -267,6 +272,8 @@ public class AS2ClientManagerEndpointConfigurationConfigurer extends org.apache.
case "dispositionNotificationTo": return target.getDispositionNotificationTo();
case "edimessage":
case "ediMessage": return target.getEdiMessage();
+ case "edimessagecharset":
+ case "ediMessageCharset": return target.getEdiMessageCharset();
case "edimessagecontenttype":
case "ediMessageContentType": return target.getEdiMessageContentType();
case "edimessagetransferencoding":
diff --git a/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2ConfigurationConfigurer.java b/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2ConfigurationConfigurer.java
index e7f55499dd9..30974b46b6d 100644
--- a/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2ConfigurationConfigurer.java
+++ b/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2ConfigurationConfigurer.java
@@ -33,8 +33,9 @@ public class AS2ConfigurationConfigurer extends org.apache.camel.support.compone
map.put("CompressionAlgorithm", org.apache.camel.component.as2.api.AS2CompressionAlgorithm.class);
map.put("DecryptingPrivateKey", java.security.PrivateKey.class);
map.put("DispositionNotificationTo", java.lang.String.class);
+ map.put("EdiMessageCharset", java.lang.String.class);
map.put("EdiMessageTransferEncoding", java.lang.String.class);
- map.put("EdiMessageType", org.apache.hc.core5.http.ContentType.class);
+ map.put("EdiMessageType", java.lang.String.class);
map.put("EncryptingAlgorithm", org.apache.camel.component.as2.api.AS2EncryptionAlgorithm.class);
map.put("EncryptingCertificateChain", java.security.cert.Certificate[].class);
map.put("From", java.lang.String.class);
@@ -50,7 +51,7 @@ public class AS2ConfigurationConfigurer extends org.apache.camel.support.compone
map.put("Server", java.lang.String.class);
map.put("ServerFqdn", java.lang.String.class);
map.put("ServerPortNumber", java.lang.Integer.class);
- map.put("SignedReceiptMicAlgorithms", java.lang.String[].class);
+ map.put("SignedReceiptMicAlgorithms", java.lang.String.class);
map.put("SigningAlgorithm", org.apache.camel.component.as2.api.AS2SignatureAlgorithm.class);
map.put("SigningCertificateChain", java.security.cert.Certificate[].class);
map.put("SigningPrivateKey", java.security.PrivateKey.class);
@@ -89,10 +90,12 @@ public class AS2ConfigurationConfigurer extends org.apache.camel.support.compone
case "decryptingPrivateKey": target.setDecryptingPrivateKey(property(camelContext, java.security.PrivateKey.class, value)); return true;
case "dispositionnotificationto":
case "dispositionNotificationTo": target.setDispositionNotificationTo(property(camelContext, java.lang.String.class, value)); return true;
+ case "edimessagecharset":
+ case "ediMessageCharset": target.setEdiMessageCharset(property(camelContext, java.lang.String.class, value)); return true;
case "edimessagetransferencoding":
case "ediMessageTransferEncoding": target.setEdiMessageTransferEncoding(property(camelContext, java.lang.String.class, value)); return true;
case "edimessagetype":
- case "ediMessageType": target.setEdiMessageType(property(camelContext, org.apache.hc.core5.http.ContentType.class, value)); return true;
+ case "ediMessageType": target.setEdiMessageType(property(camelContext, java.lang.String.class, value)); return true;
case "encryptingalgorithm":
case "encryptingAlgorithm": target.setEncryptingAlgorithm(property(camelContext, org.apache.camel.component.as2.api.AS2EncryptionAlgorithm.class, value)); return true;
case "encryptingcertificatechain":
@@ -122,7 +125,7 @@ public class AS2ConfigurationConfigurer extends org.apache.camel.support.compone
case "serverportnumber":
case "serverPortNumber": target.setServerPortNumber(property(camelContext, java.lang.Integer.class, value)); return true;
case "signedreceiptmicalgorithms":
- case "signedReceiptMicAlgorithms": target.setSignedReceiptMicAlgorithms(property(camelContext, java.lang.String[].class, value)); return true;
+ case "signedReceiptMicAlgorithms": target.setSignedReceiptMicAlgorithms(property(camelContext, java.lang.String.class, value)); return true;
case "signingalgorithm":
case "signingAlgorithm": target.setSigningAlgorithm(property(camelContext, org.apache.camel.component.as2.api.AS2SignatureAlgorithm.class, value)); return true;
case "signingcertificatechain":
@@ -174,10 +177,12 @@ public class AS2ConfigurationConfigurer extends org.apache.camel.support.compone
case "decryptingPrivateKey": return java.security.PrivateKey.class;
case "dispositionnotificationto":
case "dispositionNotificationTo": return java.lang.String.class;
+ case "edimessagecharset":
+ case "ediMessageCharset": return java.lang.String.class;
case "edimessagetransferencoding":
case "ediMessageTransferEncoding": return java.lang.String.class;
case "edimessagetype":
- case "ediMessageType": return org.apache.hc.core5.http.ContentType.class;
+ case "ediMessageType": return java.lang.String.class;
case "encryptingalgorithm":
case "encryptingAlgorithm": return org.apache.camel.component.as2.api.AS2EncryptionAlgorithm.class;
case "encryptingcertificatechain":
@@ -207,7 +212,7 @@ public class AS2ConfigurationConfigurer extends org.apache.camel.support.compone
case "serverportnumber":
case "serverPortNumber": return java.lang.Integer.class;
case "signedreceiptmicalgorithms":
- case "signedReceiptMicAlgorithms": return java.lang.String[].class;
+ case "signedReceiptMicAlgorithms": return java.lang.String.class;
case "signingalgorithm":
case "signingAlgorithm": return org.apache.camel.component.as2.api.AS2SignatureAlgorithm.class;
case "signingcertificatechain":
@@ -255,6 +260,8 @@ public class AS2ConfigurationConfigurer extends org.apache.camel.support.compone
case "decryptingPrivateKey": return target.getDecryptingPrivateKey();
case "dispositionnotificationto":
case "dispositionNotificationTo": return target.getDispositionNotificationTo();
+ case "edimessagecharset":
+ case "ediMessageCharset": return target.getEdiMessageCharset();
case "edimessagetransferencoding":
case "ediMessageTransferEncoding": return target.getEdiMessageTransferEncoding();
case "edimessagetype":
diff --git a/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2EndpointConfigurer.java b/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2EndpointConfigurer.java
index 0e1c23d15a3..f298db67cc4 100644
--- a/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2EndpointConfigurer.java
+++ b/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2EndpointConfigurer.java
@@ -33,8 +33,9 @@ public class AS2EndpointConfigurer extends PropertyConfigurerSupport implements
map.put("ClientFqdn", java.lang.String.class);
map.put("CompressionAlgorithm", org.apache.camel.component.as2.api.AS2CompressionAlgorithm.class);
map.put("DispositionNotificationTo", java.lang.String.class);
+ map.put("EdiMessageCharset", java.lang.String.class);
map.put("EdiMessageTransferEncoding", java.lang.String.class);
- map.put("EdiMessageType", org.apache.hc.core5.http.ContentType.class);
+ map.put("EdiMessageType", java.lang.String.class);
map.put("From", java.lang.String.class);
map.put("HostnameVerifier", javax.net.ssl.HostnameVerifier.class);
map.put("HttpConnectionPoolSize", java.lang.Integer.class);
@@ -59,7 +60,7 @@ public class AS2EndpointConfigurer extends PropertyConfigurerSupport implements
map.put("DecryptingPrivateKey", java.security.PrivateKey.class);
map.put("EncryptingAlgorithm", org.apache.camel.component.as2.api.AS2EncryptionAlgorithm.class);
map.put("EncryptingCertificateChain", java.security.cert.Certificate[].class);
- map.put("SignedReceiptMicAlgorithms", java.lang.String[].class);
+ map.put("SignedReceiptMicAlgorithms", java.lang.String.class);
map.put("SigningAlgorithm", org.apache.camel.component.as2.api.AS2SignatureAlgorithm.class);
map.put("SigningCertificateChain", java.security.cert.Certificate[].class);
map.put("SigningPrivateKey", java.security.PrivateKey.class);
@@ -91,10 +92,12 @@ public class AS2EndpointConfigurer extends PropertyConfigurerSupport implements
case "decryptingPrivateKey": target.getConfiguration().setDecryptingPrivateKey(property(camelContext, java.security.PrivateKey.class, value)); return true;
case "dispositionnotificationto":
case "dispositionNotificationTo": target.getConfiguration().setDispositionNotificationTo(property(camelContext, java.lang.String.class, value)); return true;
+ case "edimessagecharset":
+ case "ediMessageCharset": target.getConfiguration().setEdiMessageCharset(property(camelContext, java.lang.String.class, value)); return true;
case "edimessagetransferencoding":
case "ediMessageTransferEncoding": target.getConfiguration().setEdiMessageTransferEncoding(property(camelContext, java.lang.String.class, value)); return true;
case "edimessagetype":
- case "ediMessageType": target.getConfiguration().setEdiMessageType(property(camelContext, org.apache.hc.core5.http.ContentType.class, value)); return true;
+ case "ediMessageType": target.getConfiguration().setEdiMessageType(property(camelContext, java.lang.String.class, value)); return true;
case "encryptingalgorithm":
case "encryptingAlgorithm": target.getConfiguration().setEncryptingAlgorithm(property(camelContext, org.apache.camel.component.as2.api.AS2EncryptionAlgorithm.class, value)); return true;
case "encryptingcertificatechain":
@@ -130,7 +133,7 @@ public class AS2EndpointConfigurer extends PropertyConfigurerSupport implements
case "serverportnumber":
case "serverPortNumber": target.getConfiguration().setServerPortNumber(property(camelContext, java.lang.Integer.class, value)); return true;
case "signedreceiptmicalgorithms":
- case "signedReceiptMicAlgorithms": target.getConfiguration().setSignedReceiptMicAlgorithms(property(camelContext, java.lang.String[].class, value)); return true;
+ case "signedReceiptMicAlgorithms": target.getConfiguration().setSignedReceiptMicAlgorithms(property(camelContext, java.lang.String.class, value)); return true;
case "signingalgorithm":
case "signingAlgorithm": target.getConfiguration().setSigningAlgorithm(property(camelContext, org.apache.camel.component.as2.api.AS2SignatureAlgorithm.class, value)); return true;
case "signingcertificatechain":
@@ -180,10 +183,12 @@ public class AS2EndpointConfigurer extends PropertyConfigurerSupport implements
case "decryptingPrivateKey": return java.security.PrivateKey.class;
case "dispositionnotificationto":
case "dispositionNotificationTo": return java.lang.String.class;
+ case "edimessagecharset":
+ case "ediMessageCharset": return java.lang.String.class;
case "edimessagetransferencoding":
case "ediMessageTransferEncoding": return java.lang.String.class;
case "edimessagetype":
- case "ediMessageType": return org.apache.hc.core5.http.ContentType.class;
+ case "ediMessageType": return java.lang.String.class;
case "encryptingalgorithm":
case "encryptingAlgorithm": return org.apache.camel.component.as2.api.AS2EncryptionAlgorithm.class;
case "encryptingcertificatechain":
@@ -219,7 +224,7 @@ public class AS2EndpointConfigurer extends PropertyConfigurerSupport implements
case "serverportnumber":
case "serverPortNumber": return java.lang.Integer.class;
case "signedreceiptmicalgorithms":
- case "signedReceiptMicAlgorithms": return java.lang.String[].class;
+ case "signedReceiptMicAlgorithms": return java.lang.String.class;
case "signingalgorithm":
case "signingAlgorithm": return org.apache.camel.component.as2.api.AS2SignatureAlgorithm.class;
case "signingcertificatechain":
@@ -265,6 +270,8 @@ public class AS2EndpointConfigurer extends PropertyConfigurerSupport implements
case "decryptingPrivateKey": return target.getConfiguration().getDecryptingPrivateKey();
case "dispositionnotificationto":
case "dispositionNotificationTo": return target.getConfiguration().getDispositionNotificationTo();
+ case "edimessagecharset":
+ case "ediMessageCharset": return target.getConfiguration().getEdiMessageCharset();
case "edimessagetransferencoding":
case "ediMessageTransferEncoding": return target.getConfiguration().getEdiMessageTransferEncoding();
case "edimessagetype":
diff --git a/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2EndpointUriFactory.java b/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2EndpointUriFactory.java
index 78e9ce4fff2..e259008f3f8 100644
--- a/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2EndpointUriFactory.java
+++ b/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2EndpointUriFactory.java
@@ -23,7 +23,7 @@ public class AS2EndpointUriFactory extends org.apache.camel.support.component.En
private static final Set<String> SECRET_PROPERTY_NAMES;
private static final Set<String> MULTI_VALUE_PREFIXES;
static {
- Set<String> props = new HashSet<>(45);
+ Set<String> props = new HashSet<>(46);
props.add("apiName");
props.add("as2From");
props.add("as2MessageStructure");
@@ -36,6 +36,7 @@ public class AS2EndpointUriFactory extends org.apache.camel.support.component.En
props.add("decryptingPrivateKey");
props.add("dispositionNotificationTo");
props.add("ediMessage");
+ props.add("ediMessageCharset");
props.add("ediMessageContentType");
props.add("ediMessageTransferEncoding");
props.add("ediMessageType");
diff --git a/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2ServerManagerEndpointConfigurationConfigurer.java b/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2ServerManagerEndpointConfigurationConfigurer.java
index d3acf5f3c70..468d0c05260 100644
--- a/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2ServerManagerEndpointConfigurationConfigurer.java
+++ b/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2ServerManagerEndpointConfigurationConfigurer.java
@@ -33,8 +33,9 @@ public class AS2ServerManagerEndpointConfigurationConfigurer extends org.apache.
map.put("CompressionAlgorithm", org.apache.camel.component.as2.api.AS2CompressionAlgorithm.class);
map.put("DecryptingPrivateKey", java.security.PrivateKey.class);
map.put("DispositionNotificationTo", java.lang.String.class);
+ map.put("EdiMessageCharset", java.lang.String.class);
map.put("EdiMessageTransferEncoding", java.lang.String.class);
- map.put("EdiMessageType", org.apache.hc.core5.http.ContentType.class);
+ map.put("EdiMessageType", java.lang.String.class);
map.put("EncryptingAlgorithm", org.apache.camel.component.as2.api.AS2EncryptionAlgorithm.class);
map.put("EncryptingCertificateChain", java.security.cert.Certificate[].class);
map.put("From", java.lang.String.class);
@@ -51,7 +52,7 @@ public class AS2ServerManagerEndpointConfigurationConfigurer extends org.apache.
map.put("Server", java.lang.String.class);
map.put("ServerFqdn", java.lang.String.class);
map.put("ServerPortNumber", java.lang.Integer.class);
- map.put("SignedReceiptMicAlgorithms", java.lang.String[].class);
+ map.put("SignedReceiptMicAlgorithms", java.lang.String.class);
map.put("SigningAlgorithm", org.apache.camel.component.as2.api.AS2SignatureAlgorithm.class);
map.put("SigningCertificateChain", java.security.cert.Certificate[].class);
map.put("SigningPrivateKey", java.security.PrivateKey.class);
@@ -90,10 +91,12 @@ public class AS2ServerManagerEndpointConfigurationConfigurer extends org.apache.
case "decryptingPrivateKey": target.setDecryptingPrivateKey(property(camelContext, java.security.PrivateKey.class, value)); return true;
case "dispositionnotificationto":
case "dispositionNotificationTo": target.setDispositionNotificationTo(property(camelContext, java.lang.String.class, value)); return true;
+ case "edimessagecharset":
+ case "ediMessageCharset": target.setEdiMessageCharset(property(camelContext, java.lang.String.class, value)); return true;
case "edimessagetransferencoding":
case "ediMessageTransferEncoding": target.setEdiMessageTransferEncoding(property(camelContext, java.lang.String.class, value)); return true;
case "edimessagetype":
- case "ediMessageType": target.setEdiMessageType(property(camelContext, org.apache.hc.core5.http.ContentType.class, value)); return true;
+ case "ediMessageType": target.setEdiMessageType(property(camelContext, java.lang.String.class, value)); return true;
case "encryptingalgorithm":
case "encryptingAlgorithm": target.setEncryptingAlgorithm(property(camelContext, org.apache.camel.component.as2.api.AS2EncryptionAlgorithm.class, value)); return true;
case "encryptingcertificatechain":
@@ -125,7 +128,7 @@ public class AS2ServerManagerEndpointConfigurationConfigurer extends org.apache.
case "serverportnumber":
case "serverPortNumber": target.setServerPortNumber(property(camelContext, java.lang.Integer.class, value)); return true;
case "signedreceiptmicalgorithms":
- case "signedReceiptMicAlgorithms": target.setSignedReceiptMicAlgorithms(property(camelContext, java.lang.String[].class, value)); return true;
+ case "signedReceiptMicAlgorithms": target.setSignedReceiptMicAlgorithms(property(camelContext, java.lang.String.class, value)); return true;
case "signingalgorithm":
case "signingAlgorithm": target.setSigningAlgorithm(property(camelContext, org.apache.camel.component.as2.api.AS2SignatureAlgorithm.class, value)); return true;
case "signingcertificatechain":
@@ -177,10 +180,12 @@ public class AS2ServerManagerEndpointConfigurationConfigurer extends org.apache.
case "decryptingPrivateKey": return java.security.PrivateKey.class;
case "dispositionnotificationto":
case "dispositionNotificationTo": return java.lang.String.class;
+ case "edimessagecharset":
+ case "ediMessageCharset": return java.lang.String.class;
case "edimessagetransferencoding":
case "ediMessageTransferEncoding": return java.lang.String.class;
case "edimessagetype":
- case "ediMessageType": return org.apache.hc.core5.http.ContentType.class;
+ case "ediMessageType": return java.lang.String.class;
case "encryptingalgorithm":
case "encryptingAlgorithm": return org.apache.camel.component.as2.api.AS2EncryptionAlgorithm.class;
case "encryptingcertificatechain":
@@ -212,7 +217,7 @@ public class AS2ServerManagerEndpointConfigurationConfigurer extends org.apache.
case "serverportnumber":
case "serverPortNumber": return java.lang.Integer.class;
case "signedreceiptmicalgorithms":
- case "signedReceiptMicAlgorithms": return java.lang.String[].class;
+ case "signedReceiptMicAlgorithms": return java.lang.String.class;
case "signingalgorithm":
case "signingAlgorithm": return org.apache.camel.component.as2.api.AS2SignatureAlgorithm.class;
case "signingcertificatechain":
@@ -260,6 +265,8 @@ public class AS2ServerManagerEndpointConfigurationConfigurer extends org.apache.
case "decryptingPrivateKey": return target.getDecryptingPrivateKey();
case "dispositionnotificationto":
case "dispositionNotificationTo": return target.getDispositionNotificationTo();
+ case "edimessagecharset":
+ case "ediMessageCharset": return target.getEdiMessageCharset();
case "edimessagetransferencoding":
case "ediMessageTransferEncoding": return target.getEdiMessageTransferEncoding();
case "edimessagetype":
diff --git a/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/internal/AS2ApiCollection.java b/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/internal/AS2ApiCollection.java
index a89d669d477..d42a8227136 100644
--- a/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/internal/AS2ApiCollection.java
+++ b/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/internal/AS2ApiCollection.java
@@ -31,7 +31,7 @@ public final class AS2ApiCollection extends ApiCollection<AS2ApiName, AS2Configu
List<String> nullableArgs;
aliases.clear();
- nullableArgs = Arrays.asList("ediMessageTransferEncoding", "signingAlgorithm", "signingCertificateChain", "signingPrivateKey", "compressionAlgorithm", "dispositionNotificationTo", "signedReceiptMicAlgorithms", "encryptingAlgorithm", "encryptingCertificateChain", "attachedFileName", "receiptDeliveryOption");
+ nullableArgs = Arrays.asList("ediMessageTransferEncoding", "signingAlgorithm", "signingCertificateChain", "signingPrivateKey", "compressionAlgorithm", "dispositionNotificationTo", "signedReceiptMicAlgorithms", "encryptingAlgorithm", "encryptingCertificateChain", "attachedFileName", "receiptDeliveryOption", "ediMessageCharset");
apiHelpers.put(AS2ApiName.CLIENT, new ApiMethodHelper<>(AS2ClientManagerApiMethod.class, aliases, nullableArgs));
apiMethods.put(AS2ClientManagerApiMethod.class, AS2ApiName.CLIENT);
diff --git a/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/internal/AS2ClientManagerApiMethod.java b/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/internal/AS2ClientManagerApiMethod.java
index 038497cf545..0ddbb18794d 100644
--- a/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/internal/AS2ClientManagerApiMethod.java
+++ b/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/internal/AS2ClientManagerApiMethod.java
@@ -29,14 +29,15 @@ public enum AS2ClientManagerApiMethod implements ApiMethod {
arg("as2From", String.class),
arg("as2To", String.class),
arg("as2MessageStructure", org.apache.camel.component.as2.api.AS2MessageStructure.class),
- arg("ediMessageContentType", org.apache.hc.core5.http.ContentType.class),
+ arg("ediMessageContentType", String.class),
+ arg("ediMessageCharset", String.class),
arg("ediMessageTransferEncoding", String.class),
arg("signingAlgorithm", org.apache.camel.component.as2.api.AS2SignatureAlgorithm.class),
arg("signingCertificateChain", new java.security.cert.Certificate[0].getClass()),
arg("signingPrivateKey", java.security.PrivateKey.class),
arg("compressionAlgorithm", org.apache.camel.component.as2.api.AS2CompressionAlgorithm.class),
arg("dispositionNotificationTo", String.class),
- arg("signedReceiptMicAlgorithms", new String[0].getClass()),
+ arg("signedReceiptMicAlgorithms", String.class),
arg("encryptingAlgorithm", org.apache.camel.component.as2.api.AS2EncryptionAlgorithm.class),
arg("encryptingCertificateChain", new java.security.cert.Certificate[0].getClass()),
arg("attachedFileName", String.class),
diff --git a/components/camel-as2/camel-as2-component/src/generated/resources/META-INF/org/apache/camel/component/as2/as2.json b/components/camel-as2/camel-as2-component/src/generated/resources/META-INF/org/apache/camel/component/as2/as2.json
index 40d6002d035..ccaaa24d037 100644
--- a/components/camel-as2/camel-as2-component/src/generated/resources/META-INF/org/apache/camel/component/as2/as2.json
+++ b/components/camel-as2/camel-as2-component/src/generated/resources/META-INF/org/apache/camel/component/as2/as2.json
@@ -42,45 +42,46 @@
"clientFqdn": { "index": 8, "kind": "parameter", "displayName": "Client Fqdn", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "camel.apache.org", "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The Client Fully Qualified Domain Name (FQDN). Used in message ids sent by endpoint." },
"compressionAlgorithm": { "index": 9, "kind": "parameter", "displayName": "Compression Algorithm", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.as2.api.AS2CompressionAlgorithm", "enum": [ "ZLIB" ], "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The algorithm used to compress EDI message." },
"dispositionNotificationTo": { "index": 10, "kind": "parameter", "displayName": "Disposition Notification To", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The value of the Disposition-Notification-To header. Assigning a value to this parameter r [...]
- "ediMessageTransferEncoding": { "index": 11, "kind": "parameter", "displayName": "Edi Message Transfer Encoding", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The transfer encoding of EDI message." },
- "ediMessageType": { "index": 12, "kind": "parameter", "displayName": "Edi Message Type", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.hc.core5.http.ContentType", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The content type of EDI message. One of application\/edifact, application\/edi-x12, applicat [...]
- "from": { "index": 13, "kind": "parameter", "displayName": "From", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The value of the From header of AS2 message." },
- "hostnameVerifier": { "index": 14, "kind": "parameter", "displayName": "Hostname Verifier", "group": "common", "label": "", "required": false, "type": "object", "javaType": "javax.net.ssl.HostnameVerifier", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "Set hostname verifier for SSL session." },
- "httpConnectionPoolSize": { "index": 15, "kind": "parameter", "displayName": "Http Connection Pool Size", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "5", "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The maximum size of the connection pool for http connections (client only)" },
- "httpConnectionPoolTtl": { "index": 16, "kind": "parameter", "displayName": "Http Connection Pool Ttl", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.time.Duration", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "15m", "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The time to live for connections in the connection pool (client only)" },
- "httpConnectionTimeout": { "index": 17, "kind": "parameter", "displayName": "Http Connection Timeout", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.time.Duration", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "5s", "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The timeout of the http connection (client only)" },
- "httpSocketTimeout": { "index": 18, "kind": "parameter", "displayName": "Http Socket Timeout", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.time.Duration", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "5s", "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The timeout of the underlying http socket (client only)" },
- "inBody": { "index": 19, "kind": "parameter", "displayName": "In Body", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the name of a parameter to be passed in the exchange In Body" },
- "mdnMessageTemplate": { "index": 20, "kind": "parameter", "displayName": "Mdn Message Template", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The template used to format MDN message" },
- "receiptDeliveryOption": { "index": 21, "kind": "parameter", "displayName": "Receipt Delivery Option", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The return URL that the message receiver should send an asynchronous MDN to. If not present the re [...]
- "requestUri": { "index": 22, "kind": "parameter", "displayName": "Request Uri", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "\/", "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The request URI of EDI message." },
- "server": { "index": 23, "kind": "parameter", "displayName": "Server", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "Camel AS2 Server Endpoint", "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The value included in the Server message header identifying the AS2 Server." },
- "serverFqdn": { "index": 24, "kind": "parameter", "displayName": "Server Fqdn", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "camel.apache.org", "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The Server Fully Qualified Domain Name (FQDN). Used in message ids sent by endpoint." },
- "serverPortNumber": { "index": 25, "kind": "parameter", "displayName": "Server Port Number", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The port number of server." },
- "sslContext": { "index": 26, "kind": "parameter", "displayName": "Ssl Context", "group": "common", "label": "", "required": false, "type": "object", "javaType": "javax.net.ssl.SSLContext", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "Set SSL context for connection to remote server." },
- "subject": { "index": 27, "kind": "parameter", "displayName": "Subject", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The value of Subject header of AS2 message." },
- "targetHostname": { "index": 28, "kind": "parameter", "displayName": "Target Hostname", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The host name (IP or DNS name) of target host." },
- "targetPortNumber": { "index": 29, "kind": "parameter", "displayName": "Target Port Number", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "80", "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The port number of target host. -1 indicates the scheme default port." },
- "userAgent": { "index": 30, "kind": "parameter", "displayName": "User Agent", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "Camel AS2 Client Endpoint", "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The value included in the User-Agent message header identifying the AS2 user a [...]
- "exceptionHandler": { "index": 31, "kind": "parameter", "displayName": "Exception Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", "deprecated": false, "autowired": false, "secret": false, "description": "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By de [...]
- "exchangePattern": { "index": 32, "kind": "parameter", "displayName": "Exchange Pattern", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut" ], "deprecated": false, "autowired": false, "secret": false, "description": "Sets the exchange pattern when the consumer creates an exchange." },
- "lazyStartProducer": { "index": 33, "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a produ [...]
- "decryptingPrivateKey": { "index": 34, "kind": "parameter", "displayName": "Decrypting Private Key", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "java.security.PrivateKey", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The key used to encrypt the EDI message." },
- "encryptingAlgorithm": { "index": 35, "kind": "parameter", "displayName": "Encrypting Algorithm", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "org.apache.camel.component.as2.api.AS2EncryptionAlgorithm", "enum": [ "AES128_CBC", "AES192_CBC", "AES256_CBC", "AES128_CCM", "AES192_CCM", "AES256_CCM", "AES128_GCM", "AES192_GCM", "AES256_GCM", "CAMELLIA128_CBC", "CAMELLIA192_CBC", "CAMELLIA256_CBC", "CAST5_CBC", "DES_CBC", "DES_EDE3_CBC", "GOST [...]
- "encryptingCertificateChain": { "index": 36, "kind": "parameter", "displayName": "Encrypting Certificate Chain", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "java.security.cert.Certificate[]", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The chain of certificates used to encrypt EDI message." },
- "signedReceiptMicAlgorithms": { "index": 37, "kind": "parameter", "displayName": "Signed Receipt Mic Algorithms", "group": "security", "label": "security", "required": false, "type": "array", "javaType": "java.lang.String[]", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The list of algorithms, in order of preference, requested to generate a mess [...]
- "signingAlgorithm": { "index": 38, "kind": "parameter", "displayName": "Signing Algorithm", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "org.apache.camel.component.as2.api.AS2SignatureAlgorithm", "enum": [ "SHA3_224WITHRSA", "SHA3_256WITHRSA", "SHA3_384withRSA", "SHA3_512WITHRSA", "MD5WITHRSA", "SHA1WITHRSA", "MD2WITHRSA", "SHA224WITHRSA", "SHA256WITHRSA", "SHA384WITHRSA", "SHA512WITHRSA", "RIPEMD128WITHRSA", "RIPEMD160WITHRSA", "RIPEMD2 [...]
- "signingCertificateChain": { "index": 39, "kind": "parameter", "displayName": "Signing Certificate Chain", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "java.security.cert.Certificate[]", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The chain of certificates used to sign EDI message." },
- "signingPrivateKey": { "index": 40, "kind": "parameter", "displayName": "Signing Private Key", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "java.security.PrivateKey", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The key used to sign the EDI message." },
- "validateSigningCertificateChain": { "index": 41, "kind": "parameter", "displayName": "Validate Signing Certificate Chain", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "java.security.cert.Certificate[]", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "Certificates to validate the message's signature ag [...]
+ "ediMessageCharset": { "index": 11, "kind": "parameter", "displayName": "Edi Message Charset", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "us-ascii", "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The charset of the content type of EDI message." },
+ "ediMessageTransferEncoding": { "index": 12, "kind": "parameter", "displayName": "Edi Message Transfer Encoding", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The transfer encoding of EDI message." },
+ "ediMessageType": { "index": 13, "kind": "parameter", "displayName": "Edi Message Type", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "enum": [ "application\/edifact", "application\/edi-x12", "application\/edi-consent", "application\/xml" ], "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The [...]
+ "from": { "index": 14, "kind": "parameter", "displayName": "From", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The value of the From header of AS2 message." },
+ "hostnameVerifier": { "index": 15, "kind": "parameter", "displayName": "Hostname Verifier", "group": "common", "label": "", "required": false, "type": "object", "javaType": "javax.net.ssl.HostnameVerifier", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "Set hostname verifier for SSL session." },
+ "httpConnectionPoolSize": { "index": 16, "kind": "parameter", "displayName": "Http Connection Pool Size", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "5", "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The maximum size of the connection pool for http connections (client only)" },
+ "httpConnectionPoolTtl": { "index": 17, "kind": "parameter", "displayName": "Http Connection Pool Ttl", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.time.Duration", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "15m", "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The time to live for connections in the connection pool (client only)" },
+ "httpConnectionTimeout": { "index": 18, "kind": "parameter", "displayName": "Http Connection Timeout", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.time.Duration", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "5s", "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The timeout of the http connection (client only)" },
+ "httpSocketTimeout": { "index": 19, "kind": "parameter", "displayName": "Http Socket Timeout", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.time.Duration", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "5s", "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The timeout of the underlying http socket (client only)" },
+ "inBody": { "index": 20, "kind": "parameter", "displayName": "In Body", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the name of a parameter to be passed in the exchange In Body" },
+ "mdnMessageTemplate": { "index": 21, "kind": "parameter", "displayName": "Mdn Message Template", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The template used to format MDN message" },
+ "receiptDeliveryOption": { "index": 22, "kind": "parameter", "displayName": "Receipt Delivery Option", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The return URL that the message receiver should send an asynchronous MDN to. If not present the re [...]
+ "requestUri": { "index": 23, "kind": "parameter", "displayName": "Request Uri", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "\/", "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The request URI of EDI message." },
+ "server": { "index": 24, "kind": "parameter", "displayName": "Server", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "Camel AS2 Server Endpoint", "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The value included in the Server message header identifying the AS2 Server." },
+ "serverFqdn": { "index": 25, "kind": "parameter", "displayName": "Server Fqdn", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "camel.apache.org", "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The Server Fully Qualified Domain Name (FQDN). Used in message ids sent by endpoint." },
+ "serverPortNumber": { "index": 26, "kind": "parameter", "displayName": "Server Port Number", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The port number of server." },
+ "sslContext": { "index": 27, "kind": "parameter", "displayName": "Ssl Context", "group": "common", "label": "", "required": false, "type": "object", "javaType": "javax.net.ssl.SSLContext", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "Set SSL context for connection to remote server." },
+ "subject": { "index": 28, "kind": "parameter", "displayName": "Subject", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The value of Subject header of AS2 message." },
+ "targetHostname": { "index": 29, "kind": "parameter", "displayName": "Target Hostname", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The host name (IP or DNS name) of target host." },
+ "targetPortNumber": { "index": 30, "kind": "parameter", "displayName": "Target Port Number", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "80", "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The port number of target host. -1 indicates the scheme default port." },
+ "userAgent": { "index": 31, "kind": "parameter", "displayName": "User Agent", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "Camel AS2 Client Endpoint", "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The value included in the User-Agent message header identifying the AS2 user a [...]
+ "exceptionHandler": { "index": 32, "kind": "parameter", "displayName": "Exception Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", "deprecated": false, "autowired": false, "secret": false, "description": "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By de [...]
+ "exchangePattern": { "index": 33, "kind": "parameter", "displayName": "Exchange Pattern", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut" ], "deprecated": false, "autowired": false, "secret": false, "description": "Sets the exchange pattern when the consumer creates an exchange." },
+ "lazyStartProducer": { "index": 34, "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a produ [...]
+ "decryptingPrivateKey": { "index": 35, "kind": "parameter", "displayName": "Decrypting Private Key", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "java.security.PrivateKey", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The key used to encrypt the EDI message." },
+ "encryptingAlgorithm": { "index": 36, "kind": "parameter", "displayName": "Encrypting Algorithm", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "org.apache.camel.component.as2.api.AS2EncryptionAlgorithm", "enum": [ "AES128_CBC", "AES192_CBC", "AES256_CBC", "AES128_CCM", "AES192_CCM", "AES256_CCM", "AES128_GCM", "AES192_GCM", "AES256_GCM", "CAMELLIA128_CBC", "CAMELLIA192_CBC", "CAMELLIA256_CBC", "CAST5_CBC", "DES_CBC", "DES_EDE3_CBC", "GOST [...]
+ "encryptingCertificateChain": { "index": 37, "kind": "parameter", "displayName": "Encrypting Certificate Chain", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "java.security.cert.Certificate[]", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The chain of certificates used to encrypt EDI message." },
+ "signedReceiptMicAlgorithms": { "index": 38, "kind": "parameter", "displayName": "Signed Receipt Mic Algorithms", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The list of algorithms, in order of preference, requested to generate a messa [...]
+ "signingAlgorithm": { "index": 39, "kind": "parameter", "displayName": "Signing Algorithm", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "org.apache.camel.component.as2.api.AS2SignatureAlgorithm", "enum": [ "SHA3_224WITHRSA", "SHA3_256WITHRSA", "SHA3_384withRSA", "SHA3_512WITHRSA", "MD5WITHRSA", "SHA1WITHRSA", "MD2WITHRSA", "SHA224WITHRSA", "SHA256WITHRSA", "SHA384WITHRSA", "SHA512WITHRSA", "RIPEMD128WITHRSA", "RIPEMD160WITHRSA", "RIPEMD2 [...]
+ "signingCertificateChain": { "index": 40, "kind": "parameter", "displayName": "Signing Certificate Chain", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "java.security.cert.Certificate[]", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The chain of certificates used to sign EDI message." },
+ "signingPrivateKey": { "index": 41, "kind": "parameter", "displayName": "Signing Private Key", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "java.security.PrivateKey", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The key used to sign the EDI message." },
+ "validateSigningCertificateChain": { "index": 42, "kind": "parameter", "displayName": "Validate Signing Certificate Chain", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "java.security.cert.Certificate[]", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "Certificates to validate the message's signature ag [...]
},
"apis": {
- "client": { "consumerOnly": false, "producerOnly": true, "description": "Sends EDI Messages over HTTP", "methods": { "send": { "description": "Send ediMessage to trading partner", "signatures": [ "org.apache.hc.core5.http.protocol.HttpCoreContext send(Object ediMessage, String requestUri, String subject, String from, String as2From, String as2To, org.apache.camel.component.as2.api.AS2MessageStructure as2MessageStructure, org.apache.hc.core5.http.ContentType ediMessageContentType, Str [...]
+ "client": { "consumerOnly": false, "producerOnly": true, "description": "Sends EDI Messages over HTTP", "methods": { "send": { "description": "Send ediMessage to trading partner", "signatures": [ "org.apache.hc.core5.http.protocol.HttpCoreContext send(Object ediMessage, String requestUri, String subject, String from, String as2From, String as2To, org.apache.camel.component.as2.api.AS2MessageStructure as2MessageStructure, String ediMessageContentType, String ediMessageCharset, String [...]
"receipt": { "consumerOnly": true, "producerOnly": false, "description": "Receives the asynchronous AS2-MDN that is requested by the sender of an AS2 message", "methods": { "receive": { "description": "", "signatures": [ "void receive(String requestUriPattern, org.apache.hc.core5.http.io.HttpRequestHandler handler)" ] } } },
"server": { "consumerOnly": true, "producerOnly": false, "description": "Receives EDI Messages over HTTP", "methods": { "listen": { "description": "", "signatures": [ "void listen(String requestUriPattern, org.apache.hc.core5.http.io.HttpRequestHandler handler)" ] } } }
},
"apiProperties": {
- "client": { "methods": { "send": { "properties": { "as2From": { "index": 0, "kind": "parameter", "displayName": "As2 From", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "AS2 name of sender", "optional": false }, "as2MessageStructure": { "index": 1, "kind": "parameter", "displayName": "As2 Message Structure", "group": "producer", "label": "", "required": f [...]
+ "client": { "methods": { "send": { "properties": { "as2From": { "index": 0, "kind": "parameter", "displayName": "As2 From", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "AS2 name of sender", "optional": false }, "as2MessageStructure": { "index": 1, "kind": "parameter", "displayName": "As2 Message Structure", "group": "producer", "label": "", "required": f [...]
"receipt": { "methods": { "receive": { "properties": { "requestUriPattern": { "index": 0, "kind": "parameter", "displayName": "Request Uri Pattern", "group": "consumer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "", "optional": false } } } } },
"server": { "methods": { "listen": { "properties": { "requestUriPattern": { "index": 0, "kind": "parameter", "displayName": "Request Uri Pattern", "group": "consumer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "", "optional": false } } } } }
}
diff --git a/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Configuration.java b/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Configuration.java
index 9f754129d0f..10903adb83f 100644
--- a/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Configuration.java
+++ b/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Configuration.java
@@ -34,7 +34,6 @@ import org.apache.camel.spi.Metadata;
import org.apache.camel.spi.UriParam;
import org.apache.camel.spi.UriParams;
import org.apache.camel.spi.UriPath;
-import org.apache.hc.core5.http.ContentType;
/**
* Component configuration for AS2 component.
@@ -67,8 +66,10 @@ public class AS2Configuration {
private Integer serverPortNumber;
@UriParam(defaultValue = "/")
private String requestUri = "/";
- @UriParam
- private ContentType ediMessageType;
+ @UriParam(enums = "application/edifact,application/edi-x12,application/edi-consent,application/xml")
+ private String ediMessageType;
+ @UriParam(defaultValue = "us-ascii")
+ private String ediMessageCharset;
@UriParam
private String ediMessageTransferEncoding;
@UriParam
@@ -92,7 +93,7 @@ public class AS2Configuration {
@UriParam
private String dispositionNotificationTo;
@UriParam(label = "security")
- private String[] signedReceiptMicAlgorithms;
+ private String signedReceiptMicAlgorithms;
@UriParam(label = "security")
private AS2EncryptionAlgorithm encryptingAlgorithm;
@UriParam(label = "security")
@@ -258,7 +259,7 @@ public class AS2Configuration {
this.requestUri = requestUri;
}
- public ContentType getEdiMessageType() {
+ public String getEdiMessageType() {
return ediMessageType;
}
@@ -266,10 +267,21 @@ public class AS2Configuration {
* The content type of EDI message. One of application/edifact, application/edi-x12, application/edi-consent,
* application/xml
*/
- public void setEdiMessageType(ContentType ediMessageType) {
+ public void setEdiMessageType(String ediMessageType) {
this.ediMessageType = ediMessageType;
}
+ public String getEdiMessageCharset() {
+ return ediMessageCharset;
+ }
+
+ /**
+ * The charset of the content type of EDI message.
+ */
+ public void setEdiMessageCharset(String ediMessageCharset) {
+ this.ediMessageCharset = ediMessageCharset;
+ }
+
public String getEdiMessageTransferEncoding() {
return ediMessageTransferEncoding;
}
@@ -394,15 +406,15 @@ public class AS2Configuration {
this.dispositionNotificationTo = dispositionNotificationTo;
}
- public String[] getSignedReceiptMicAlgorithms() {
+ public String getSignedReceiptMicAlgorithms() {
return signedReceiptMicAlgorithms;
}
/**
* The list of algorithms, in order of preference, requested to generate a message integrity check (MIC) returned in
- * message dispostion notification (MDN)
+ * message disposition notification (MDN). Multiple algorithms can be separated by comma.
*/
- public void setSignedReceiptMicAlgorithms(String[] signedReceiptMicAlgorithms) {
+ public void setSignedReceiptMicAlgorithms(String signedReceiptMicAlgorithms) {
this.signedReceiptMicAlgorithms = signedReceiptMicAlgorithms;
}
diff --git a/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Endpoint.java b/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Endpoint.java
index d70ead7b410..fc5ce623efc 100644
--- a/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Endpoint.java
+++ b/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Endpoint.java
@@ -50,7 +50,6 @@ import org.apache.camel.spi.UriParam;
import org.apache.camel.support.component.AbstractApiEndpoint;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodPropertiesHelper;
-import org.apache.hc.core5.http.ContentType;
/**
* Transfer data securely and reliably using the AS2 protocol (RFC4130).
@@ -166,11 +165,11 @@ public class AS2Endpoint extends AbstractApiEndpoint<AS2ApiName, AS2Configuratio
configuration.setAs2MessageStructure(as2MessageStructure);
}
- public ContentType getEdiMessageType() {
+ public String getEdiMessageType() {
return configuration.getEdiMessageType();
}
- public void setEdiMessageContentType(ContentType ediMessageType) {
+ public void setEdiMessageContentType(String ediMessageType) {
configuration.setEdiMessageType(ediMessageType);
}
@@ -222,11 +221,11 @@ public class AS2Endpoint extends AbstractApiEndpoint<AS2ApiName, AS2Configuratio
configuration.setDispositionNotificationTo(dispositionNotificationTo);
}
- public String[] getSignedReceiptMicAlgorithms() {
+ public String getSignedReceiptMicAlgorithms() {
return configuration.getSignedReceiptMicAlgorithms();
}
- public void setSignedReceiptMicAlgorithms(String[] signedReceiptMicAlgorithms) {
+ public void setSignedReceiptMicAlgorithms(String signedReceiptMicAlgorithms) {
configuration.setSignedReceiptMicAlgorithms(signedReceiptMicAlgorithms);
}
diff --git a/components/camel-as2/camel-as2-component/src/test/java/org/apache/camel/component/as2/AS2AsyncMDNServerManagerIT.java b/components/camel-as2/camel-as2-component/src/test/java/org/apache/camel/component/as2/AS2AsyncMDNServerManagerIT.java
index b7856510cdd..cbbf0982edf 100644
--- a/components/camel-as2/camel-as2-component/src/test/java/org/apache/camel/component/as2/AS2AsyncMDNServerManagerIT.java
+++ b/components/camel-as2/camel-as2-component/src/test/java/org/apache/camel/component/as2/AS2AsyncMDNServerManagerIT.java
@@ -117,7 +117,7 @@ public class AS2AsyncMDNServerManagerIT extends AbstractAS2ITSupport {
private static AS2ServerConnection serverConnection;
private static RequestHandler requestHandler;
- private static final String[] SIGNED_RECEIPT_MIC_ALGORITHMS = new String[] { "sha1", "md5" };
+ private static final String SIGNED_RECEIPT_MIC_ALGORITHMS = "sha1,md5";
private static KeyPair serverKP;
private static X509Certificate serverCert;
private static KeyPair clientKeyPair;
@@ -327,8 +327,7 @@ public class AS2AsyncMDNServerManagerIT extends AbstractAS2ITSupport {
headers.put("CamelAs2.as2From", AS2_NAME);
headers.put("CamelAs2.as2To", AS2_NAME);
headers.put("CamelAs2.as2MessageStructure", AS2MessageStructure.PLAIN);
- headers.put("CamelAs2.ediMessageContentType",
- ContentType.create(AS2MediaType.APPLICATION_EDIFACT, StandardCharsets.US_ASCII.name()));
+ headers.put("CamelAs2.ediMessageContentType", AS2MediaType.APPLICATION_EDIFACT);
headers.put("CamelAs2.ediMessageTransferEncoding", EDI_MESSAGE_CONTENT_TRANSFER_ENCODING);
headers.put("CamelAs2.dispositionNotificationTo", "mrAS2@example.com");
diff --git a/components/camel-as2/camel-as2-component/src/test/java/org/apache/camel/component/as2/AS2ClientManagerIT.java b/components/camel-as2/camel-as2-component/src/test/java/org/apache/camel/component/as2/AS2ClientManagerIT.java
index 1c51929b05c..7a87f7f7d57 100644
--- a/components/camel-as2/camel-as2-component/src/test/java/org/apache/camel/component/as2/AS2ClientManagerIT.java
+++ b/components/camel-as2/camel-as2-component/src/test/java/org/apache/camel/component/as2/AS2ClientManagerIT.java
@@ -145,7 +145,7 @@ public class AS2ClientManagerIT extends AbstractAS2ITSupport {
private static final String EDI_MESSAGE_CONTENT_TRANSFER_ENCODING = "7bit";
private static final String EXPECTED_AS2_VERSION = AS2_VERSION;
private static final String EXPECTED_MDN_SUBJECT = MDN_SUBJECT_PREFIX + SUBJECT;
- private static final String[] SIGNED_RECEIPT_MIC_ALGORITHMS = new String[] { "sha1", "md5" };
+ private static final String SIGNED_RECEIPT_MIC_ALGORITHMS = "sha1,md5";
private static final String DISPOSITION_NOTIFICATION_OPTIONS
= "signed-receipt-protocol=optional,pkcs7-signature; signed-receipt-micalg=optional,sha1";
private static final int PARTNER_TARGET_PORT = 8888;
@@ -187,9 +187,8 @@ public class AS2ClientManagerIT extends AbstractAS2ITSupport {
headers.put("CamelAs2.as2To", AS2_NAME);
// parameter type is org.apache.camel.component.as2.api.AS2MessageStructure
headers.put("CamelAs2.as2MessageStructure", AS2MessageStructure.PLAIN);
- // parameter type is org.apache.http.entity.ContentType
- headers.put("CamelAs2.ediMessageContentType",
- ContentType.create(AS2MediaType.APPLICATION_EDIFACT, StandardCharsets.US_ASCII.name()));
+ // parameter type is String
+ headers.put("CamelAs2.ediMessageContentType", AS2MediaType.APPLICATION_EDIFACT);
// parameter type is String
headers.put("CamelAs2.ediMessageTransferEncoding", encoding);
// parameter type is String
@@ -271,9 +270,8 @@ public class AS2ClientManagerIT extends AbstractAS2ITSupport {
headers.put("CamelAs2.as2To", AS2_NAME);
// parameter type is org.apache.camel.component.as2.api.AS2MessageStructure
headers.put("CamelAs2.as2MessageStructure", AS2MessageStructure.PLAIN);
- // parameter type is org.apache.http.entity.ContentType
- headers.put("CamelAs2.ediMessageContentType",
- ContentType.create(AS2MediaType.APPLICATION_EDIFACT, StandardCharsets.US_ASCII.name()));
+ // parameter type is String
+ headers.put("CamelAs2.ediMessageContentType", AS2MediaType.APPLICATION_EDIFACT);
// parameter type is String
headers.put("CamelAs2.ediMessageTransferEncoding", EDI_MESSAGE_CONTENT_TRANSFER_ENCODING);
// parameter type is String
@@ -325,9 +323,8 @@ public class AS2ClientManagerIT extends AbstractAS2ITSupport {
headers.put("CamelAs2.from", FROM);
// parameter type is org.apache.camel.component.as2.api.AS2MessageStructure
headers.put("CamelAs2.as2MessageStructure", AS2MessageStructure.PLAIN);
- // parameter type is org.apache.http.entity.ContentType
- headers.put("CamelAs2.ediMessageContentType",
- ContentType.create(AS2MediaType.APPLICATION_EDIFACT, StandardCharsets.US_ASCII));
+ // parameter type is String
+ headers.put("CamelAs2.ediMessageContentType", AS2MediaType.APPLICATION_EDIFACT);
// parameter type is String
headers.put("CamelAs2.ediMessageTransferEncoding", EDI_MESSAGE_CONTENT_TRANSFER_ENCODING);
// parameter type is String
@@ -420,9 +417,8 @@ public class AS2ClientManagerIT extends AbstractAS2ITSupport {
headers.put("CamelAs2.as2To", AS2_NAME);
// parameter type is org.apache.camel.component.as2.api.AS2MessageStructure
headers.put("CamelAs2.as2MessageStructure", AS2MessageStructure.ENCRYPTED);
- // parameter type is org.apache.http.entity.ContentType
- headers.put("CamelAs2.ediMessageContentType",
- ContentType.create(AS2MediaType.APPLICATION_EDIFACT, StandardCharsets.US_ASCII));
+ // parameter type is String
+ headers.put("CamelAs2.ediMessageContentType", AS2MediaType.APPLICATION_EDIFACT);
// parameter type is String
headers.put("CamelAs2.ediMessageTransferEncoding", encoding);
// parameter type is String
@@ -522,9 +518,8 @@ public class AS2ClientManagerIT extends AbstractAS2ITSupport {
headers.put("CamelAs2.as2To", AS2_NAME);
// parameter type is org.apache.camel.component.as2.api.AS2MessageStructure
headers.put("CamelAs2.as2MessageStructure", AS2MessageStructure.SIGNED);
- // parameter type is org.apache.http.entity.ContentType
- headers.put("CamelAs2.ediMessageContentType",
- ContentType.create(AS2MediaType.APPLICATION_EDIFACT, StandardCharsets.US_ASCII));
+ // parameter type is String
+ headers.put("CamelAs2.ediMessageContentType", AS2MediaType.APPLICATION_EDIFACT);
// parameter type is String
headers.put("CamelAs2.ediMessageTransferEncoding", encoding);
// parameter type is org.apache.camel.component.as2.api.AS2SignatureAlgorithm
@@ -631,9 +626,8 @@ public class AS2ClientManagerIT extends AbstractAS2ITSupport {
headers.put("CamelAs2.as2To", AS2_NAME);
// parameter type is org.apache.camel.component.as2.api.AS2MessageStructure
headers.put("CamelAs2.as2MessageStructure", AS2MessageStructure.SIGNED);
- // parameter type is org.apache.http.entity.ContentType
- headers.put("CamelAs2.ediMessageContentType",
- ContentType.create(AS2MediaType.APPLICATION_XML, StandardCharsets.US_ASCII)); // this line is the difference
+ // parameter type is String
+ headers.put("CamelAs2.ediMessageContentType", AS2MediaType.APPLICATION_XML);
// parameter type is String
headers.put("CamelAs2.ediMessageTransferEncoding", EDI_MESSAGE_CONTENT_TRANSFER_ENCODING);
// parameter type is org.apache.camel.component.as2.api.AS2SignatureAlgorithm
@@ -751,9 +745,8 @@ public class AS2ClientManagerIT extends AbstractAS2ITSupport {
headers.put("CamelAs2.as2To", AS2_NAME);
// parameter type is org.apache.camel.component.as2.api.AS2MessageStructure
headers.put("CamelAs2.as2MessageStructure", AS2MessageStructure.PLAIN_COMPRESSED);
- // parameter type is org.apache.http.entity.ContentType
- headers.put("CamelAs2.ediMessageContentType",
- ContentType.create(AS2MediaType.APPLICATION_EDIFACT, StandardCharsets.US_ASCII));
+ // parameter type is String
+ headers.put("CamelAs2.ediMessageContentType", AS2MediaType.APPLICATION_EDIFACT);
// parameter type is String
headers.put("CamelAs2.ediMessageTransferEncoding", encoding);
// parameter type is org.apache.camel.component.as2.api.AS2CompressionAlgorithm
diff --git a/components/camel-as2/camel-as2-component/src/test/java/org/apache/camel/component/as2/AS2ServerManagerEncryptedIT.java b/components/camel-as2/camel-as2-component/src/test/java/org/apache/camel/component/as2/AS2ServerManagerEncryptedIT.java
index b99eaf0d1f6..7edecac479e 100644
--- a/components/camel-as2/camel-as2-component/src/test/java/org/apache/camel/component/as2/AS2ServerManagerEncryptedIT.java
+++ b/components/camel-as2/camel-as2-component/src/test/java/org/apache/camel/component/as2/AS2ServerManagerEncryptedIT.java
@@ -16,7 +16,6 @@
*/
package org.apache.camel.component.as2;
-import java.nio.charset.StandardCharsets;
import java.security.cert.Certificate;
import java.util.List;
import java.util.concurrent.TimeUnit;
@@ -40,7 +39,6 @@ import org.apache.camel.component.as2.api.entity.MultipartSignedEntity;
import org.apache.camel.component.as2.internal.AS2Constants;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.hc.core5.http.ClassicHttpRequest;
-import org.apache.hc.core5.http.ContentType;
import org.apache.hc.core5.http.HttpEntity;
import org.apache.hc.core5.http.HttpRequest;
import org.apache.hc.core5.http.HttpVersion;
@@ -68,7 +66,7 @@ public class AS2ServerManagerEncryptedIT extends AS2ServerManagerITBase {
AS2ClientManager clientManager = new AS2ClientManager(clientConnection);
clientManager.send(EDI_MESSAGE, REQUEST_URI, SUBJECT, FROM, AS2_NAME, AS2_NAME, AS2MessageStructure.ENCRYPTED,
- ContentType.create(AS2MediaType.APPLICATION_EDIFACT, StandardCharsets.US_ASCII), null, null, null, null,
+ AS2MediaType.APPLICATION_EDIFACT, null, null, null, null, null,
null, DISPOSITION_NOTIFICATION_TO, SIGNED_RECEIPT_MIC_ALGORITHMS, AS2EncryptionAlgorithm.AES128_CBC,
certList.toArray(new Certificate[0]), null, null);
@@ -142,7 +140,7 @@ public class AS2ServerManagerEncryptedIT extends AS2ServerManagerITBase {
clientManager.send(EDI_MESSAGE, REQUEST_URI, SUBJECT, FROM, AS2_NAME, AS2_NAME,
AS2MessageStructure.ENCRYPTED_COMPRESSED_SIGNED,
- ContentType.create(AS2MediaType.APPLICATION_EDIFACT, StandardCharsets.US_ASCII), null,
+ AS2MediaType.APPLICATION_EDIFACT, null, null,
AS2SignatureAlgorithm.SHA256WITHRSA, certList.toArray(new Certificate[0]), signingKP.getPrivate(),
AS2CompressionAlgorithm.ZLIB, DISPOSITION_NOTIFICATION_TO, SIGNED_RECEIPT_MIC_ALGORITHMS,
AS2EncryptionAlgorithm.AES128_CBC,
diff --git a/components/camel-as2/camel-as2-component/src/test/java/org/apache/camel/component/as2/AS2ServerManagerIT.java b/components/camel-as2/camel-as2-component/src/test/java/org/apache/camel/component/as2/AS2ServerManagerIT.java
index 91768a2080e..2112fbfcdd1 100644
--- a/components/camel-as2/camel-as2-component/src/test/java/org/apache/camel/component/as2/AS2ServerManagerIT.java
+++ b/components/camel-as2/camel-as2-component/src/test/java/org/apache/camel/component/as2/AS2ServerManagerIT.java
@@ -46,7 +46,6 @@ import org.apache.camel.component.as2.internal.AS2Constants;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.hc.core5.http.ClassicHttpRequest;
import org.apache.hc.core5.http.ClassicHttpResponse;
-import org.apache.hc.core5.http.ContentType;
import org.apache.hc.core5.http.HttpEntity;
import org.apache.hc.core5.http.HttpRequest;
import org.apache.hc.core5.http.HttpResponse;
@@ -91,7 +90,7 @@ public class AS2ServerManagerIT extends AS2ServerManagerITBase {
AS2ClientManager clientManager = new AS2ClientManager(clientConnection);
clientManager.send(msg, REQUEST_URI, SUBJECT, FROM, AS2_NAME, AS2_NAME, AS2MessageStructure.PLAIN,
- ContentType.create(AS2MediaType.APPLICATION_EDIFACT, StandardCharsets.US_ASCII), encoding, null, null, null,
+ AS2MediaType.APPLICATION_EDIFACT, null, encoding, null, null, null,
null, DISPOSITION_NOTIFICATION_TO, SIGNED_RECEIPT_MIC_ALGORITHMS, null, null, null, null);
MockEndpoint mockEndpoint = getMockEndpoint("mock:as2RcvMsgs");
@@ -185,7 +184,7 @@ public class AS2ServerManagerIT extends AS2ServerManagerITBase {
AS2ClientManager clientManager = new AS2ClientManager(clientConnection);
clientManager.send(msg, REQUEST_URI, SUBJECT, FROM, AS2_NAME, AS2_NAME, AS2MessageStructure.SIGNED,
- ContentType.create(AS2MediaType.APPLICATION_EDIFACT, StandardCharsets.US_ASCII), encoding,
+ AS2MediaType.APPLICATION_EDIFACT, null, encoding,
AS2SignatureAlgorithm.SHA256WITHRSA,
certList.toArray(new Certificate[0]), signingKP.getPrivate(), null, DISPOSITION_NOTIFICATION_TO,
SIGNED_RECEIPT_MIC_ALGORITHMS, null, null, null, null);
@@ -263,7 +262,7 @@ public class AS2ServerManagerIT extends AS2ServerManagerITBase {
AS2ClientManager clientManager = new AS2ClientManager(clientConnection);
clientManager.send(EDI_MESSAGE, REQUEST_URI, SUBJECT, FROM, AS2_NAME, AS2_NAME, AS2MessageStructure.SIGNED,
- ContentType.create(AS2MediaType.APPLICATION_XML, StandardCharsets.US_ASCII), null, // this line is the difference
+ AS2MediaType.APPLICATION_XML, null, null, // this line is the difference
AS2SignatureAlgorithm.SHA256WITHRSA,
certList.toArray(new Certificate[0]), signingKP.getPrivate(), null, DISPOSITION_NOTIFICATION_TO,
SIGNED_RECEIPT_MIC_ALGORITHMS, null, null, null, null);
@@ -353,7 +352,7 @@ public class AS2ServerManagerIT extends AS2ServerManagerITBase {
hackerSigningKP, hackerSigningDN, hackerIssueKP, hackerIssueDN);
clientManager.send(EDI_MESSAGE, REQUEST_URI, SUBJECT, FROM, AS2_NAME, AS2_NAME, AS2MessageStructure.SIGNED,
- ContentType.create(AS2MediaType.APPLICATION_EDIFACT, StandardCharsets.US_ASCII), null,
+ AS2MediaType.APPLICATION_EDIFACT, null, null,
AS2SignatureAlgorithm.SHA256WITHRSA,
new Certificate[] { hackerSigningCert }, hackerSigningKP.getPrivate(), null, DISPOSITION_NOTIFICATION_TO,
SIGNED_RECEIPT_MIC_ALGORITHMS, null, null, null, null);
@@ -448,7 +447,7 @@ public class AS2ServerManagerIT extends AS2ServerManagerITBase {
AS2ClientManager clientManager = new AS2ClientManager(clientConnection);
clientManager.send(msg, REQUEST_URI, SUBJECT, FROM, AS2_NAME, AS2_NAME, AS2MessageStructure.COMPRESSED_SIGNED,
- ContentType.create(AS2MediaType.APPLICATION_EDIFACT, StandardCharsets.US_ASCII), encoding,
+ AS2MediaType.APPLICATION_EDIFACT, null, encoding,
AS2SignatureAlgorithm.SHA256WITHRSA,
certList.toArray(new Certificate[0]), signingKP.getPrivate(), AS2CompressionAlgorithm.ZLIB,
DISPOSITION_NOTIFICATION_TO,
@@ -485,7 +484,7 @@ public class AS2ServerManagerIT extends AS2ServerManagerITBase {
HttpCoreContext context = clientManager.send(EDI_MESSAGE, "/process_error", SUBJECT, FROM, AS2_NAME, AS2_NAME,
AS2MessageStructure.PLAIN,
- ContentType.create(AS2MediaType.APPLICATION_EDIFACT, StandardCharsets.US_ASCII), null, null, null, null,
+ AS2MediaType.APPLICATION_EDIFACT, null, null, null, null, null,
null, DISPOSITION_NOTIFICATION_TO, SIGNED_RECEIPT_MIC_ALGORITHMS, null, null, null, null);
MockEndpoint mockEndpoint = getMockEndpoint("mock:as2RcvMsgs");
@@ -510,7 +509,7 @@ public class AS2ServerManagerIT extends AS2ServerManagerITBase {
//Testing MDN parameter defaults
HttpCoreContext response
= clientManager.send(EDI_MESSAGE, REQUEST_URI, SUBJECT, FROM, AS2_NAME, AS2_NAME, AS2MessageStructure.PLAIN,
- ContentType.create(AS2MediaType.APPLICATION_EDIFACT, StandardCharsets.US_ASCII), null, null, null, null,
+ AS2MediaType.APPLICATION_EDIFACT, null, null, null, null, null,
null, DISPOSITION_NOTIFICATION_TO, SIGNED_RECEIPT_MIC_ALGORITHMS, null, null, null, null);
assertEquals(new AS2Configuration().getServer(), response.getResponse().getFirstHeader(AS2Header.FROM).getValue(),
@@ -521,7 +520,7 @@ public class AS2ServerManagerIT extends AS2ServerManagerITBase {
//Testing MDN parameter overwrites
response = clientManager.send(EDI_MESSAGE, REQUEST_URI + "mdnTest", SUBJECT, FROM, AS2_NAME, AS2_NAME,
AS2MessageStructure.PLAIN,
- ContentType.create(AS2MediaType.APPLICATION_EDIFACT, StandardCharsets.US_ASCII), null, null, null, null,
+ AS2MediaType.APPLICATION_EDIFACT, null, null, null, null, null,
null, DISPOSITION_NOTIFICATION_TO, SIGNED_RECEIPT_MIC_ALGORITHMS, null, null, null, null);
assertEquals("MdnTestFrom", response.getResponse().getFirstHeader(AS2Header.FROM).getValue(),
diff --git a/components/camel-as2/camel-as2-component/src/test/java/org/apache/camel/component/as2/AS2ServerManagerITBase.java b/components/camel-as2/camel-as2-component/src/test/java/org/apache/camel/component/as2/AS2ServerManagerITBase.java
index 5cc4e30d30f..ebe71303f64 100644
--- a/components/camel-as2/camel-as2-component/src/test/java/org/apache/camel/component/as2/AS2ServerManagerITBase.java
+++ b/components/camel-as2/camel-as2-component/src/test/java/org/apache/camel/component/as2/AS2ServerManagerITBase.java
@@ -95,7 +95,7 @@ public class AS2ServerManagerITBase extends AbstractAS2ITSupport {
protected static final String FROM = "mrAS@example.org";
protected static final String CLIENT_FQDN = "example.org";
protected static final String DISPOSITION_NOTIFICATION_TO = "mrAS@example.org";
- protected static final String[] SIGNED_RECEIPT_MIC_ALGORITHMS = new String[] { "sha1", "md5" };
+ protected static final String SIGNED_RECEIPT_MIC_ALGORITHMS = "sha1,md5";
protected static final String EDI_MESSAGE = "UNB+UNOA:1+005435656:1+006415160:1+060515:1434+00000000000778'\n"
+ "UNH+00000000000117+INVOIC:D:97B:UN'\n"
+ "BGM+380+342459+9'\n"
diff --git a/components/camel-as2/camel-as2-component/src/test/java/org/apache/camel/component/as2/AS2ServerSecTestBase.java b/components/camel-as2/camel-as2-component/src/test/java/org/apache/camel/component/as2/AS2ServerSecTestBase.java
index f2c3f258581..42e1b55f5e8 100644
--- a/components/camel-as2/camel-as2-component/src/test/java/org/apache/camel/component/as2/AS2ServerSecTestBase.java
+++ b/components/camel-as2/camel-as2-component/src/test/java/org/apache/camel/component/as2/AS2ServerSecTestBase.java
@@ -17,7 +17,6 @@
package org.apache.camel.component.as2;
import java.io.IOException;
-import java.nio.charset.StandardCharsets;
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.security.PrivateKey;
@@ -42,7 +41,6 @@ import org.apache.camel.component.as2.api.entity.DispositionNotificationMultipar
import org.apache.camel.component.as2.api.util.MicUtils;
import org.apache.hc.core5.http.ClassicHttpRequest;
import org.apache.hc.core5.http.ClassicHttpResponse;
-import org.apache.hc.core5.http.ContentType;
import org.apache.hc.core5.http.HttpEntity;
import org.apache.hc.core5.http.HttpException;
import org.apache.hc.core5.http.HttpRequest;
@@ -72,7 +70,7 @@ public class AS2ServerSecTestBase extends AbstractAS2ITSupport {
protected static final String FROM = "mrAS@example.org";
protected static final String CLIENT_FQDN = "example.org";
protected static final String DISPOSITION_NOTIFICATION_TO = "mrAS@example.org";
- protected static final String[] SIGNED_RECEIPT_MIC_ALGORITHMS = new String[] { "sha1", "md5" };
+ protected static final String SIGNED_RECEIPT_MIC_ALGORITHMS = "sha1,md5";
protected static final String EDI_MESSAGE = "UNB+UNOA:1+005435656:1+006415160:1+060515:1434+00000000000778'\n"
+ "UNH+00000000000117+INVOIC:D:97B:UN'\n"
+ "BGM+380+342459+9'\n"
@@ -218,7 +216,7 @@ public class AS2ServerSecTestBase extends AbstractAS2ITSupport {
return clientConnection().send(EDI_MESSAGE, REQUEST_URI, SUBJECT, FROM, AS2_NAME, AS2_NAME,
structure,
- ContentType.create(AS2MediaType.APPLICATION_EDIFACT, StandardCharsets.US_ASCII), null,
+ AS2MediaType.APPLICATION_EDIFACT, null, null,
signingAlgorithm, signingCertificate, signingPrivateKey, compressionAlgorithm,
DISPOSITION_NOTIFICATION_TO, SIGNED_RECEIPT_MIC_ALGORITHMS, encryptionAlgorithm,
encryptingCertificate, null, null);
diff --git a/components/camel-as2/camel-as2-component/src/test/java/org/apache/camel/component/as2/CreateEndpointManualIssueTest.java b/components/camel-as2/camel-as2-component/src/test/java/org/apache/camel/component/as2/CreateEndpointManualIssueTest.java
index b7284af2737..7bf89fae995 100644
--- a/components/camel-as2/camel-as2-component/src/test/java/org/apache/camel/component/as2/CreateEndpointManualIssueTest.java
+++ b/components/camel-as2/camel-as2-component/src/test/java/org/apache/camel/component/as2/CreateEndpointManualIssueTest.java
@@ -16,8 +16,6 @@
*/
package org.apache.camel.component.as2;
-import java.nio.charset.Charset;
-
import org.apache.camel.CamelContext;
import org.apache.camel.Exchange;
import org.apache.camel.component.as2.api.AS2MessageStructure;
@@ -37,9 +35,6 @@ public class CreateEndpointManualIssueTest {
CamelContext camelContext = new DefaultCamelContext();
camelContext.start();
- org.apache.hc.core5.http.ContentType contentTypeEdifact
- = org.apache.hc.core5.http.ContentType.create("application/edifact", (Charset) null);
-
String methodName = "send";
AS2ApiName as2ApiNameClient = AS2ApiName.CLIENT;
@@ -52,7 +47,7 @@ public class CreateEndpointManualIssueTest {
endpointConfiguration.setAs2Version("1.0");
endpointConfiguration.setAs2To("mendelsontestAS2");
endpointConfiguration.setAs2From("mycompanyAS2");
- endpointConfiguration.setEdiMessageType(contentTypeEdifact);
+ endpointConfiguration.setEdiMessageType("application/edifact");
endpointConfiguration.setFrom("dk2kEdi");
endpointConfiguration.setSubject("mysubject");
endpointConfiguration.setSigningAlgorithm(AS2SignatureAlgorithm.MD2WITHRSA);
@@ -77,7 +72,7 @@ public class CreateEndpointManualIssueTest {
Throwable cause = out.getException();
Assertions.assertNotNull(cause);
- Assertions.assertTrue(cause.getMessage().contains("Missing properties for send, need one or more from (10 args)"));
+ Assertions.assertTrue(cause.getMessage().contains("Missing properties for send, need one or more from (11 args)"));
Assertions.assertFalse(cause.getMessage().contains("ediMessageType"));
}
}
diff --git a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_11.adoc b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_11.adoc
index 1339a049bc7..4d5d03a6af7 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_11.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_11.adoc
@@ -76,6 +76,15 @@ And if so, your custom code may need to be changed slightly as well.
The file name header `Exchange.FILE_NAME` now includes the relative path such as `subdir/hello.txt`
when using `recursive=true`, to be similar to how `camel-file` component behaves.
+=== camel-as2
+
+The `camel-as2` component has been made more tooling friendly to configure options.
+
+The option `signedReceiptMicAlgorithms` is changed from a `String[]` to a single `String` using comma to separate algorithm names.
+
+The option `ediMessageType` is changed from `ContentType` into two options as `String` fields.
+This allows to define the content-type and charset separately and more user-friendly.
+
=== camel-kafka
The camel-kafka option `recordMetadata` has changed default from `true` to `false`.
@@ -95,3 +104,4 @@ When inserting or updating many rows in `batch=true` mode (producer) then this c
has been optimized to execute the entire batch operation in a single transaction; by turning off auto-commit
on the SQL Connection, and doing a manual `commit` or `rollback`. This can dramatically improve performance
on some databases. The old behaviour can be restored by setting the `batchAutoCommitDisabled=false` on the component or endpoint.
+
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/AS2EndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/AS2EndpointBuilderFactory.java
index b89d282c0e8..b0d5715a93c 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/AS2EndpointBuilderFactory.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/AS2EndpointBuilderFactory.java
@@ -228,41 +228,39 @@ public interface AS2EndpointBuilderFactory {
return this;
}
/**
- * The transfer encoding of EDI message.
+ * The charset of the content type of EDI message.
*
* The option is a: <code>java.lang.String</code> type.
*
+ * Default: us-ascii
* Group: common
*
- * @param ediMessageTransferEncoding the value to set
+ * @param ediMessageCharset the value to set
* @return the dsl builder
*/
- default AS2EndpointConsumerBuilder ediMessageTransferEncoding(String ediMessageTransferEncoding) {
- doSetProperty("ediMessageTransferEncoding", ediMessageTransferEncoding);
+ default AS2EndpointConsumerBuilder ediMessageCharset(String ediMessageCharset) {
+ doSetProperty("ediMessageCharset", ediMessageCharset);
return this;
}
/**
- * The content type of EDI message. One of application/edifact,
- * application/edi-x12, application/edi-consent, application/xml.
+ * The transfer encoding of EDI message.
*
- * The option is a: <code>org.apache.hc.core5.http.ContentType</code>
- * type.
+ * The option is a: <code>java.lang.String</code> type.
*
* Group: common
*
- * @param ediMessageType the value to set
+ * @param ediMessageTransferEncoding the value to set
* @return the dsl builder
*/
- default AS2EndpointConsumerBuilder ediMessageType(org.apache.hc.core5.http.ContentType ediMessageType) {
- doSetProperty("ediMessageType", ediMessageType);
+ default AS2EndpointConsumerBuilder ediMessageTransferEncoding(String ediMessageTransferEncoding) {
+ doSetProperty("ediMessageTransferEncoding", ediMessageTransferEncoding);
return this;
}
/**
* The content type of EDI message. One of application/edifact,
* application/edi-x12, application/edi-consent, application/xml.
*
- * The option will be converted to a
- * <code>org.apache.hc.core5.http.ContentType</code> type.
+ * The option is a: <code>java.lang.String</code> type.
*
* Group: common
*
@@ -757,27 +755,10 @@ public interface AS2EndpointBuilderFactory {
}
/**
* The list of algorithms, in order of preference, requested to generate
- * a message integrity check (MIC) returned in message dispostion
- * notification (MDN).
- *
- * The option is a: <code>java.lang.String[]</code> type.
+ * a message integrity check (MIC) returned in message disposition
+ * notification (MDN). Multiple algorithms can be separated by comma.
*
- * Group: security
- *
- * @param signedReceiptMicAlgorithms the value to set
- * @return the dsl builder
- */
- default AS2EndpointConsumerBuilder signedReceiptMicAlgorithms(String[] signedReceiptMicAlgorithms) {
- doSetProperty("signedReceiptMicAlgorithms", signedReceiptMicAlgorithms);
- return this;
- }
- /**
- * The list of algorithms, in order of preference, requested to generate
- * a message integrity check (MIC) returned in message dispostion
- * notification (MDN).
- *
- * The option will be converted to a <code>java.lang.String[]</code>
- * type.
+ * The option is a: <code>java.lang.String</code> type.
*
* Group: security
*
@@ -1186,41 +1167,39 @@ public interface AS2EndpointBuilderFactory {
return this;
}
/**
- * The transfer encoding of EDI message.
+ * The charset of the content type of EDI message.
*
* The option is a: <code>java.lang.String</code> type.
*
+ * Default: us-ascii
* Group: common
*
- * @param ediMessageTransferEncoding the value to set
+ * @param ediMessageCharset the value to set
* @return the dsl builder
*/
- default AS2EndpointProducerBuilder ediMessageTransferEncoding(String ediMessageTransferEncoding) {
- doSetProperty("ediMessageTransferEncoding", ediMessageTransferEncoding);
+ default AS2EndpointProducerBuilder ediMessageCharset(String ediMessageCharset) {
+ doSetProperty("ediMessageCharset", ediMessageCharset);
return this;
}
/**
- * The content type of EDI message. One of application/edifact,
- * application/edi-x12, application/edi-consent, application/xml.
+ * The transfer encoding of EDI message.
*
- * The option is a: <code>org.apache.hc.core5.http.ContentType</code>
- * type.
+ * The option is a: <code>java.lang.String</code> type.
*
* Group: common
*
- * @param ediMessageType the value to set
+ * @param ediMessageTransferEncoding the value to set
* @return the dsl builder
*/
- default AS2EndpointProducerBuilder ediMessageType(org.apache.hc.core5.http.ContentType ediMessageType) {
- doSetProperty("ediMessageType", ediMessageType);
+ default AS2EndpointProducerBuilder ediMessageTransferEncoding(String ediMessageTransferEncoding) {
+ doSetProperty("ediMessageTransferEncoding", ediMessageTransferEncoding);
return this;
}
/**
* The content type of EDI message. One of application/edifact,
* application/edi-x12, application/edi-consent, application/xml.
*
- * The option will be converted to a
- * <code>org.apache.hc.core5.http.ContentType</code> type.
+ * The option is a: <code>java.lang.String</code> type.
*
* Group: common
*
@@ -1715,27 +1694,10 @@ public interface AS2EndpointBuilderFactory {
}
/**
* The list of algorithms, in order of preference, requested to generate
- * a message integrity check (MIC) returned in message dispostion
- * notification (MDN).
- *
- * The option is a: <code>java.lang.String[]</code> type.
- *
- * Group: security
+ * a message integrity check (MIC) returned in message disposition
+ * notification (MDN). Multiple algorithms can be separated by comma.
*
- * @param signedReceiptMicAlgorithms the value to set
- * @return the dsl builder
- */
- default AS2EndpointProducerBuilder signedReceiptMicAlgorithms(String[] signedReceiptMicAlgorithms) {
- doSetProperty("signedReceiptMicAlgorithms", signedReceiptMicAlgorithms);
- return this;
- }
- /**
- * The list of algorithms, in order of preference, requested to generate
- * a message integrity check (MIC) returned in message dispostion
- * notification (MDN).
- *
- * The option will be converted to a <code>java.lang.String[]</code>
- * type.
+ * The option is a: <code>java.lang.String</code> type.
*
* Group: security
*
@@ -2125,41 +2087,39 @@ public interface AS2EndpointBuilderFactory {
return this;
}
/**
- * The transfer encoding of EDI message.
+ * The charset of the content type of EDI message.
*
* The option is a: <code>java.lang.String</code> type.
*
+ * Default: us-ascii
* Group: common
*
- * @param ediMessageTransferEncoding the value to set
+ * @param ediMessageCharset the value to set
* @return the dsl builder
*/
- default AS2EndpointBuilder ediMessageTransferEncoding(String ediMessageTransferEncoding) {
- doSetProperty("ediMessageTransferEncoding", ediMessageTransferEncoding);
+ default AS2EndpointBuilder ediMessageCharset(String ediMessageCharset) {
+ doSetProperty("ediMessageCharset", ediMessageCharset);
return this;
}
/**
- * The content type of EDI message. One of application/edifact,
- * application/edi-x12, application/edi-consent, application/xml.
+ * The transfer encoding of EDI message.
*
- * The option is a: <code>org.apache.hc.core5.http.ContentType</code>
- * type.
+ * The option is a: <code>java.lang.String</code> type.
*
* Group: common
*
- * @param ediMessageType the value to set
+ * @param ediMessageTransferEncoding the value to set
* @return the dsl builder
*/
- default AS2EndpointBuilder ediMessageType(org.apache.hc.core5.http.ContentType ediMessageType) {
- doSetProperty("ediMessageType", ediMessageType);
+ default AS2EndpointBuilder ediMessageTransferEncoding(String ediMessageTransferEncoding) {
+ doSetProperty("ediMessageTransferEncoding", ediMessageTransferEncoding);
return this;
}
/**
* The content type of EDI message. One of application/edifact,
* application/edi-x12, application/edi-consent, application/xml.
*
- * The option will be converted to a
- * <code>org.apache.hc.core5.http.ContentType</code> type.
+ * The option is a: <code>java.lang.String</code> type.
*
* Group: common
*
@@ -2654,27 +2614,10 @@ public interface AS2EndpointBuilderFactory {
}
/**
* The list of algorithms, in order of preference, requested to generate
- * a message integrity check (MIC) returned in message dispostion
- * notification (MDN).
- *
- * The option is a: <code>java.lang.String[]</code> type.
- *
- * Group: security
- *
- * @param signedReceiptMicAlgorithms the value to set
- * @return the dsl builder
- */
- default AS2EndpointBuilder signedReceiptMicAlgorithms(String[] signedReceiptMicAlgorithms) {
- doSetProperty("signedReceiptMicAlgorithms", signedReceiptMicAlgorithms);
- return this;
- }
- /**
- * The list of algorithms, in order of preference, requested to generate
- * a message integrity check (MIC) returned in message dispostion
- * notification (MDN).
+ * a message integrity check (MIC) returned in message disposition
+ * notification (MDN). Multiple algorithms can be separated by comma.
*
- * The option will be converted to a <code>java.lang.String[]</code>
- * type.
+ * The option is a: <code>java.lang.String</code> type.
*
* Group: security
*