This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 51a840caaa4 CAMEL-21974: camel-j8583: ISO-8583 data format (#18655)
51a840caaa4 is described below
commit 51a840caaa4c20e50f4220ff1f569c343d214047
Author: Claus Ibsen <[email protected]>
AuthorDate: Sun Jul 20 10:30:15 2025 +0200
CAMEL-21974: camel-j8583: ISO-8583 data format (#18655)
* CAMEL-21974: camel-j8583: ISO-8583 data format
---
bom/camel-bom/pom.xml | 5 +
catalog/camel-allcomponents/pom.xml | 5 +
.../apache/camel/catalog/dataformats.properties | 1 +
.../apache/camel/catalog/dataformats/iso8583.json | 24 +++
.../apache/camel/catalog/dataformats/swiftMt.json | 2 +-
.../apache/camel/catalog/dataformats/swiftMx.json | 2 +-
.../org/apache/camel/catalog/models.properties | 1 +
.../catalog/models/dataFormatTransformer.json | 2 +-
.../apache/camel/catalog/models/dataFormats.json | 2 +-
.../org/apache/camel/catalog/models/iso8583.json | 21 +++
.../org/apache/camel/catalog/models/marshal.json | 2 +-
.../org/apache/camel/catalog/models/swiftMt.json | 2 +-
.../org/apache/camel/catalog/models/swiftMx.json | 2 +-
.../org/apache/camel/catalog/models/unmarshal.json | 2 +-
.../apache/camel/catalog/schemas/camel-spring.xsd | 47 ++++++
.../apache/camel/catalog/schemas/camel-xml-io.xsd | 47 ++++++
components/camel-iso8583/pom.xml | 59 +++++++
.../iso8583/Iso8583DataFormatConfigurer.java | 32 ++++
.../apache/camel/dataformat/iso8583/iso8583.json | 24 +++
.../org/apache/camel/configurer/iso8583-dataformat | 2 +
.../org/apache/camel/dataformat.properties | 7 +
.../services/org/apache/camel/dataformat/iso8583 | 2 +
.../src/main/docs/iso8583-dataformat.adoc | 71 ++++++++
.../camel/dataformat/iso8583/Iso8583Constants.java | 26 +++
.../dataformat/iso8583/Iso8583DataFormat.java | 132 +++++++++++++++
.../dataformat/iso8583/Iso8583DataFormatTest.java | 82 +++++++++
.../src/test/resources/j8583-config.xml | 188 +++++++++++++++++++++
.../src/test/resources/log4j2.properties | 28 +++
.../camel-iso8583/src/test/resources/parse1.txt | 2 +
.../apache/camel/dataformat/swift/mt/swiftMt.json | 2 +-
.../apache/camel/dataformat/swift/mx/swiftMx.json | 2 +-
components/pom.xml | 1 +
.../apache/camel/model/dataformat/dataFormats.json | 2 +-
.../org/apache/camel/model/dataformat/iso8583.json | 21 +++
.../org/apache/camel/model/dataformat/swiftMt.json | 2 +-
.../org/apache/camel/model/dataformat/swiftMx.json | 2 +-
.../META-INF/org/apache/camel/model/marshal.json | 2 +-
.../model/transformer/dataFormatTransformer.json | 2 +-
.../META-INF/org/apache/camel/model/unmarshal.json | 2 +-
.../services/org/apache/camel/model.properties | 1 +
.../org/apache/camel/model/dataformat/jaxb.index | 1 +
.../camel/builder/DataFormatBuilderFactory.java | 8 +
.../org/apache/camel/builder/DataFormatClause.java | 19 +++
.../org/apache/camel/model/MarshalDefinition.java | 2 +
.../apache/camel/model/UnmarshalDefinition.java | 2 +
.../model/dataformat/DataFormatsDefinition.java | 1 +
.../camel/model/dataformat/Iso8583DataFormat.java | 125 ++++++++++++++
.../camel/model/dataformat/SwiftMtDataFormat.java | 2 +-
.../camel/model/dataformat/SwiftMxDataFormat.java | 2 +-
.../DataFormatTransformerDefinition.java | 2 +
.../reifier/dataformat/DataFormatReifier.java | 2 +
.../dataformat/Iso8583DataFormatReifier.java | 37 ++++
.../org/apache/camel/main/dataformats.properties | 1 +
.../java/org/apache/camel/xml/in/ModelParser.java | 9 +
.../java/org/apache/camel/xml/out/ModelWriter.java | 15 ++
.../org/apache/camel/yaml/out/ModelWriter.java | 15 ++
.../modules/dataformats/examples/json/iso8583.json | 1 +
docs/components/modules/dataformats/nav.adoc | 1 +
.../dataformats/pages/iso8583-dataformat.adoc | 1 +
.../dsl/yaml/deserializers/ModelDeserializers.java | 87 ++++++++++
.../deserializers/ModelDeserializersResolver.java | 2 +
.../generated/resources/schema/camelYamlDsl.json | 65 +++++++
parent/pom.xml | 6 +
63 files changed, 1249 insertions(+), 18 deletions(-)
diff --git a/bom/camel-bom/pom.xml b/bom/camel-bom/pom.xml
index f96383aca76..dc14487e82b 100644
--- a/bom/camel-bom/pom.xml
+++ b/bom/camel-bom/pom.xml
@@ -1067,6 +1067,11 @@
<artifactId>camel-ironmq</artifactId>
<version>4.14.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-iso8583</artifactId>
+ <version>4.14.0-SNAPSHOT</version>
+ </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jackson</artifactId>
diff --git a/catalog/camel-allcomponents/pom.xml
b/catalog/camel-allcomponents/pom.xml
index 9983046e6ac..ff7174fccb4 100644
--- a/catalog/camel-allcomponents/pom.xml
+++ b/catalog/camel-allcomponents/pom.xml
@@ -931,6 +931,11 @@
<artifactId>camel-ironmq</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-iso8583</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jackson</artifactId>
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats.properties
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats.properties
index d62e820b8bb..ac36ca06f71 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats.properties
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats.properties
@@ -21,6 +21,7 @@ gson
gzipDeflater
hl7
ical
+iso8583
jackson
jacksonXml
jaxb
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/iso8583.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/iso8583.json
new file mode 100644
index 00000000000..5564e4393e6
--- /dev/null
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/iso8583.json
@@ -0,0 +1,24 @@
+{
+ "dataformat": {
+ "kind": "dataformat",
+ "name": "iso8583",
+ "title": "ISO-8583",
+ "description": "Create, edit and read ISO-8583 messages.",
+ "deprecated": false,
+ "firstVersion": "4.14.0",
+ "label": "dataformat,transformation,finance",
+ "javaType": "org.apache.camel.dataformat.iso8583.Iso8583DataFormat",
+ "supportLevel": "Preview",
+ "groupId": "org.apache.camel",
+ "artifactId": "camel-iso8583",
+ "version": "4.14.0-SNAPSHOT",
+ "modelName": "iso8583",
+ "modelJavaType": "org.apache.camel.model.dataformat.Iso8583DataFormat"
+ },
+ "properties": {
+ "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group":
"common", "required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": false, "description": "The
id of this node" },
+ "configFile": { "index": 1, "kind": "attribute", "displayName": "Config
File", "group": "common", "required": false, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": "j8583-config.xml", "description": "The j8583 configuration
file to load from classpath" },
+ "isoType": { "index": 2, "kind": "attribute", "displayName": "Iso Type",
"group": "common", "required": false, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "autowired": false, "secret": false,
"description": "The default ISO-Type to use" },
+ "allowAutoWiredMessageFormat": { "index": 3, "kind": "attribute",
"displayName": "Allow Auto Wired Message Format", "group": "advanced", "label":
"advanced", "required": false, "type": "boolean", "javaType":
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": true, "description": "Whether to auto-discover
com.solab.iso8583.MessageFactory from the registry" }
+ }
+}
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/swiftMt.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/swiftMt.json
index 451d6c606f3..b55c6517394 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/swiftMt.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/swiftMt.json
@@ -6,7 +6,7 @@
"description": "Encode and decode SWIFT MT messages.",
"deprecated": false,
"firstVersion": "3.20.0",
- "label": "dataformat,transformation,swift",
+ "label": "dataformat,transformation,finance",
"javaType": "org.apache.camel.dataformat.swift.mt.SwiftMtDataFormat",
"supportLevel": "Stable",
"groupId": "org.apache.camel",
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/swiftMx.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/swiftMx.json
index ebe7c6abe5e..21a13a66a1d 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/swiftMx.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/swiftMx.json
@@ -6,7 +6,7 @@
"description": "Encode and decode SWIFT MX messages.",
"deprecated": false,
"firstVersion": "3.20.0",
- "label": "dataformat,transformation,swift",
+ "label": "dataformat,transformation,finance",
"javaType": "org.apache.camel.dataformat.swift.mx.SwiftMxDataFormat",
"supportLevel": "Stable",
"groupId": "org.apache.camel",
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models.properties
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models.properties
index 0ce8d255658..a824299d6f3 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models.properties
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models.properties
@@ -78,6 +78,7 @@ inputType
intercept
interceptFrom
interceptSendToEndpoint
+iso8583
jacksonXml
java
jaxb
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/dataFormatTransformer.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/dataFormatTransformer.json
index 90a3339ce27..5ed0d9342c5 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/dataFormatTransformer.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/dataFormatTransformer.json
@@ -12,7 +12,7 @@
"output": false
},
"properties": {
- "dataFormatType": { "index": 0, "kind": "element", "displayName": "Data
Format Type", "group": "common", "required": true, "type": "object",
"javaType": "org.apache.camel.model.DataFormatDefinition", "oneOf": [ "asn1",
"avro", "barcode", "base64", "beanio", "bindy", "cbor", "crypto", "csv",
"custom", "fhirJson", "fhirXml", "flatpack", "fory", "grok", "gzipDeflater",
"hl7", "ical", "jacksonXml", "jaxb", "json", "jsonApi", "lzf", "mimeMultipart",
"parquetAvro", "pgp", "protobuf", "rss" [...]
+ "dataFormatType": { "index": 0, "kind": "element", "displayName": "Data
Format Type", "group": "common", "required": true, "type": "object",
"javaType": "org.apache.camel.model.DataFormatDefinition", "oneOf": [ "asn1",
"avro", "barcode", "base64", "beanio", "bindy", "cbor", "crypto", "csv",
"custom", "fhirJson", "fhirXml", "flatpack", "fory", "grok", "gzipDeflater",
"hl7", "ical", "iso8583", "jacksonXml", "jaxb", "json", "jsonApi", "lzf",
"mimeMultipart", "parquetAvro", "pgp", "proto [...]
"scheme": { "index": 1, "kind": "attribute", "displayName": "Scheme",
"group": "common", "required": false, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "autowired": false, "secret": false,
"description": "Set a scheme name supported by the transformer. If you specify
'csv', the transformer will be picked up for all of 'csv' from\/to Java
transformation. Note that the scheme matching is performed only when no exactly
matched transformer exists." },
"name": { "index": 2, "kind": "attribute", "displayName": "Name", "group":
"common", "required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": false, "description": "Set
the transformer name under which the transformer gets referenced when
specifying the input\/output data type on routes. If you specify a transformer
name that matches a data type scheme like 'csv' the transformer will be picked
up for all of 'csv:' from\/t [...]
"fromType": { "index": 3, "kind": "attribute", "displayName": "From Type",
"group": "common", "required": false, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "autowired": false, "secret": false,
"description": "Set the 'from' data type name. If you specify 'xml:XYZ', the
transformer will be picked up if source type is 'xml:XYZ'. If you specify just
'xml', the transformer matches with all of 'xml' source type like 'xml:ABC' or
'xml:DEF'." },
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/dataFormats.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/dataFormats.json
index 4eb58384efd..0958ba7eb64 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/dataFormats.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/dataFormats.json
@@ -12,6 +12,6 @@
"output": false
},
"properties": {
- "dataFormats": { "index": 0, "kind": "element", "displayName": "Data
Formats", "group": "common", "required": true, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.DataFormatDefinition>", "oneOf": [
"asn1", "avro", "barcode", "base64", "beanio", "bindy", "cbor", "crypto",
"csv", "custom", "fhirJson", "fhirXml", "flatpack", "fory", "grok",
"gzipDeflater", "hl7", "ical", "jacksonXml", "jaxb", "json", "jsonApi", "lzf",
"mimeMultipart", "parquetAvro", "pgp", "protobuf [...]
+ "dataFormats": { "index": 0, "kind": "element", "displayName": "Data
Formats", "group": "common", "required": true, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.DataFormatDefinition>", "oneOf": [
"asn1", "avro", "barcode", "base64", "beanio", "bindy", "cbor", "crypto",
"csv", "custom", "fhirJson", "fhirXml", "flatpack", "fory", "grok",
"gzipDeflater", "hl7", "ical", "iso8583", "jacksonXml", "jaxb", "json",
"jsonApi", "lzf", "mimeMultipart", "parquetAvro", "pgp" [...]
}
}
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/iso8583.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/iso8583.json
new file mode 100644
index 00000000000..48a115416e7
--- /dev/null
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/iso8583.json
@@ -0,0 +1,21 @@
+{
+ "model": {
+ "kind": "model",
+ "name": "iso8583",
+ "title": "ISO-8583",
+ "description": "Create, edit and read ISO-8583 messages.",
+ "deprecated": false,
+ "firstVersion": "4.14.0",
+ "label": "dataformat,transformation,finance",
+ "javaType": "org.apache.camel.model.dataformat.Iso8583DataFormat",
+ "abstract": false,
+ "input": false,
+ "output": false
+ },
+ "properties": {
+ "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group":
"common", "required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": false, "description": "The
id of this node" },
+ "configFile": { "index": 1, "kind": "attribute", "displayName": "Config
File", "group": "common", "required": false, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": "j8583-config.xml", "description": "The j8583 configuration
file to load from classpath" },
+ "isoType": { "index": 2, "kind": "attribute", "displayName": "Iso Type",
"group": "common", "required": false, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "autowired": false, "secret": false,
"description": "The default ISO-Type to use" },
+ "allowAutoWiredMessageFormat": { "index": 3, "kind": "attribute",
"displayName": "Allow Auto Wired Message Format", "group": "advanced", "label":
"advanced", "required": false, "type": "boolean", "javaType":
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": true, "description": "Whether to auto-discover
com.solab.iso8583.MessageFactory from the registry" }
+ }
+}
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/marshal.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/marshal.json
index 1125fc01435..ddcb905d00c 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/marshal.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/marshal.json
@@ -15,7 +15,7 @@
"id": { "index": 0, "kind": "attribute", "displayName": "Id", "group":
"common", "required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": false, "description": "Sets
the id of this node" },
"description": { "index": 1, "kind": "attribute", "displayName":
"Description", "group": "common", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "Sets the description of this node" },
"disabled": { "index": 2, "kind": "attribute", "displayName": "Disabled",
"group": "advanced", "label": "advanced", "required": false, "type": "boolean",
"javaType": "java.lang.Boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": false, "description": "Whether to disable this
EIP from the route during build time. Once an EIP has been disabled then it
cannot be enabled later at runtime." },
- "dataFormatType": { "index": 3, "kind": "element", "displayName": "Data
Format Type", "group": "common", "required": true, "type": "object",
"javaType": "org.apache.camel.model.DataFormatDefinition", "oneOf": [ "asn1",
"avro", "barcode", "base64", "beanio", "bindy", "cbor", "crypto", "csv",
"custom", "dfdl", "fhirJson", "fhirXml", "flatpack", "fory", "grok",
"gzipDeflater", "hl7", "ical", "jacksonXml", "jaxb", "json", "jsonApi", "lzf",
"mimeMultipart", "parquetAvro", "pgp", "protobuf [...]
+ "dataFormatType": { "index": 3, "kind": "element", "displayName": "Data
Format Type", "group": "common", "required": true, "type": "object",
"javaType": "org.apache.camel.model.DataFormatDefinition", "oneOf": [ "asn1",
"avro", "barcode", "base64", "beanio", "bindy", "cbor", "crypto", "csv",
"custom", "dfdl", "fhirJson", "fhirXml", "flatpack", "fory", "grok",
"gzipDeflater", "hl7", "ical", "iso8583", "jacksonXml", "jaxb", "json",
"jsonApi", "lzf", "mimeMultipart", "parquetAvro", "pgp" [...]
"variableSend": { "index": 4, "kind": "attribute", "displayName":
"Variable Send", "group": "common", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "To use a variable as the source for the
message body to send. This makes it handy to use variables for user data and to
easily control what data to use for sending and receiving. Important: When
using send variable then the message body is tak [...]
"variableReceive": { "index": 5, "kind": "attribute", "displayName":
"Variable Receive", "group": "common", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "To use a variable to store the received
message body (only body, not headers). This makes it handy to use variables for
user data and to easily control what data to use for sending and receiving.
Important: When using receive variable th [...]
}
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/swiftMt.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/swiftMt.json
index e603e1c1b83..039a14a2c32 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/swiftMt.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/swiftMt.json
@@ -6,7 +6,7 @@
"description": "Encode and decode SWIFT MT messages.",
"deprecated": false,
"firstVersion": "3.20.0",
- "label": "dataformat,transformation,swift",
+ "label": "dataformat,transformation,finance",
"javaType": "org.apache.camel.model.dataformat.SwiftMtDataFormat",
"abstract": false,
"input": false,
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/swiftMx.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/swiftMx.json
index 8329743cad0..e54c670fa7e 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/swiftMx.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/swiftMx.json
@@ -6,7 +6,7 @@
"description": "Encode and decode SWIFT MX messages.",
"deprecated": false,
"firstVersion": "3.20.0",
- "label": "dataformat,transformation,swift",
+ "label": "dataformat,transformation,finance",
"javaType": "org.apache.camel.model.dataformat.SwiftMxDataFormat",
"abstract": false,
"input": false,
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/unmarshal.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/unmarshal.json
index 6de9ae5e296..e3321e34c13 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/unmarshal.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/unmarshal.json
@@ -15,7 +15,7 @@
"id": { "index": 0, "kind": "attribute", "displayName": "Id", "group":
"common", "required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": false, "description": "Sets
the id of this node" },
"description": { "index": 1, "kind": "attribute", "displayName":
"Description", "group": "common", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "Sets the description of this node" },
"disabled": { "index": 2, "kind": "attribute", "displayName": "Disabled",
"group": "advanced", "label": "advanced", "required": false, "type": "boolean",
"javaType": "java.lang.Boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": false, "description": "Whether to disable this
EIP from the route during build time. Once an EIP has been disabled then it
cannot be enabled later at runtime." },
- "dataFormatType": { "index": 3, "kind": "element", "displayName": "Data
Format Type", "group": "common", "required": true, "type": "object",
"javaType": "org.apache.camel.model.DataFormatDefinition", "oneOf": [ "asn1",
"avro", "barcode", "base64", "beanio", "bindy", "cbor", "crypto", "csv",
"custom", "dfdl", "fhirJson", "fhirXml", "flatpack", "fory", "grok",
"gzipDeflater", "hl7", "ical", "jacksonXml", "jaxb", "json", "jsonApi", "lzf",
"mimeMultipart", "parquetAvro", "pgp", "protobuf [...]
+ "dataFormatType": { "index": 3, "kind": "element", "displayName": "Data
Format Type", "group": "common", "required": true, "type": "object",
"javaType": "org.apache.camel.model.DataFormatDefinition", "oneOf": [ "asn1",
"avro", "barcode", "base64", "beanio", "bindy", "cbor", "crypto", "csv",
"custom", "dfdl", "fhirJson", "fhirXml", "flatpack", "fory", "grok",
"gzipDeflater", "hl7", "ical", "iso8583", "jacksonXml", "jaxb", "json",
"jsonApi", "lzf", "mimeMultipart", "parquetAvro", "pgp" [...]
"variableSend": { "index": 4, "kind": "attribute", "displayName":
"Variable Send", "group": "common", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "To use a variable as the source for the
message body to send. This makes it handy to use variables for user data and to
easily control what data to use for sending and receiving. Important: When
using send variable then the message body is tak [...]
"variableReceive": { "index": 5, "kind": "attribute", "displayName":
"Variable Receive", "group": "common", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "To use a variable to store the received
message body (only body, not headers). This makes it handy to use variables for
user data and to easily control what data to use for sending and receiving.
Important: When using receive variable th [...]
"allowNullBody": { "index": 6, "kind": "attribute", "displayName": "Allow
Null Body", "group": "advanced", "label": "advanced", "required": false,
"type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Indicates whether null is allowed as value of a body to unmarshall." }
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
index a4e34965759..8cb1de31c01 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
@@ -792,6 +792,15 @@ Intercepts incoming messages
<xs:documentation xml:lang="en">
<![CDATA[
Intercepts messages being sent to an endpoint
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="iso8583" type="tns:iso8583DataFormat">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+Create, edit and read ISO-8583 messages.
]]>
</xs:documentation>
</xs:annotation>
@@ -7555,6 +7564,7 @@ messages, or any custom logic needed before the looping
executes.
<xs:element ref="tns:gzipDeflater"/>
<xs:element ref="tns:hl7"/>
<xs:element ref="tns:ical"/>
+ <xs:element ref="tns:iso8583"/>
<xs:element ref="tns:jacksonXml"/>
<xs:element ref="tns:jaxb"/>
<xs:element ref="tns:json"/>
@@ -8990,6 +9000,40 @@ Whether to validate the HL7 message Is by default true.
Default value: true
<xs:documentation xml:lang="en">
<![CDATA[
Whether to validate. Default value: false
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="iso8583DataFormat">
+ <xs:complexContent>
+ <xs:extension base="tns:dataFormat">
+ <xs:sequence/>
+ <xs:attribute name="configFile" type="xs:string">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+The j8583 configuration file to load from classpath. Default value:
j8583-config.xml
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="isoType" type="xs:string">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+The default ISO-Type to use.
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="allowAutoWiredMessageFormat" type="xs:string">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+Whether to auto-discover com.solab.iso8583.MessageFactory from the registry.
Default value: true
]]>
</xs:documentation>
</xs:annotation>
@@ -14844,6 +14888,7 @@ To type used as a target data type in the
transformation.
<xs:element ref="tns:gzipDeflater"/>
<xs:element ref="tns:hl7"/>
<xs:element ref="tns:ical"/>
+ <xs:element ref="tns:iso8583"/>
<xs:element ref="tns:jacksonXml"/>
<xs:element ref="tns:jaxb"/>
<xs:element ref="tns:json"/>
@@ -17117,6 +17162,7 @@ Set a reference to a custom Expression to use.
<xs:element ref="tns:gzipDeflater"/>
<xs:element ref="tns:hl7"/>
<xs:element ref="tns:ical"/>
+ <xs:element ref="tns:iso8583"/>
<xs:element ref="tns:jacksonXml"/>
<xs:element ref="tns:jaxb"/>
<xs:element ref="tns:json"/>
@@ -17967,6 +18013,7 @@ Set the 'to' data type name. If you specify 'json:XYZ',
the transformer will be
<xs:element ref="tns:gzipDeflater"/>
<xs:element ref="tns:hl7"/>
<xs:element ref="tns:ical"/>
+ <xs:element ref="tns:iso8583"/>
<xs:element ref="tns:jacksonXml"/>
<xs:element ref="tns:jaxb"/>
<xs:element ref="tns:json"/>
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-xml-io.xsd
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-xml-io.xsd
index 88a0d37a2f1..957ab638f0a 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-xml-io.xsd
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-xml-io.xsd
@@ -747,6 +747,15 @@ Intercepts incoming messages
<xs:documentation xml:lang="en">
<![CDATA[
Intercepts messages being sent to an endpoint
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="iso8583" type="tns:iso8583DataFormat">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+Create, edit and read ISO-8583 messages.
]]>
</xs:documentation>
</xs:annotation>
@@ -6228,6 +6237,7 @@ messages, or any custom logic needed before the looping
executes.
<xs:element ref="tns:gzipDeflater"/>
<xs:element ref="tns:hl7"/>
<xs:element ref="tns:ical"/>
+ <xs:element ref="tns:iso8583"/>
<xs:element ref="tns:jacksonXml"/>
<xs:element ref="tns:jaxb"/>
<xs:element ref="tns:json"/>
@@ -7663,6 +7673,40 @@ Whether to validate the HL7 message Is by default true.
Default value: true
<xs:documentation xml:lang="en">
<![CDATA[
Whether to validate. Default value: false
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="iso8583DataFormat">
+ <xs:complexContent>
+ <xs:extension base="tns:dataFormat">
+ <xs:sequence/>
+ <xs:attribute name="configFile" type="xs:string">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+The j8583 configuration file to load from classpath. Default value:
j8583-config.xml
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="isoType" type="xs:string">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+The default ISO-Type to use.
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="allowAutoWiredMessageFormat" type="xs:string">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+Whether to auto-discover com.solab.iso8583.MessageFactory from the registry.
Default value: true
]]>
</xs:documentation>
</xs:annotation>
@@ -13538,6 +13582,7 @@ To type used as a target data type in the
transformation.
<xs:element ref="tns:gzipDeflater"/>
<xs:element ref="tns:hl7"/>
<xs:element ref="tns:ical"/>
+ <xs:element ref="tns:iso8583"/>
<xs:element ref="tns:jacksonXml"/>
<xs:element ref="tns:jaxb"/>
<xs:element ref="tns:json"/>
@@ -15811,6 +15856,7 @@ Set a reference to a custom Expression to use.
<xs:element ref="tns:gzipDeflater"/>
<xs:element ref="tns:hl7"/>
<xs:element ref="tns:ical"/>
+ <xs:element ref="tns:iso8583"/>
<xs:element ref="tns:jacksonXml"/>
<xs:element ref="tns:jaxb"/>
<xs:element ref="tns:json"/>
@@ -16661,6 +16707,7 @@ Set the 'to' data type name. If you specify 'json:XYZ',
the transformer will be
<xs:element ref="tns:gzipDeflater"/>
<xs:element ref="tns:hl7"/>
<xs:element ref="tns:ical"/>
+ <xs:element ref="tns:iso8583"/>
<xs:element ref="tns:jacksonXml"/>
<xs:element ref="tns:jaxb"/>
<xs:element ref="tns:json"/>
diff --git a/components/camel-iso8583/pom.xml b/components/camel-iso8583/pom.xml
new file mode 100644
index 00000000000..bc057aa6ebd
--- /dev/null
+++ b/components/camel-iso8583/pom.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>components</artifactId>
+ <version>4.14.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>camel-iso8583</artifactId>
+ <packaging>jar</packaging>
+ <name>Camel :: ISO-8583</name>
+ <description>Camel ISO-8583 support</description>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-support</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>net.sf.j8583</groupId>
+ <artifactId>j8583</artifactId>
+ <version>${j8583-version}</version>
+ </dependency>
+
+ <!-- testing -->
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-test-spring-junit5</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git
a/components/camel-iso8583/src/generated/java/org/apache/camel/dataformat/iso8583/Iso8583DataFormatConfigurer.java
b/components/camel-iso8583/src/generated/java/org/apache/camel/dataformat/iso8583/Iso8583DataFormatConfigurer.java
new file mode 100644
index 00000000000..6dc760c9bd3
--- /dev/null
+++
b/components/camel-iso8583/src/generated/java/org/apache/camel/dataformat/iso8583/Iso8583DataFormatConfigurer.java
@@ -0,0 +1,32 @@
+/* Generated by camel build tools - do NOT edit this file! */
+package org.apache.camel.dataformat.iso8583;
+
+import javax.annotation.processing.Generated;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.spi.GeneratedPropertyConfigurer;
+import org.apache.camel.support.component.PropertyConfigurerSupport;
+
+/**
+ * Generated by camel build tools - do NOT edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.PackageDataFormatMojo")
+@SuppressWarnings("unchecked")
+public class Iso8583DataFormatConfigurer extends PropertyConfigurerSupport
implements GeneratedPropertyConfigurer {
+
+ @Override
+ public boolean configure(CamelContext camelContext, Object target, String
name, Object value, boolean ignoreCase) {
+ Iso8583DataFormat dataformat = (Iso8583DataFormat) target;
+ switch (ignoreCase ? name.toLowerCase() : name) {
+ case "configfile":
+ case "configFile": dataformat.setConfigFile(property(camelContext,
java.lang.String.class, value)); return true;
+ case "isotype":
+ case "isoType": dataformat.setIsoType(property(camelContext,
java.lang.String.class, value)); return true;
+ default: return false;
+ }
+ }
+
+}
+
diff --git
a/components/camel-iso8583/src/generated/resources/META-INF/org/apache/camel/dataformat/iso8583/iso8583.json
b/components/camel-iso8583/src/generated/resources/META-INF/org/apache/camel/dataformat/iso8583/iso8583.json
new file mode 100644
index 00000000000..5564e4393e6
--- /dev/null
+++
b/components/camel-iso8583/src/generated/resources/META-INF/org/apache/camel/dataformat/iso8583/iso8583.json
@@ -0,0 +1,24 @@
+{
+ "dataformat": {
+ "kind": "dataformat",
+ "name": "iso8583",
+ "title": "ISO-8583",
+ "description": "Create, edit and read ISO-8583 messages.",
+ "deprecated": false,
+ "firstVersion": "4.14.0",
+ "label": "dataformat,transformation,finance",
+ "javaType": "org.apache.camel.dataformat.iso8583.Iso8583DataFormat",
+ "supportLevel": "Preview",
+ "groupId": "org.apache.camel",
+ "artifactId": "camel-iso8583",
+ "version": "4.14.0-SNAPSHOT",
+ "modelName": "iso8583",
+ "modelJavaType": "org.apache.camel.model.dataformat.Iso8583DataFormat"
+ },
+ "properties": {
+ "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group":
"common", "required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": false, "description": "The
id of this node" },
+ "configFile": { "index": 1, "kind": "attribute", "displayName": "Config
File", "group": "common", "required": false, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": "j8583-config.xml", "description": "The j8583 configuration
file to load from classpath" },
+ "isoType": { "index": 2, "kind": "attribute", "displayName": "Iso Type",
"group": "common", "required": false, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "autowired": false, "secret": false,
"description": "The default ISO-Type to use" },
+ "allowAutoWiredMessageFormat": { "index": 3, "kind": "attribute",
"displayName": "Allow Auto Wired Message Format", "group": "advanced", "label":
"advanced", "required": false, "type": "boolean", "javaType":
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": true, "description": "Whether to auto-discover
com.solab.iso8583.MessageFactory from the registry" }
+ }
+}
diff --git
a/components/camel-iso8583/src/generated/resources/META-INF/services/org/apache/camel/configurer/iso8583-dataformat
b/components/camel-iso8583/src/generated/resources/META-INF/services/org/apache/camel/configurer/iso8583-dataformat
new file mode 100644
index 00000000000..042a1f712c0
--- /dev/null
+++
b/components/camel-iso8583/src/generated/resources/META-INF/services/org/apache/camel/configurer/iso8583-dataformat
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.dataformat.iso8583.Iso8583DataFormatConfigurer
diff --git
a/components/camel-iso8583/src/generated/resources/META-INF/services/org/apache/camel/dataformat.properties
b/components/camel-iso8583/src/generated/resources/META-INF/services/org/apache/camel/dataformat.properties
new file mode 100644
index 00000000000..6804d31b3fc
--- /dev/null
+++
b/components/camel-iso8583/src/generated/resources/META-INF/services/org/apache/camel/dataformat.properties
@@ -0,0 +1,7 @@
+# Generated by camel build tools - do NOT edit this file!
+dataFormats=iso8583
+groupId=org.apache.camel
+artifactId=camel-iso8583
+version=4.14.0-SNAPSHOT
+projectName=Camel :: ISO-8583
+projectDescription=Camel ISO-8583 support
diff --git
a/components/camel-iso8583/src/generated/resources/META-INF/services/org/apache/camel/dataformat/iso8583
b/components/camel-iso8583/src/generated/resources/META-INF/services/org/apache/camel/dataformat/iso8583
new file mode 100644
index 00000000000..932b8e80fc8
--- /dev/null
+++
b/components/camel-iso8583/src/generated/resources/META-INF/services/org/apache/camel/dataformat/iso8583
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.dataformat.iso8583.Iso8583DataFormat
diff --git a/components/camel-iso8583/src/main/docs/iso8583-dataformat.adoc
b/components/camel-iso8583/src/main/docs/iso8583-dataformat.adoc
new file mode 100644
index 00000000000..34106b4e73f
--- /dev/null
+++ b/components/camel-iso8583/src/main/docs/iso8583-dataformat.adoc
@@ -0,0 +1,71 @@
+= ISO-8583 DataFormat
+:doctitle: ISO-8583
+:shortname: iso8583
+:artifactid: camel-iso8583
+:description: Create, edit and read ISO-8583 messages.
+:since: 4.14
+:supportlevel: Preview
+:tabs-sync-option:
+//Manually maintained attributes
+:camel-spring-boot-name: iso8583
+
+*Since Camel {since}*
+
+This iso8583 data format supports reading and writing ISO-8583 messages (using
the j8583 parser library).
+
+ISO-8583 is a message format used for credit card transactions, banking and
other commercial interaction between different systems.
+It has an ASCII variant and a binary one, and it is somewhat convoluted and
difficult to implement.
+
+== J8583 Options
+
+
+// dataformat options: START
+include::partial$dataformat-options.adoc[]
+// dataformat options: END
+
+== Example
+
+The J8583 parser can be configured using `j8583-config.xml` configuration file
that should be located
+in `src/main/resources` so it can be loaded from the classpath.
+
+This configuration file should contain the support ISO-8583 mappings.
+
+=== Specifying ISO-Type per message
+
+The data format requires to know the ISO-Type of the message to understand how
to parse the data.
+A default ISO-Type can be configured on the data format. However, you can use
a custom header with id `CamelIso8583IsoType`
+on the Exchange message to override and specify another ISO-Type, such as:
+
+[source,java]
+----
+from("direct:payment")
+ .setHeader("CamelIso8583IsoType", constant("0200"))
+ .unmarshal().iso8583()
+ .to("bean:payment");
+----
+
+== More Information
+
+Find more information see the http://j8583.sourceforge.net/[J8583 project]
+and the https://bitbucket.org/chochos/j8583/src/master/[J8583 source code].
+
+== Dependencies
+
+To use ISO-8583 in your camel routes, you need to add the dependency
+on *camel-iso8583* which implements this data format.
+
+If you use maven, you could add the following to your `pom.xml`,
+substituting the version number for the latest and greatest release.
+
+[source,xml]
+----------------------------------------------------------
+<dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-iso8583</artifactId>
+ <version>x.x.x</version>
+ <!-- use the same version as your Camel core version -->
+</dependency>
+----------------------------------------------------------
+
+
+include::spring-boot:partial$starter.adoc[]
diff --git
a/components/camel-iso8583/src/main/java/org/apache/camel/dataformat/iso8583/Iso8583Constants.java
b/components/camel-iso8583/src/main/java/org/apache/camel/dataformat/iso8583/Iso8583Constants.java
new file mode 100644
index 00000000000..eacfd63fa59
--- /dev/null
+++
b/components/camel-iso8583/src/main/java/org/apache/camel/dataformat/iso8583/Iso8583Constants.java
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.dataformat.iso8583;
+
+import org.apache.camel.spi.Metadata;
+
+public final class Iso8583Constants {
+
+ @Metadata(description = "The ISO-Type", javaType = "String")
+ public static final String ISO_TYPE = "CamelIso8583IsoType";
+
+}
diff --git
a/components/camel-iso8583/src/main/java/org/apache/camel/dataformat/iso8583/Iso8583DataFormat.java
b/components/camel-iso8583/src/main/java/org/apache/camel/dataformat/iso8583/Iso8583DataFormat.java
new file mode 100644
index 00000000000..8267fbe8284
--- /dev/null
+++
b/components/camel-iso8583/src/main/java/org/apache/camel/dataformat/iso8583/Iso8583DataFormat.java
@@ -0,0 +1,132 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.dataformat.iso8583;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import com.solab.iso8583.IsoMessage;
+import com.solab.iso8583.MessageFactory;
+import org.apache.camel.CamelContext;
+import org.apache.camel.CamelContextAware;
+import org.apache.camel.Exchange;
+import org.apache.camel.spi.DataFormat;
+import org.apache.camel.spi.DataFormatName;
+import org.apache.camel.spi.Metadata;
+import org.apache.camel.spi.annotations.Dataformat;
+import org.apache.camel.support.CamelContextHelper;
+import org.apache.camel.support.service.ServiceSupport;
+
+/**
+ * Create, edit and read ISO-8583 messages.
+ */
+@Dataformat("iso8583")
+@Metadata(firstVersion = "4.14.0", title = "ISO-8583")
+public class Iso8583DataFormat extends ServiceSupport implements DataFormat,
DataFormatName, CamelContextAware {
+
+ private CamelContext camelContext;
+ private MessageFactory messageFactory;
+ private String configFile;
+ private boolean allowAutoWiredMessageFormat = true;
+ private String isoType;
+
+ @Override
+ public CamelContext getCamelContext() {
+ return camelContext;
+ }
+
+ @Override
+ public void setCamelContext(CamelContext camelContext) {
+ this.camelContext = camelContext;
+ }
+
+ @Override
+ public String getDataFormatName() {
+ return "iso8583";
+ }
+
+ @Override
+ public void marshal(final Exchange exchange, final Object graph, final
OutputStream stream) throws Exception {
+ IsoMessage iso =
exchange.getContext().getTypeConverter().mandatoryConvertTo(IsoMessage.class,
exchange, graph);
+ byte[] data = iso.writeData();
+ if (data != null && data.length > 0) {
+ stream.write(data);
+ }
+ }
+
+ @Override
+ public Object unmarshal(Exchange exchange, InputStream stream) throws
Exception {
+ byte[] data =
camelContext.getTypeConverter().mandatoryConvertTo(byte[].class, exchange,
stream);
+ int len = -1;
+ // hex-based to int
+ String iType =
exchange.getMessage().getHeader(Iso8583Constants.ISO_TYPE, isoType,
String.class);
+ int i = Integer.parseUnsignedInt(iType, 16);
+ String type = messageFactory.getIsoHeader(i);
+ if (type != null) {
+ len = type.length();
+ }
+ if (len == -1) {
+ throw new IllegalArgumentException(
+ "IsoType " + iType + " is not known in the MessageFactory
configuration file.");
+ }
+ return messageFactory.parseMessage(data, len);
+ }
+
+ public MessageFactory getMessageFactory() {
+ return messageFactory;
+ }
+
+ public void setMessageFactory(MessageFactory messageFactory) {
+ this.messageFactory = messageFactory;
+ }
+
+ public String getConfigFile() {
+ return configFile;
+ }
+
+ public void setConfigFile(String configFile) {
+ this.configFile = configFile;
+ }
+
+ public String getIsoType() {
+ return isoType;
+ }
+
+ public void setIsoType(String isoType) {
+ this.isoType = isoType;
+ }
+
+ @Override
+ protected void doInit() throws Exception {
+ super.doInit();
+
+ if (messageFactory == null) {
+ if (allowAutoWiredMessageFormat) {
+ messageFactory =
CamelContextHelper.findSingleByType(camelContext, MessageFactory.class);
+ }
+ if (messageFactory == null) {
+ messageFactory = new MessageFactory();
+ if (configFile == null) {
+ configFile = "j8583-config.xml";
+ }
+ }
+ if (configFile != null) {
+ messageFactory.setConfigPath(configFile);
+ }
+ }
+ }
+}
diff --git
a/components/camel-iso8583/src/test/java/org/apache/camel/dataformat/iso8583/Iso8583DataFormatTest.java
b/components/camel-iso8583/src/test/java/org/apache/camel/dataformat/iso8583/Iso8583DataFormatTest.java
new file mode 100644
index 00000000000..d113257a0a4
--- /dev/null
+++
b/components/camel-iso8583/src/test/java/org/apache/camel/dataformat/iso8583/Iso8583DataFormatTest.java
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.dataformat.iso8583;
+
+import java.io.File;
+import java.math.BigDecimal;
+
+import com.solab.iso8583.IsoMessage;
+import com.solab.iso8583.IsoValue;
+import com.solab.iso8583.MessageFactory;
+import org.apache.camel.RoutesBuilder;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+import static com.solab.iso8583.IsoType.AMOUNT;
+
+public class Iso8583DataFormatTest extends CamelTestSupport {
+
+ @Test
+ public void testUnmarshal() throws Exception {
+ getMockEndpoint("mock:result").expectedMessageCount(1);
+
getMockEndpoint("mock:result").message(0).body().isInstanceOf(IsoMessage.class);
+
+ template.sendBody("direct:unmarshal", new
File("src/test/resources/parse1.txt"));
+
+ MockEndpoint.assertIsSatisfied(context);
+ }
+
+ @Test
+ public void testMarshal() throws Exception {
+ getMockEndpoint("mock:result").expectedMessageCount(1);
+
+ MessageFactory mf = new MessageFactory();
+ mf.setConfigPath("j8583-config.xml");
+
+ IsoMessage iso
+ =
mf.parseMessage(context.getTypeConverter().convertTo(byte[].class, new
File("src/test/resources/parse1.txt")),
+ "ISO015000055".getBytes().length);
+ template.sendBody("direct:marshal", iso);
+
+ MockEndpoint.assertIsSatisfied(context);
+ }
+
+ @Override
+ protected RoutesBuilder createRouteBuilder() throws Exception {
+ return new RouteBuilder() {
+ @Override
+ public void configure() throws Exception {
+ from("direct:unmarshal").unmarshal().iso8583("0210")
+ .process(e -> {
+ IsoMessage iso = (IsoMessage)
e.getMessage().getBody();
+ Assertions.assertNotNull(iso);
+ IsoValue v = iso.getAt(4);
+ Assertions.assertNotNull(v);
+ Assertions.assertEquals(AMOUNT, v.getType());
+ Assertions.assertTrue(v.getValue() instanceof
BigDecimal);
+ Assertions.assertEquals("30.00",
v.getValue().toString());
+ })
+ .to("mock:result");
+
+
from("direct:marshal").marshal().iso8583("0210").to("mock:result");
+ }
+ };
+ }
+}
diff --git a/components/camel-iso8583/src/test/resources/j8583-config.xml
b/components/camel-iso8583/src/test/resources/j8583-config.xml
new file mode 100644
index 00000000000..11b1060ce92
--- /dev/null
+++ b/components/camel-iso8583/src/test/resources/j8583-config.xml
@@ -0,0 +1,188 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<!DOCTYPE j8583-config PUBLIC "-//J8583//DTD CONFIG 1.0//EN"
+ "http://j8583.sourceforge.net/j8583.dtd">
+<j8583-config>
+ <!-- This is a test config file -->
+
+ <!-- These are the ISO headers to be prepended to the message types
specified -->
+ <header type="0200">ISO015000050</header>
+ <header type="0210">ISO015000055</header>
+ <header type="0400" ref="0200" />
+ <header type="0410" ref="0210" />
+ <header type="0800">ISO015000015</header>
+ <header type="0810" ref="0800"/>
+ <header type="0280" binary="true">ffffffff</header>
+
+ <!-- The client example uses this to create requests -->
+ <template type="0200">
+ <field num="3" type="NUMERIC" length="6">650000</field>
+ <field num="32" type="LLVAR">456</field>
+ <field num="35" type="LLVAR">4591700012340000=</field>
+ <field num="43" type="ALPHA" length="40">SOLABTEST TEST-3
DF MX</field>
+ <field num="48" type="LLLVAR">Life, the Universe, and
Everything|42</field>
+ <field num="49" type="ALPHA" length="3">484</field>
+ <field num="60" type="LLLVAR">B456PRO1+000</field>
+ <field num="61" type="LLLVAR"> 1234P vamos a meter más de 90
caracteres en este campo para comprobar si hay algun error en el parseo del
mismo. Esta definido como un LLLVAR aqui por lo tanto esto debe caber sin
problemas; las guias de parseo de 200 y 210 tienen LLLVAR en campo 61
tambien.</field>
+ <field num="100" type="LLVAR">999</field>
+ <field num="102" type="LLVAR">ABCD</field>
+ </template>
+
+ <template type="0300">
+ <field num="4" type="DATE4">0125</field>
+ <field num="5" type="DATE6">730125</field>
+ <field num="6" type="DATE10">0125213456</field>
+ <field num="7" type="DATE12">730125213456</field>
+ <field num="8" type="DATE14">19730125213456</field>
+ <field num="9" type="DATE_EXP">2506</field>
+ <field num="10" type="TIME">213456</field>
+ <field num="11" type="TIME" tz="America/Mexico_City">213456</field>
+ <field num="12" type="DATE10" tz="EET">0125213456</field>
+ </template>
+
+ <!-- The server example uses this to create the responses
+ we only need a few fields because the rest are copied from the request
-->
+ <template type="0210">
+ <field num="60" type="LLLVAR">Fixed data from template</field>
+ <field num="70" type="ALPHA" length="3">ABC</field>
+ <field num="90" type="ALPHA" length="42">Field of length 42</field>
+ <field num="100" type="LLVAR">Fixed field</field>
+ <field num="102" type="LLVAR">Another fixed field</field>
+ <field num="126" type="LLLVAR">...and yet another fixed field.</field>
+ </template>
+
+ <template type="0400" extends="0200">
+ <field num="90" type="ALPHA" length="42">BLA</field>
+ <field num="102" type="exclude" />
+ </template>
+
+ <template type="0600">
+ <field num="4" type="AMOUNT">1234</field>
+ <field num="11" type="NUMERIC" length="6">123</field>
+ <field num="41" type="BINARY" length="8">abcdef</field>
+ <field num="42" type="BINARY" length="4">abcde</field>
+ <field num="43" type="ALPHA" length="40">Field of length 40</field>
+ <field num="62" type="LLBIN">0123456789abcdef620123456789abcd</field>
+ <field num="63" type="LLBIN">01234567863</field>
+ <field num="64" type="LLLBIN">0123456789abcdef640123456789abcd</field>
+ <field num="65" type="LLLBIN">01234567865</field>
+ <field num="102" type="LLLVAR">Field of type LLLVAR</field>
+ </template>
+ <template type="0280">
+ <field num="3" type="NUMERIC" length="2">99</field>
+ </template>
+
+ <!-- The server example uses this to read the requests -->
+ <parse type="0200">
+ <field num="3" type="NUMERIC" length="6" />
+ <field num="4" type="AMOUNT" />
+ <field num="7" type="DATE10" />
+ <field num="11" type="NUMERIC" length="6" />
+ <field num="12" type="TIME" />
+ <field num="13" type="DATE4" />
+ <field num="15" type="DATE4" />
+ <field num="17" type="DATE_EXP" />
+ <field num="32" type="LLVAR" />
+ <field num="35" type="LLVAR" />
+ <field num="37" type="NUMERIC" length="12" />
+ <field num="41" type="ALPHA" length="16" />
+ <field num="43" type="ALPHA" length="40" />
+ <field num="48" type="LLLVAR" />
+ <field num="49" type="ALPHA" length="3" />
+ <field num="60" type="LLLVAR" />
+ <field num="61" type="LLLVAR" />
+ <field num="100" type="LLVAR" />
+ <field num="102" type="LLVAR" />
+ </parse>
+
+ <!-- The client example uses this to read the responses -->
+ <parse type="0210">
+ <field num="3" type="NUMERIC" length="6" />
+ <field num="4" type="AMOUNT" />
+ <field num="7" type="DATE10" />
+ <field num="11" type="NUMERIC" length="6" />
+ <field num="12" type="TIME" />
+ <field num="13" type="DATE4" />
+ <field num="15" type="DATE4" />
+ <field num="17" type="DATE_EXP" />
+ <field num="32" type="LLVAR" />
+ <field num="35" type="LLVAR" />
+ <field num="37" type="NUMERIC" length="12" />
+ <field num="38" type="NUMERIC" length="6" />
+ <field num="39" type="NUMERIC" length="2" />
+ <field num="41" type="ALPHA" length="16" />
+ <field num="43" type="ALPHA" length="40" />
+ <field num="48" type="LLLVAR" />
+ <field num="49" type="ALPHA" length="3" />
+ <field num="60" type="LLLVAR" />
+ <field num="61" type="LLLVAR" />
+ <field num="70" type="ALPHA" length="3" />
+ <field num="90" type="ALPHA" length="42" />
+ <field num="100" type="LLVAR" />
+ <field num="102" type="LLVAR" />
+ <field num="126" type="LLLVAR" />
+ </parse>
+
+ <!-- this is for binary tests (message encoding AND fields) -->
+ <parse type="0600">
+ <field num="4" type="AMOUNT" />
+ <field num="7" type="DATE10" />
+ <field num="11" type="NUMERIC" length="6" />
+ <field num="41" type="BINARY" length="8" />
+ <field num="42" type="BINARY" length="4" />
+ <field num="43" type="ALPHA" length="40" />
+ <field num="62" type="LLBIN" />
+ <field num="63" type="LLBIN" />
+ <field num="64" type="LLLBIN" />
+ <field num="65" type="LLLBIN" />
+ <field num="102" type="LLLVAR" />
+ </parse>
+
+ <parse type="0800">
+ <field num="3" type="ALPHA" length="6">123456</field>
+ <field num="12" type="DATE4">1231</field>
+ <field num="17" type="DATE4">1231</field>
+ </parse>
+
+ <parse type="0810" extends="0800">
+ <field num="17" type="exclude"/>
+ <field num="39" type="ALPHA" length="2"/>
+ </parse>
+
+ <parse type="0201">
+ <field num="3" type="NUMERIC" length="19" />
+ </parse>
+ <parse type="0202">
+ <field num="3" type="NUMERIC" length="22" />
+ </parse>
+ <parse type="0280">
+ <field num="3" type="NUMERIC" length="2" />
+ </parse>
+ <parse type="0281">
+ <field num="3" type="LLBCDBIN"/>
+ </parse>
+ <parse type="0282">
+ <field num="3" type="LLLBCDBIN"/>
+ </parse>
+ <parse type="0283">
+ <field num="3" type="LLLLBCDBIN"/>
+ </parse>
+
+</j8583-config>
diff --git a/components/camel-iso8583/src/test/resources/log4j2.properties
b/components/camel-iso8583/src/test/resources/log4j2.properties
new file mode 100644
index 00000000000..57c81cd2890
--- /dev/null
+++ b/components/camel-iso8583/src/test/resources/log4j2.properties
@@ -0,0 +1,28 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements. See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+appender.file.type = File
+appender.file.name = file
+appender.file.fileName = target/camel-iso8583-test.log
+appender.file.layout.type = PatternLayout
+appender.file.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
+appender.out.type = Console
+appender.out.name = out
+appender.out.layout.type = PatternLayout
+appender.out.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
+rootLogger.level = DEBUG
+rootLogger.appenderRef.file.ref = file
diff --git a/components/camel-iso8583/src/test/resources/parse1.txt
b/components/camel-iso8583/src/test/resources/parse1.txt
new file mode 100644
index 00000000000..f4a8fb20d00
--- /dev/null
+++ b/components/camel-iso8583/src/test/resources/parse1.txt
@@ -0,0 +1,2 @@
+ISO0250000550210B23A80012EA080180000000014000004650000000000003000042813054746877112594604280428081103123173766123456123456=00123442579114472300614209027600TéSTSOLAB
áéÃóú üñÑ TEST-3 DF MX484012B123P®O1+000013
0000P0312304ABCD040ABCD8123477547
+
diff --git
a/components/camel-swift/src/generated/resources/META-INF/org/apache/camel/dataformat/swift/mt/swiftMt.json
b/components/camel-swift/src/generated/resources/META-INF/org/apache/camel/dataformat/swift/mt/swiftMt.json
index 451d6c606f3..b55c6517394 100644
---
a/components/camel-swift/src/generated/resources/META-INF/org/apache/camel/dataformat/swift/mt/swiftMt.json
+++
b/components/camel-swift/src/generated/resources/META-INF/org/apache/camel/dataformat/swift/mt/swiftMt.json
@@ -6,7 +6,7 @@
"description": "Encode and decode SWIFT MT messages.",
"deprecated": false,
"firstVersion": "3.20.0",
- "label": "dataformat,transformation,swift",
+ "label": "dataformat,transformation,finance",
"javaType": "org.apache.camel.dataformat.swift.mt.SwiftMtDataFormat",
"supportLevel": "Stable",
"groupId": "org.apache.camel",
diff --git
a/components/camel-swift/src/generated/resources/META-INF/org/apache/camel/dataformat/swift/mx/swiftMx.json
b/components/camel-swift/src/generated/resources/META-INF/org/apache/camel/dataformat/swift/mx/swiftMx.json
index ebe7c6abe5e..21a13a66a1d 100644
---
a/components/camel-swift/src/generated/resources/META-INF/org/apache/camel/dataformat/swift/mx/swiftMx.json
+++
b/components/camel-swift/src/generated/resources/META-INF/org/apache/camel/dataformat/swift/mx/swiftMx.json
@@ -6,7 +6,7 @@
"description": "Encode and decode SWIFT MX messages.",
"deprecated": false,
"firstVersion": "3.20.0",
- "label": "dataformat,transformation,swift",
+ "label": "dataformat,transformation,finance",
"javaType": "org.apache.camel.dataformat.swift.mx.SwiftMxDataFormat",
"supportLevel": "Stable",
"groupId": "org.apache.camel",
diff --git a/components/pom.xml b/components/pom.xml
index d1be0c3ea17..21e62854a0c 100644
--- a/components/pom.xml
+++ b/components/pom.xml
@@ -166,6 +166,7 @@
<module>camel-influxdb2</module>
<module>camel-irc</module>
<module>camel-ironmq</module>
+ <module>camel-iso8583</module>
<module>camel-jackson</module>
<module>camel-jackson-avro</module>
<module>camel-jackson-protobuf</module>
diff --git
a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/dataFormats.json
b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/dataFormats.json
index 4eb58384efd..0958ba7eb64 100644
---
a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/dataFormats.json
+++
b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/dataFormats.json
@@ -12,6 +12,6 @@
"output": false
},
"properties": {
- "dataFormats": { "index": 0, "kind": "element", "displayName": "Data
Formats", "group": "common", "required": true, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.DataFormatDefinition>", "oneOf": [
"asn1", "avro", "barcode", "base64", "beanio", "bindy", "cbor", "crypto",
"csv", "custom", "fhirJson", "fhirXml", "flatpack", "fory", "grok",
"gzipDeflater", "hl7", "ical", "jacksonXml", "jaxb", "json", "jsonApi", "lzf",
"mimeMultipart", "parquetAvro", "pgp", "protobuf [...]
+ "dataFormats": { "index": 0, "kind": "element", "displayName": "Data
Formats", "group": "common", "required": true, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.DataFormatDefinition>", "oneOf": [
"asn1", "avro", "barcode", "base64", "beanio", "bindy", "cbor", "crypto",
"csv", "custom", "fhirJson", "fhirXml", "flatpack", "fory", "grok",
"gzipDeflater", "hl7", "ical", "iso8583", "jacksonXml", "jaxb", "json",
"jsonApi", "lzf", "mimeMultipart", "parquetAvro", "pgp" [...]
}
}
diff --git
a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/iso8583.json
b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/iso8583.json
new file mode 100644
index 00000000000..48a115416e7
--- /dev/null
+++
b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/iso8583.json
@@ -0,0 +1,21 @@
+{
+ "model": {
+ "kind": "model",
+ "name": "iso8583",
+ "title": "ISO-8583",
+ "description": "Create, edit and read ISO-8583 messages.",
+ "deprecated": false,
+ "firstVersion": "4.14.0",
+ "label": "dataformat,transformation,finance",
+ "javaType": "org.apache.camel.model.dataformat.Iso8583DataFormat",
+ "abstract": false,
+ "input": false,
+ "output": false
+ },
+ "properties": {
+ "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group":
"common", "required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": false, "description": "The
id of this node" },
+ "configFile": { "index": 1, "kind": "attribute", "displayName": "Config
File", "group": "common", "required": false, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": "j8583-config.xml", "description": "The j8583 configuration
file to load from classpath" },
+ "isoType": { "index": 2, "kind": "attribute", "displayName": "Iso Type",
"group": "common", "required": false, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "autowired": false, "secret": false,
"description": "The default ISO-Type to use" },
+ "allowAutoWiredMessageFormat": { "index": 3, "kind": "attribute",
"displayName": "Allow Auto Wired Message Format", "group": "advanced", "label":
"advanced", "required": false, "type": "boolean", "javaType":
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": true, "description": "Whether to auto-discover
com.solab.iso8583.MessageFactory from the registry" }
+ }
+}
diff --git
a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/swiftMt.json
b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/swiftMt.json
index e603e1c1b83..039a14a2c32 100644
---
a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/swiftMt.json
+++
b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/swiftMt.json
@@ -6,7 +6,7 @@
"description": "Encode and decode SWIFT MT messages.",
"deprecated": false,
"firstVersion": "3.20.0",
- "label": "dataformat,transformation,swift",
+ "label": "dataformat,transformation,finance",
"javaType": "org.apache.camel.model.dataformat.SwiftMtDataFormat",
"abstract": false,
"input": false,
diff --git
a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/swiftMx.json
b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/swiftMx.json
index 8329743cad0..e54c670fa7e 100644
---
a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/swiftMx.json
+++
b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/swiftMx.json
@@ -6,7 +6,7 @@
"description": "Encode and decode SWIFT MX messages.",
"deprecated": false,
"firstVersion": "3.20.0",
- "label": "dataformat,transformation,swift",
+ "label": "dataformat,transformation,finance",
"javaType": "org.apache.camel.model.dataformat.SwiftMxDataFormat",
"abstract": false,
"input": false,
diff --git
a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/marshal.json
b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/marshal.json
index 1125fc01435..ddcb905d00c 100644
---
a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/marshal.json
+++
b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/marshal.json
@@ -15,7 +15,7 @@
"id": { "index": 0, "kind": "attribute", "displayName": "Id", "group":
"common", "required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": false, "description": "Sets
the id of this node" },
"description": { "index": 1, "kind": "attribute", "displayName":
"Description", "group": "common", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "Sets the description of this node" },
"disabled": { "index": 2, "kind": "attribute", "displayName": "Disabled",
"group": "advanced", "label": "advanced", "required": false, "type": "boolean",
"javaType": "java.lang.Boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": false, "description": "Whether to disable this
EIP from the route during build time. Once an EIP has been disabled then it
cannot be enabled later at runtime." },
- "dataFormatType": { "index": 3, "kind": "element", "displayName": "Data
Format Type", "group": "common", "required": true, "type": "object",
"javaType": "org.apache.camel.model.DataFormatDefinition", "oneOf": [ "asn1",
"avro", "barcode", "base64", "beanio", "bindy", "cbor", "crypto", "csv",
"custom", "dfdl", "fhirJson", "fhirXml", "flatpack", "fory", "grok",
"gzipDeflater", "hl7", "ical", "jacksonXml", "jaxb", "json", "jsonApi", "lzf",
"mimeMultipart", "parquetAvro", "pgp", "protobuf [...]
+ "dataFormatType": { "index": 3, "kind": "element", "displayName": "Data
Format Type", "group": "common", "required": true, "type": "object",
"javaType": "org.apache.camel.model.DataFormatDefinition", "oneOf": [ "asn1",
"avro", "barcode", "base64", "beanio", "bindy", "cbor", "crypto", "csv",
"custom", "dfdl", "fhirJson", "fhirXml", "flatpack", "fory", "grok",
"gzipDeflater", "hl7", "ical", "iso8583", "jacksonXml", "jaxb", "json",
"jsonApi", "lzf", "mimeMultipart", "parquetAvro", "pgp" [...]
"variableSend": { "index": 4, "kind": "attribute", "displayName":
"Variable Send", "group": "common", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "To use a variable as the source for the
message body to send. This makes it handy to use variables for user data and to
easily control what data to use for sending and receiving. Important: When
using send variable then the message body is tak [...]
"variableReceive": { "index": 5, "kind": "attribute", "displayName":
"Variable Receive", "group": "common", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "To use a variable to store the received
message body (only body, not headers). This makes it handy to use variables for
user data and to easily control what data to use for sending and receiving.
Important: When using receive variable th [...]
}
diff --git
a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/transformer/dataFormatTransformer.json
b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/transformer/dataFormatTransformer.json
index 90a3339ce27..5ed0d9342c5 100644
---
a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/transformer/dataFormatTransformer.json
+++
b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/transformer/dataFormatTransformer.json
@@ -12,7 +12,7 @@
"output": false
},
"properties": {
- "dataFormatType": { "index": 0, "kind": "element", "displayName": "Data
Format Type", "group": "common", "required": true, "type": "object",
"javaType": "org.apache.camel.model.DataFormatDefinition", "oneOf": [ "asn1",
"avro", "barcode", "base64", "beanio", "bindy", "cbor", "crypto", "csv",
"custom", "fhirJson", "fhirXml", "flatpack", "fory", "grok", "gzipDeflater",
"hl7", "ical", "jacksonXml", "jaxb", "json", "jsonApi", "lzf", "mimeMultipart",
"parquetAvro", "pgp", "protobuf", "rss" [...]
+ "dataFormatType": { "index": 0, "kind": "element", "displayName": "Data
Format Type", "group": "common", "required": true, "type": "object",
"javaType": "org.apache.camel.model.DataFormatDefinition", "oneOf": [ "asn1",
"avro", "barcode", "base64", "beanio", "bindy", "cbor", "crypto", "csv",
"custom", "fhirJson", "fhirXml", "flatpack", "fory", "grok", "gzipDeflater",
"hl7", "ical", "iso8583", "jacksonXml", "jaxb", "json", "jsonApi", "lzf",
"mimeMultipart", "parquetAvro", "pgp", "proto [...]
"scheme": { "index": 1, "kind": "attribute", "displayName": "Scheme",
"group": "common", "required": false, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "autowired": false, "secret": false,
"description": "Set a scheme name supported by the transformer. If you specify
'csv', the transformer will be picked up for all of 'csv' from\/to Java
transformation. Note that the scheme matching is performed only when no exactly
matched transformer exists." },
"name": { "index": 2, "kind": "attribute", "displayName": "Name", "group":
"common", "required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": false, "description": "Set
the transformer name under which the transformer gets referenced when
specifying the input\/output data type on routes. If you specify a transformer
name that matches a data type scheme like 'csv' the transformer will be picked
up for all of 'csv:' from\/t [...]
"fromType": { "index": 3, "kind": "attribute", "displayName": "From Type",
"group": "common", "required": false, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "autowired": false, "secret": false,
"description": "Set the 'from' data type name. If you specify 'xml:XYZ', the
transformer will be picked up if source type is 'xml:XYZ'. If you specify just
'xml', the transformer matches with all of 'xml' source type like 'xml:ABC' or
'xml:DEF'." },
diff --git
a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/unmarshal.json
b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/unmarshal.json
index 6de9ae5e296..e3321e34c13 100644
---
a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/unmarshal.json
+++
b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/unmarshal.json
@@ -15,7 +15,7 @@
"id": { "index": 0, "kind": "attribute", "displayName": "Id", "group":
"common", "required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": false, "description": "Sets
the id of this node" },
"description": { "index": 1, "kind": "attribute", "displayName":
"Description", "group": "common", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "Sets the description of this node" },
"disabled": { "index": 2, "kind": "attribute", "displayName": "Disabled",
"group": "advanced", "label": "advanced", "required": false, "type": "boolean",
"javaType": "java.lang.Boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": false, "description": "Whether to disable this
EIP from the route during build time. Once an EIP has been disabled then it
cannot be enabled later at runtime." },
- "dataFormatType": { "index": 3, "kind": "element", "displayName": "Data
Format Type", "group": "common", "required": true, "type": "object",
"javaType": "org.apache.camel.model.DataFormatDefinition", "oneOf": [ "asn1",
"avro", "barcode", "base64", "beanio", "bindy", "cbor", "crypto", "csv",
"custom", "dfdl", "fhirJson", "fhirXml", "flatpack", "fory", "grok",
"gzipDeflater", "hl7", "ical", "jacksonXml", "jaxb", "json", "jsonApi", "lzf",
"mimeMultipart", "parquetAvro", "pgp", "protobuf [...]
+ "dataFormatType": { "index": 3, "kind": "element", "displayName": "Data
Format Type", "group": "common", "required": true, "type": "object",
"javaType": "org.apache.camel.model.DataFormatDefinition", "oneOf": [ "asn1",
"avro", "barcode", "base64", "beanio", "bindy", "cbor", "crypto", "csv",
"custom", "dfdl", "fhirJson", "fhirXml", "flatpack", "fory", "grok",
"gzipDeflater", "hl7", "ical", "iso8583", "jacksonXml", "jaxb", "json",
"jsonApi", "lzf", "mimeMultipart", "parquetAvro", "pgp" [...]
"variableSend": { "index": 4, "kind": "attribute", "displayName":
"Variable Send", "group": "common", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "To use a variable as the source for the
message body to send. This makes it handy to use variables for user data and to
easily control what data to use for sending and receiving. Important: When
using send variable then the message body is tak [...]
"variableReceive": { "index": 5, "kind": "attribute", "displayName":
"Variable Receive", "group": "common", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "To use a variable to store the received
message body (only body, not headers). This makes it handy to use variables for
user data and to easily control what data to use for sending and receiving.
Important: When using receive variable th [...]
"allowNullBody": { "index": 6, "kind": "attribute", "displayName": "Allow
Null Body", "group": "advanced", "label": "advanced", "required": false,
"type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Indicates whether null is allowed as value of a body to unmarshall." }
diff --git
a/core/camel-core-model/src/generated/resources/META-INF/services/org/apache/camel/model.properties
b/core/camel-core-model/src/generated/resources/META-INF/services/org/apache/camel/model.properties
index a8b0d33e722..65b9d6eaa5b 100644
---
a/core/camel-core-model/src/generated/resources/META-INF/services/org/apache/camel/model.properties
+++
b/core/camel-core-model/src/generated/resources/META-INF/services/org/apache/camel/model.properties
@@ -79,6 +79,7 @@ inputType
intercept
interceptFrom
interceptSendToEndpoint
+iso8583
jacksonXml
java
jaxb
diff --git
a/core/camel-core-model/src/generated/resources/org/apache/camel/model/dataformat/jaxb.index
b/core/camel-core-model/src/generated/resources/org/apache/camel/model/dataformat/jaxb.index
index 831e27c61ed..1b272d86bbe 100644
---
a/core/camel-core-model/src/generated/resources/org/apache/camel/model/dataformat/jaxb.index
+++
b/core/camel-core-model/src/generated/resources/org/apache/camel/model/dataformat/jaxb.index
@@ -21,6 +21,7 @@ GrokDataFormat
GzipDeflaterDataFormat
HL7DataFormat
IcalDataFormat
+Iso8583DataFormat
JacksonXMLDataFormat
JaxbDataFormat
JsonApiDataFormat
diff --git
a/core/camel-core-model/src/main/java/org/apache/camel/builder/DataFormatBuilderFactory.java
b/core/camel-core-model/src/main/java/org/apache/camel/builder/DataFormatBuilderFactory.java
index 5ed906dff66..c732650b56e 100644
---
a/core/camel-core-model/src/main/java/org/apache/camel/builder/DataFormatBuilderFactory.java
+++
b/core/camel-core-model/src/main/java/org/apache/camel/builder/DataFormatBuilderFactory.java
@@ -35,6 +35,7 @@ import org.apache.camel.model.dataformat.GrokDataFormat;
import org.apache.camel.model.dataformat.GzipDeflaterDataFormat;
import org.apache.camel.model.dataformat.HL7DataFormat;
import org.apache.camel.model.dataformat.IcalDataFormat;
+import org.apache.camel.model.dataformat.Iso8583DataFormat;
import org.apache.camel.model.dataformat.JacksonXMLDataFormat;
import org.apache.camel.model.dataformat.JaxbDataFormat;
import org.apache.camel.model.dataformat.JsonApiDataFormat;
@@ -199,6 +200,13 @@ public final class DataFormatBuilderFactory {
return new IcalDataFormat.Builder();
}
+ /**
+ * Uses the ISO-8583 data format
+ */
+ public Iso8583DataFormat.Builder iso8583() {
+ return new Iso8583DataFormat.Builder();
+ }
+
/**
* Uses the Jackson XML data format
*/
diff --git
a/core/camel-core-model/src/main/java/org/apache/camel/builder/DataFormatClause.java
b/core/camel-core-model/src/main/java/org/apache/camel/builder/DataFormatClause.java
index d2abb864ec5..5abf7bbd9e5 100644
---
a/core/camel-core-model/src/main/java/org/apache/camel/builder/DataFormatClause.java
+++
b/core/camel-core-model/src/main/java/org/apache/camel/builder/DataFormatClause.java
@@ -42,6 +42,7 @@ import org.apache.camel.model.dataformat.GrokDataFormat;
import org.apache.camel.model.dataformat.GzipDeflaterDataFormat;
import org.apache.camel.model.dataformat.HL7DataFormat;
import org.apache.camel.model.dataformat.IcalDataFormat;
+import org.apache.camel.model.dataformat.Iso8583DataFormat;
import org.apache.camel.model.dataformat.JacksonXMLDataFormat;
import org.apache.camel.model.dataformat.JaxbDataFormat;
import org.apache.camel.model.dataformat.JsonApiDataFormat;
@@ -382,6 +383,24 @@ public class DataFormatClause<T extends
ProcessorDefinition<?>> {
return dataFormat(ical);
}
+ /**
+ * Use the ISO-8583 data format
+ */
+ public T iso8583() {
+ return dataFormat(new Iso8583DataFormat());
+ }
+
+ /**
+ * Use the ISO-8583 data format
+ *
+ * @param isoType The default ISO-Type to use
+ */
+ public T iso8583(String isoType) {
+ Iso8583DataFormat df = new Iso8583DataFormat();
+ df.setIsoType(isoType);
+ return dataFormat(df);
+ }
+
/**
* Uses the LZF deflater data format
*/
diff --git
a/core/camel-core-model/src/main/java/org/apache/camel/model/MarshalDefinition.java
b/core/camel-core-model/src/main/java/org/apache/camel/model/MarshalDefinition.java
index 79a9953cb6d..e7df749f2e9 100644
---
a/core/camel-core-model/src/main/java/org/apache/camel/model/MarshalDefinition.java
+++
b/core/camel-core-model/src/main/java/org/apache/camel/model/MarshalDefinition.java
@@ -42,6 +42,7 @@ import org.apache.camel.model.dataformat.GrokDataFormat;
import org.apache.camel.model.dataformat.GzipDeflaterDataFormat;
import org.apache.camel.model.dataformat.HL7DataFormat;
import org.apache.camel.model.dataformat.IcalDataFormat;
+import org.apache.camel.model.dataformat.Iso8583DataFormat;
import org.apache.camel.model.dataformat.JacksonXMLDataFormat;
import org.apache.camel.model.dataformat.JaxbDataFormat;
import org.apache.camel.model.dataformat.JsonApiDataFormat;
@@ -97,6 +98,7 @@ public class MarshalDefinition extends
NoOutputDefinition<MarshalDefinition> imp
@XmlElement(name = "gzipDeflater", type =
GzipDeflaterDataFormat.class),
@XmlElement(name = "hl7", type = HL7DataFormat.class),
@XmlElement(name = "ical", type = IcalDataFormat.class),
+ @XmlElement(name = "iso8583", type = Iso8583DataFormat.class),
@XmlElement(name = "jacksonXml", type =
JacksonXMLDataFormat.class),
@XmlElement(name = "jaxb", type = JaxbDataFormat.class),
@XmlElement(name = "json", type = JsonDataFormat.class),
diff --git
a/core/camel-core-model/src/main/java/org/apache/camel/model/UnmarshalDefinition.java
b/core/camel-core-model/src/main/java/org/apache/camel/model/UnmarshalDefinition.java
index 536b25c8495..0b0b4fcaa9c 100644
---
a/core/camel-core-model/src/main/java/org/apache/camel/model/UnmarshalDefinition.java
+++
b/core/camel-core-model/src/main/java/org/apache/camel/model/UnmarshalDefinition.java
@@ -42,6 +42,7 @@ import org.apache.camel.model.dataformat.GrokDataFormat;
import org.apache.camel.model.dataformat.GzipDeflaterDataFormat;
import org.apache.camel.model.dataformat.HL7DataFormat;
import org.apache.camel.model.dataformat.IcalDataFormat;
+import org.apache.camel.model.dataformat.Iso8583DataFormat;
import org.apache.camel.model.dataformat.JacksonXMLDataFormat;
import org.apache.camel.model.dataformat.JaxbDataFormat;
import org.apache.camel.model.dataformat.JsonApiDataFormat;
@@ -97,6 +98,7 @@ public class UnmarshalDefinition extends
NoOutputDefinition<UnmarshalDefinition>
@XmlElement(name = "gzipDeflater", type =
GzipDeflaterDataFormat.class),
@XmlElement(name = "hl7", type = HL7DataFormat.class),
@XmlElement(name = "ical", type = IcalDataFormat.class),
+ @XmlElement(name = "iso8583", type = Iso8583DataFormat.class),
@XmlElement(name = "jacksonXml", type =
JacksonXMLDataFormat.class),
@XmlElement(name = "jaxb", type = JaxbDataFormat.class),
@XmlElement(name = "json", type = JsonDataFormat.class),
diff --git
a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/DataFormatsDefinition.java
b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/DataFormatsDefinition.java
index 74ab4828caa..467d0835257 100644
---
a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/DataFormatsDefinition.java
+++
b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/DataFormatsDefinition.java
@@ -62,6 +62,7 @@ public class DataFormatsDefinition implements
CopyableDefinition<DataFormatsDefi
@XmlElement(name = "gzipDeflater", type =
GzipDeflaterDataFormat.class),
@XmlElement(name = "hl7", type = HL7DataFormat.class),
@XmlElement(name = "ical", type = IcalDataFormat.class),
+ @XmlElement(name = "iso8583", type = Iso8583DataFormat.class),
@XmlElement(name = "jacksonXml", type =
JacksonXMLDataFormat.class),
@XmlElement(name = "jaxb", type = JaxbDataFormat.class),
@XmlElement(name = "json", type = JsonDataFormat.class),
diff --git
a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/Iso8583DataFormat.java
b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/Iso8583DataFormat.java
new file mode 100644
index 00000000000..e25e5941acb
--- /dev/null
+++
b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/Iso8583DataFormat.java
@@ -0,0 +1,125 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.model.dataformat;
+
+import jakarta.xml.bind.annotation.XmlAccessType;
+import jakarta.xml.bind.annotation.XmlAccessorType;
+import jakarta.xml.bind.annotation.XmlAttribute;
+import jakarta.xml.bind.annotation.XmlRootElement;
+import jakarta.xml.bind.annotation.XmlTransient;
+
+import org.apache.camel.builder.DataFormatBuilder;
+import org.apache.camel.model.DataFormatDefinition;
+import org.apache.camel.spi.Metadata;
+
+/**
+ * Create, edit and read ISO-8583 messages.
+ */
+@Metadata(firstVersion = "4.14.0", label =
"dataformat,transformation,finance", title = "ISO-8583")
+@XmlRootElement(name = "iso8583")
+@XmlAccessorType(XmlAccessType.FIELD)
+public class Iso8583DataFormat extends DataFormatDefinition {
+
+ @XmlAttribute
+ @Metadata(description = "The j8583 configuration file to load from
classpath", defaultValue = "j8583-config.xml")
+ private String configFile;
+ @XmlAttribute
+ @Metadata(description = "The default ISO-Type to use")
+ private String isoType;
+ @XmlAttribute
+ @Metadata(label = "advanced", description = "Whether to auto-discover
com.solab.iso8583.MessageFactory from the registry",
+ defaultValue = "true",
+ javaType = "java.lang.Boolean")
+ private String allowAutoWiredMessageFormat;
+
+ public Iso8583DataFormat() {
+ super("iso8583");
+ }
+
+ public Iso8583DataFormat(Iso8583DataFormat source) {
+ super(source);
+ this.configFile = source.configFile;
+ this.isoType = source.isoType;
+ this.allowAutoWiredMessageFormat = source.allowAutoWiredMessageFormat;
+ }
+
+ private Iso8583DataFormat(Builder builder) {
+ this.configFile = builder.configFile;
+ this.isoType = builder.isoType;
+ this.allowAutoWiredMessageFormat = builder.allowAutoWiredMessageFormat;
+ }
+
+ @Override
+ public Iso8583DataFormat copyDefinition() {
+ return new Iso8583DataFormat(this);
+ }
+
+ public String getConfigFile() {
+ return configFile;
+ }
+
+ public void setConfigFile(String configFile) {
+ this.configFile = configFile;
+ }
+
+ public String getIsoType() {
+ return isoType;
+ }
+
+ public void setIsoType(String isoType) {
+ this.isoType = isoType;
+ }
+
+ public String getAllowAutoWiredMessageFormat() {
+ return allowAutoWiredMessageFormat;
+ }
+
+ public void setAllowAutoWiredMessageFormat(String
allowAutoWiredMessageFormat) {
+ this.allowAutoWiredMessageFormat = allowAutoWiredMessageFormat;
+ }
+
+ /**
+ * {@code Builder} is a specific builder for {@link Iso8583DataFormat}.
+ */
+ @XmlTransient
+ public static class Builder implements
DataFormatBuilder<Iso8583DataFormat> {
+
+ private String configFile;
+ private String isoType;
+ private String allowAutoWiredMessageFormat;
+
+ public Builder configFile(String configFile) {
+ this.configFile = configFile;
+ return this;
+ }
+
+ public Builder isoType(String isoType) {
+ this.isoType = isoType;
+ return this;
+ }
+
+ public Builder allowAutoWiredMessageFormat(String
allowAutoWiredMessageFormat) {
+ this.allowAutoWiredMessageFormat = allowAutoWiredMessageFormat;
+ return this;
+ }
+
+ @Override
+ public Iso8583DataFormat end() {
+ return new Iso8583DataFormat(this);
+ }
+ }
+}
diff --git
a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/SwiftMtDataFormat.java
b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/SwiftMtDataFormat.java
index 83f2d2e80e1..c71f2b21140 100644
---
a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/SwiftMtDataFormat.java
+++
b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/SwiftMtDataFormat.java
@@ -29,7 +29,7 @@ import org.apache.camel.spi.Metadata;
/**
* Encode and decode SWIFT MT messages.
*/
-@Metadata(firstVersion = "3.20.0", label = "dataformat,transformation,swift",
title = "SWIFT MT")
+@Metadata(firstVersion = "3.20.0", label =
"dataformat,transformation,finance", title = "SWIFT MT")
@XmlRootElement(name = "swiftMt")
@XmlAccessorType(XmlAccessType.FIELD)
public class SwiftMtDataFormat extends DataFormatDefinition {
diff --git
a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/SwiftMxDataFormat.java
b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/SwiftMxDataFormat.java
index 6414ea7a8c4..fcdeef79544 100644
---
a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/SwiftMxDataFormat.java
+++
b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/SwiftMxDataFormat.java
@@ -29,7 +29,7 @@ import org.apache.camel.spi.Metadata;
/**
* Encode and decode SWIFT MX messages.
*/
-@Metadata(firstVersion = "3.20.0", label = "dataformat,transformation,swift",
title = "SWIFT MX")
+@Metadata(firstVersion = "3.20.0", label =
"dataformat,transformation,finance", title = "SWIFT MX")
@XmlRootElement(name = "swiftMx")
@XmlAccessorType(XmlAccessType.FIELD)
public class SwiftMxDataFormat extends DataFormatDefinition {
diff --git
a/core/camel-core-model/src/main/java/org/apache/camel/model/transformer/DataFormatTransformerDefinition.java
b/core/camel-core-model/src/main/java/org/apache/camel/model/transformer/DataFormatTransformerDefinition.java
index 86ea836025a..65b8e67c5fe 100644
---
a/core/camel-core-model/src/main/java/org/apache/camel/model/transformer/DataFormatTransformerDefinition.java
+++
b/core/camel-core-model/src/main/java/org/apache/camel/model/transformer/DataFormatTransformerDefinition.java
@@ -41,6 +41,7 @@ import org.apache.camel.model.dataformat.GrokDataFormat;
import org.apache.camel.model.dataformat.GzipDeflaterDataFormat;
import org.apache.camel.model.dataformat.HL7DataFormat;
import org.apache.camel.model.dataformat.IcalDataFormat;
+import org.apache.camel.model.dataformat.Iso8583DataFormat;
import org.apache.camel.model.dataformat.JacksonXMLDataFormat;
import org.apache.camel.model.dataformat.JaxbDataFormat;
import org.apache.camel.model.dataformat.JsonApiDataFormat;
@@ -97,6 +98,7 @@ public class DataFormatTransformerDefinition extends
TransformerDefinition {
@XmlElement(name = "gzipDeflater", type =
GzipDeflaterDataFormat.class),
@XmlElement(name = "hl7", type = HL7DataFormat.class),
@XmlElement(name = "ical", type = IcalDataFormat.class),
+ @XmlElement(name = "iso8583", type = Iso8583DataFormat.class),
@XmlElement(name = "jacksonXml", type =
JacksonXMLDataFormat.class),
@XmlElement(name = "jaxb", type = JaxbDataFormat.class),
@XmlElement(name = "json", type = JsonDataFormat.class),
diff --git
a/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/dataformat/DataFormatReifier.java
b/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/dataformat/DataFormatReifier.java
index ad2af7ad3dd..0217073ab99 100644
---
a/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/dataformat/DataFormatReifier.java
+++
b/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/dataformat/DataFormatReifier.java
@@ -174,6 +174,8 @@ public abstract class DataFormatReifier<T extends
DataFormatDefinition> extends
return new HL7DataFormatReifier(camelContext, definition);
} else if (definition instanceof IcalDataFormat) {
return new IcalDataFormatReifier(camelContext, definition);
+ } else if (definition instanceof Iso8583DataFormat) {
+ return new Iso8583DataFormatReifier(camelContext, definition);
} else if (definition instanceof JacksonXMLDataFormat) {
return new JacksonXMLDataFormatReifier(camelContext, definition);
} else if (definition instanceof JaxbDataFormat) {
diff --git
a/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/dataformat/Iso8583DataFormatReifier.java
b/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/dataformat/Iso8583DataFormatReifier.java
new file mode 100644
index 00000000000..5a6b3c3371d
--- /dev/null
+++
b/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/dataformat/Iso8583DataFormatReifier.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.reifier.dataformat;
+
+import java.util.Map;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.model.DataFormatDefinition;
+import org.apache.camel.model.dataformat.Iso8583DataFormat;
+
+public class Iso8583DataFormatReifier extends
DataFormatReifier<Iso8583DataFormat> {
+
+ public Iso8583DataFormatReifier(CamelContext camelContext,
DataFormatDefinition definition) {
+ super(camelContext, (Iso8583DataFormat) definition);
+ }
+
+ @Override
+ protected void prepareDataFormatConfig(Map<String, Object> properties) {
+ properties.put("configFile", definition.getConfigFile());
+ properties.put("isoType", definition.getIsoType());
+ properties.put("allowAutoWiredMessageFormat",
definition.getAllowAutoWiredMessageFormat());
+ }
+}
diff --git
a/core/camel-main/src/generated/resources/org/apache/camel/main/dataformats.properties
b/core/camel-main/src/generated/resources/org/apache/camel/main/dataformats.properties
index d62e820b8bb..ac36ca06f71 100644
---
a/core/camel-main/src/generated/resources/org/apache/camel/main/dataformats.properties
+++
b/core/camel-main/src/generated/resources/org/apache/camel/main/dataformats.properties
@@ -21,6 +21,7 @@ gson
gzipDeflater
hl7
ical
+iso8583
jackson
jacksonXml
jaxb
diff --git
a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java
b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java
index d02a342474d..5130f3f431a 100644
---
a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java
+++
b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java
@@ -1968,6 +1968,14 @@ public class ModelParser extends BaseParser {
default: yield identifiedTypeAttributeHandler().accept(def,
key, val);
}, noElementHandler(), noValueHandler());
}
+ protected Iso8583DataFormat doParseIso8583DataFormat() throws IOException,
XmlPullParserException {
+ return doParse(new Iso8583DataFormat(), (def, key, val) -> switch
(key) {
+ case "allowAutoWiredMessageFormat":
def.setAllowAutoWiredMessageFormat(val); yield true;
+ case "configFile": def.setConfigFile(val); yield true;
+ case "isoType": def.setIsoType(val); yield true;
+ default: yield identifiedTypeAttributeHandler().accept(def,
key, val);
+ }, noElementHandler(), noValueHandler());
+ }
protected JacksonXMLDataFormat doParseJacksonXMLDataFormat() throws
IOException, XmlPullParserException {
return doParse(new JacksonXMLDataFormat(), (def, key, val) -> switch
(key) {
case "allowJmsType": def.setAllowJmsType(val); yield true;
@@ -2958,6 +2966,7 @@ public class ModelParser extends BaseParser {
case "gzipDeflater": return doParseGzipDeflaterDataFormat();
case "hl7": return doParseHL7DataFormat();
case "ical": return doParseIcalDataFormat();
+ case "iso8583": return doParseIso8583DataFormat();
case "jacksonXml": return doParseJacksonXMLDataFormat();
case "jaxb": return doParseJaxbDataFormat();
case "jsonApi": return doParseJsonApiDataFormat();
diff --git
a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java
b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java
index 0e28133c7a9..1ce7c77f9e3 100644
---
a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java
+++
b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java
@@ -499,6 +499,9 @@ public class ModelWriter extends BaseWriter {
public void writeIcalDataFormat(IcalDataFormat def) throws IOException {
doWriteIcalDataFormat("ical", def);
}
+ public void writeIso8583DataFormat(Iso8583DataFormat def) throws
IOException {
+ doWriteIso8583DataFormat("iso8583", def);
+ }
public void writeJacksonXMLDataFormat(JacksonXMLDataFormat def) throws
IOException {
doWriteJacksonXMLDataFormat("jacksonXml", def);
}
@@ -1220,6 +1223,7 @@ public class ModelWriter extends BaseWriter {
case "GzipDeflaterDataFormat" ->
doWriteGzipDeflaterDataFormat("gzipDeflater", (GzipDeflaterDataFormat) v);
case "HL7DataFormat" -> doWriteHL7DataFormat("hl7",
(HL7DataFormat) v);
case "IcalDataFormat" -> doWriteIcalDataFormat("ical",
(IcalDataFormat) v);
+ case "Iso8583DataFormat" ->
doWriteIso8583DataFormat("iso8583", (Iso8583DataFormat) v);
case "JacksonXMLDataFormat" ->
doWriteJacksonXMLDataFormat("jacksonXml", (JacksonXMLDataFormat) v);
case "JaxbDataFormat" -> doWriteJaxbDataFormat("jaxb",
(JaxbDataFormat) v);
case "JsonDataFormat" -> doWriteJsonDataFormat("json",
(JsonDataFormat) v);
@@ -1980,6 +1984,7 @@ public class ModelWriter extends BaseWriter {
case "GzipDeflaterDataFormat" ->
doWriteGzipDeflaterDataFormat("gzipDeflater", (GzipDeflaterDataFormat) v);
case "HL7DataFormat" -> doWriteHL7DataFormat("hl7",
(HL7DataFormat) v);
case "IcalDataFormat" -> doWriteIcalDataFormat("ical",
(IcalDataFormat) v);
+ case "Iso8583DataFormat" ->
doWriteIso8583DataFormat("iso8583", (Iso8583DataFormat) v);
case "JacksonXMLDataFormat" ->
doWriteJacksonXMLDataFormat("jacksonXml", (JacksonXMLDataFormat) v);
case "JaxbDataFormat" -> doWriteJaxbDataFormat("jaxb",
(JaxbDataFormat) v);
case "JsonDataFormat" -> doWriteJsonDataFormat("json",
(JsonDataFormat) v);
@@ -2542,6 +2547,7 @@ public class ModelWriter extends BaseWriter {
case "GzipDeflaterDataFormat" ->
doWriteGzipDeflaterDataFormat("gzipDeflater", (GzipDeflaterDataFormat) v);
case "HL7DataFormat" -> doWriteHL7DataFormat("hl7",
(HL7DataFormat) v);
case "IcalDataFormat" -> doWriteIcalDataFormat("ical",
(IcalDataFormat) v);
+ case "Iso8583DataFormat" ->
doWriteIso8583DataFormat("iso8583", (Iso8583DataFormat) v);
case "JacksonXMLDataFormat" ->
doWriteJacksonXMLDataFormat("jacksonXml", (JacksonXMLDataFormat) v);
case "JaxbDataFormat" -> doWriteJaxbDataFormat("jaxb",
(JaxbDataFormat) v);
case "JsonDataFormat" -> doWriteJsonDataFormat("json",
(JsonDataFormat) v);
@@ -2663,6 +2669,14 @@ public class ModelWriter extends BaseWriter {
doWriteAttribute("validating", def.getValidating(), null);
endElement(name);
}
+ protected void doWriteIso8583DataFormat(String name, Iso8583DataFormat
def) throws IOException {
+ startElement(name);
+ doWriteIdentifiedTypeAttributes(def);
+ doWriteAttribute("allowAutoWiredMessageFormat",
def.getAllowAutoWiredMessageFormat(), "true");
+ doWriteAttribute("isoType", def.getIsoType(), null);
+ doWriteAttribute("configFile", def.getConfigFile(),
"j8583-config.xml");
+ endElement(name);
+ }
protected void doWriteJacksonXMLDataFormat(String name,
JacksonXMLDataFormat def) throws IOException {
startElement(name);
doWriteIdentifiedTypeAttributes(def);
@@ -3677,6 +3691,7 @@ public class ModelWriter extends BaseWriter {
case "GzipDeflaterDataFormat" ->
doWriteGzipDeflaterDataFormat("gzipDeflater", (GzipDeflaterDataFormat) v);
case "HL7DataFormat" -> doWriteHL7DataFormat("hl7",
(HL7DataFormat) v);
case "IcalDataFormat" -> doWriteIcalDataFormat("ical",
(IcalDataFormat) v);
+ case "Iso8583DataFormat" ->
doWriteIso8583DataFormat("iso8583", (Iso8583DataFormat) v);
case "JacksonXMLDataFormat" ->
doWriteJacksonXMLDataFormat("jacksonXml", (JacksonXMLDataFormat) v);
case "JaxbDataFormat" -> doWriteJaxbDataFormat("jaxb",
(JaxbDataFormat) v);
case "JsonDataFormat" -> doWriteJsonDataFormat("json",
(JsonDataFormat) v);
diff --git
a/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/ModelWriter.java
b/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/ModelWriter.java
index a53c5c4e591..b6e49bdab16 100644
---
a/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/ModelWriter.java
+++
b/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/ModelWriter.java
@@ -499,6 +499,9 @@ public class ModelWriter extends BaseWriter {
public void writeIcalDataFormat(IcalDataFormat def) throws IOException {
doWriteIcalDataFormat("ical", def);
}
+ public void writeIso8583DataFormat(Iso8583DataFormat def) throws
IOException {
+ doWriteIso8583DataFormat("iso8583", def);
+ }
public void writeJacksonXMLDataFormat(JacksonXMLDataFormat def) throws
IOException {
doWriteJacksonXMLDataFormat("jacksonXml", def);
}
@@ -1220,6 +1223,7 @@ public class ModelWriter extends BaseWriter {
case "GzipDeflaterDataFormat" ->
doWriteGzipDeflaterDataFormat("gzipDeflater", (GzipDeflaterDataFormat) v);
case "HL7DataFormat" -> doWriteHL7DataFormat("hl7",
(HL7DataFormat) v);
case "IcalDataFormat" -> doWriteIcalDataFormat("ical",
(IcalDataFormat) v);
+ case "Iso8583DataFormat" ->
doWriteIso8583DataFormat("iso8583", (Iso8583DataFormat) v);
case "JacksonXMLDataFormat" ->
doWriteJacksonXMLDataFormat("jacksonXml", (JacksonXMLDataFormat) v);
case "JaxbDataFormat" -> doWriteJaxbDataFormat("jaxb",
(JaxbDataFormat) v);
case "JsonDataFormat" -> doWriteJsonDataFormat("json",
(JsonDataFormat) v);
@@ -1980,6 +1984,7 @@ public class ModelWriter extends BaseWriter {
case "GzipDeflaterDataFormat" ->
doWriteGzipDeflaterDataFormat("gzipDeflater", (GzipDeflaterDataFormat) v);
case "HL7DataFormat" -> doWriteHL7DataFormat("hl7",
(HL7DataFormat) v);
case "IcalDataFormat" -> doWriteIcalDataFormat("ical",
(IcalDataFormat) v);
+ case "Iso8583DataFormat" ->
doWriteIso8583DataFormat("iso8583", (Iso8583DataFormat) v);
case "JacksonXMLDataFormat" ->
doWriteJacksonXMLDataFormat("jacksonXml", (JacksonXMLDataFormat) v);
case "JaxbDataFormat" -> doWriteJaxbDataFormat("jaxb",
(JaxbDataFormat) v);
case "JsonDataFormat" -> doWriteJsonDataFormat("json",
(JsonDataFormat) v);
@@ -2542,6 +2547,7 @@ public class ModelWriter extends BaseWriter {
case "GzipDeflaterDataFormat" ->
doWriteGzipDeflaterDataFormat("gzipDeflater", (GzipDeflaterDataFormat) v);
case "HL7DataFormat" -> doWriteHL7DataFormat("hl7",
(HL7DataFormat) v);
case "IcalDataFormat" -> doWriteIcalDataFormat("ical",
(IcalDataFormat) v);
+ case "Iso8583DataFormat" ->
doWriteIso8583DataFormat("iso8583", (Iso8583DataFormat) v);
case "JacksonXMLDataFormat" ->
doWriteJacksonXMLDataFormat("jacksonXml", (JacksonXMLDataFormat) v);
case "JaxbDataFormat" -> doWriteJaxbDataFormat("jaxb",
(JaxbDataFormat) v);
case "JsonDataFormat" -> doWriteJsonDataFormat("json",
(JsonDataFormat) v);
@@ -2663,6 +2669,14 @@ public class ModelWriter extends BaseWriter {
doWriteAttribute("validating", def.getValidating(), null);
endElement(name);
}
+ protected void doWriteIso8583DataFormat(String name, Iso8583DataFormat
def) throws IOException {
+ startElement(name);
+ doWriteIdentifiedTypeAttributes(def);
+ doWriteAttribute("allowAutoWiredMessageFormat",
def.getAllowAutoWiredMessageFormat(), "true");
+ doWriteAttribute("isoType", def.getIsoType(), null);
+ doWriteAttribute("configFile", def.getConfigFile(),
"j8583-config.xml");
+ endElement(name);
+ }
protected void doWriteJacksonXMLDataFormat(String name,
JacksonXMLDataFormat def) throws IOException {
startElement(name);
doWriteIdentifiedTypeAttributes(def);
@@ -3677,6 +3691,7 @@ public class ModelWriter extends BaseWriter {
case "GzipDeflaterDataFormat" ->
doWriteGzipDeflaterDataFormat("gzipDeflater", (GzipDeflaterDataFormat) v);
case "HL7DataFormat" -> doWriteHL7DataFormat("hl7",
(HL7DataFormat) v);
case "IcalDataFormat" -> doWriteIcalDataFormat("ical",
(IcalDataFormat) v);
+ case "Iso8583DataFormat" ->
doWriteIso8583DataFormat("iso8583", (Iso8583DataFormat) v);
case "JacksonXMLDataFormat" ->
doWriteJacksonXMLDataFormat("jacksonXml", (JacksonXMLDataFormat) v);
case "JaxbDataFormat" -> doWriteJaxbDataFormat("jaxb",
(JaxbDataFormat) v);
case "JsonDataFormat" -> doWriteJsonDataFormat("json",
(JsonDataFormat) v);
diff --git a/docs/components/modules/dataformats/examples/json/iso8583.json
b/docs/components/modules/dataformats/examples/json/iso8583.json
new file mode 120000
index 00000000000..78262cb2b85
--- /dev/null
+++ b/docs/components/modules/dataformats/examples/json/iso8583.json
@@ -0,0 +1 @@
+../../../../../../components/camel-iso8583/src/generated/resources/META-INF/org/apache/camel/dataformat/iso8583/iso8583.json
\ No newline at end of file
diff --git a/docs/components/modules/dataformats/nav.adoc
b/docs/components/modules/dataformats/nav.adoc
index 1e94462890a..e7763d999d9 100644
--- a/docs/components/modules/dataformats/nav.adoc
+++ b/docs/components/modules/dataformats/nav.adoc
@@ -21,6 +21,7 @@
** xref:gzipDeflater-dataformat.adoc[GZip Deflater]
** xref:hl7-dataformat.adoc[HL7]
** xref:ical-dataformat.adoc[iCal]
+** xref:iso8583-dataformat.adoc[ISO-8583]
** xref:jacksonXml-dataformat.adoc[Jackson XML]
** xref:jaxb-dataformat.adoc[JAXB]
** xref:fastjson-dataformat.adoc[JSON Fastjson]
diff --git a/docs/components/modules/dataformats/pages/iso8583-dataformat.adoc
b/docs/components/modules/dataformats/pages/iso8583-dataformat.adoc
new file mode 120000
index 00000000000..4e18596541b
--- /dev/null
+++ b/docs/components/modules/dataformats/pages/iso8583-dataformat.adoc
@@ -0,0 +1 @@
+../../../../../components/camel-iso8583/src/main/docs/iso8583-dataformat.adoc
\ No newline at end of file
diff --git
a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java
b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java
index a17a97a1b04..362cc6b2988 100644
---
a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java
+++
b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java
@@ -155,6 +155,7 @@ import org.apache.camel.model.dataformat.GrokDataFormat;
import org.apache.camel.model.dataformat.GzipDeflaterDataFormat;
import org.apache.camel.model.dataformat.HL7DataFormat;
import org.apache.camel.model.dataformat.IcalDataFormat;
+import org.apache.camel.model.dataformat.Iso8583DataFormat;
import org.apache.camel.model.dataformat.JacksonXMLDataFormat;
import org.apache.camel.model.dataformat.JaxbDataFormat;
import org.apache.camel.model.dataformat.JsonApiDataFormat;
@@ -3508,6 +3509,7 @@ public final class ModelDeserializers extends
YamlDeserializerSupport {
@YamlProperty(name = "gzipDeflater", type =
"object:org.apache.camel.model.dataformat.GzipDeflaterDataFormat", oneOf =
"dataFormatType"),
@YamlProperty(name = "hl7", type =
"object:org.apache.camel.model.dataformat.HL7DataFormat", oneOf =
"dataFormatType"),
@YamlProperty(name = "ical", type =
"object:org.apache.camel.model.dataformat.IcalDataFormat", oneOf =
"dataFormatType"),
+ @YamlProperty(name = "iso8583", type =
"object:org.apache.camel.model.dataformat.Iso8583DataFormat", oneOf =
"dataFormatType"),
@YamlProperty(name = "jacksonXml", type =
"object:org.apache.camel.model.dataformat.JacksonXMLDataFormat", oneOf =
"dataFormatType"),
@YamlProperty(name = "jaxb", type =
"object:org.apache.camel.model.dataformat.JaxbDataFormat", oneOf =
"dataFormatType"),
@YamlProperty(name = "json", type =
"object:org.apache.camel.model.dataformat.JsonDataFormat", oneOf =
"dataFormatType"),
@@ -3648,6 +3650,11 @@ public final class ModelDeserializers extends
YamlDeserializerSupport {
target.setDataFormatType(val);
break;
}
+ case "iso8583": {
+ org.apache.camel.model.dataformat.Iso8583DataFormat val =
asType(node, org.apache.camel.model.dataformat.Iso8583DataFormat.class);
+ target.setDataFormatType(val);
+ break;
+ }
case "jacksonXml": {
org.apache.camel.model.dataformat.JacksonXMLDataFormat val
= asType(node, org.apache.camel.model.dataformat.JacksonXMLDataFormat.class);
target.setDataFormatType(val);
@@ -3827,6 +3834,7 @@ public final class ModelDeserializers extends
YamlDeserializerSupport {
@YamlProperty(name = "gzipDeflater", type =
"object:org.apache.camel.model.dataformat.GzipDeflaterDataFormat"),
@YamlProperty(name = "hl7", type =
"object:org.apache.camel.model.dataformat.HL7DataFormat"),
@YamlProperty(name = "ical", type =
"object:org.apache.camel.model.dataformat.IcalDataFormat"),
+ @YamlProperty(name = "iso8583", type =
"object:org.apache.camel.model.dataformat.Iso8583DataFormat"),
@YamlProperty(name = "jacksonXml", type =
"object:org.apache.camel.model.dataformat.JacksonXMLDataFormat"),
@YamlProperty(name = "jaxb", type =
"object:org.apache.camel.model.dataformat.JaxbDataFormat"),
@YamlProperty(name = "json", type =
"object:org.apache.camel.model.dataformat.JsonDataFormat"),
@@ -4054,6 +4062,16 @@ public final class ModelDeserializers extends
YamlDeserializerSupport {
target.setDataFormats(existing);
break;
}
+ case "iso8583": {
+ org.apache.camel.model.dataformat.Iso8583DataFormat val =
asType(node, org.apache.camel.model.dataformat.Iso8583DataFormat.class);
+
java.util.List<org.apache.camel.model.DataFormatDefinition> existing =
target.getDataFormats();
+ if (existing == null) {
+ existing = new java.util.ArrayList<>();
+ }
+ existing.add(val);
+ target.setDataFormats(existing);
+ break;
+ }
case "jacksonXml": {
org.apache.camel.model.dataformat.JacksonXMLDataFormat val
= asType(node, org.apache.camel.model.dataformat.JacksonXMLDataFormat.class);
java.util.List<org.apache.camel.model.DataFormatDefinition> existing =
target.getDataFormats();
@@ -7537,6 +7555,63 @@ public final class ModelDeserializers extends
YamlDeserializerSupport {
}
}
+ @YamlType(
+ nodes = "iso8583",
+ types = org.apache.camel.model.dataformat.Iso8583DataFormat.class,
+ order =
org.apache.camel.dsl.yaml.common.YamlDeserializerResolver.ORDER_LOWEST - 1,
+ displayName = "ISO-8583",
+ description = "Create, edit and read ISO-8583 messages.",
+ deprecated = false,
+ properties = {
+ @YamlProperty(name = "allowAutoWiredMessageFormat", type =
"boolean", description = "Whether to auto-discover
com.solab.iso8583.MessageFactory from the registry", displayName = "Allow Auto
Wired Message Format"),
+ @YamlProperty(name = "configFile", type = "string",
defaultValue = "j8583-config.xml", description = "The j8583 configuration file
to load from classpath", displayName = "Config File"),
+ @YamlProperty(name = "id", type = "string", description =
"The id of this node", displayName = "Id"),
+ @YamlProperty(name = "isoType", type = "string",
description = "The default ISO-Type to use", displayName = "Iso Type")
+ }
+ )
+ public static class Iso8583DataFormatDeserializer extends
YamlDeserializerBase<Iso8583DataFormat> {
+ public Iso8583DataFormatDeserializer() {
+ super(Iso8583DataFormat.class);
+ }
+
+ @Override
+ protected Iso8583DataFormat newInstance() {
+ return new Iso8583DataFormat();
+ }
+
+ @Override
+ protected boolean setProperty(Iso8583DataFormat target, String
propertyKey,
+ String propertyName, Node node) {
+ propertyKey =
org.apache.camel.util.StringHelper.dashToCamelCase(propertyKey);
+ switch(propertyKey) {
+ case "allowAutoWiredMessageFormat": {
+ String val = asText(node);
+ target.setAllowAutoWiredMessageFormat(val);
+ break;
+ }
+ case "configFile": {
+ String val = asText(node);
+ target.setConfigFile(val);
+ break;
+ }
+ case "id": {
+ String val = asText(node);
+ target.setId(val);
+ break;
+ }
+ case "isoType": {
+ String val = asText(node);
+ target.setIsoType(val);
+ break;
+ }
+ default: {
+ return false;
+ }
+ }
+ return true;
+ }
+ }
+
@YamlType(
nodes = "jacksonXml",
types =
org.apache.camel.model.dataformat.JacksonXMLDataFormat.class,
@@ -9659,6 +9734,7 @@ public final class ModelDeserializers extends
YamlDeserializerSupport {
@YamlProperty(name = "hl7", type =
"object:org.apache.camel.model.dataformat.HL7DataFormat", oneOf =
"dataFormatType"),
@YamlProperty(name = "ical", type =
"object:org.apache.camel.model.dataformat.IcalDataFormat", oneOf =
"dataFormatType"),
@YamlProperty(name = "id", type = "string", description =
"Sets the id of this node", displayName = "Id"),
+ @YamlProperty(name = "iso8583", type =
"object:org.apache.camel.model.dataformat.Iso8583DataFormat", oneOf =
"dataFormatType"),
@YamlProperty(name = "jacksonXml", type =
"object:org.apache.camel.model.dataformat.JacksonXMLDataFormat", oneOf =
"dataFormatType"),
@YamlProperty(name = "jaxb", type =
"object:org.apache.camel.model.dataformat.JaxbDataFormat", oneOf =
"dataFormatType"),
@YamlProperty(name = "json", type =
"object:org.apache.camel.model.dataformat.JsonDataFormat", oneOf =
"dataFormatType"),
@@ -9803,6 +9879,11 @@ public final class ModelDeserializers extends
YamlDeserializerSupport {
target.setDataFormatType(val);
break;
}
+ case "iso8583": {
+ org.apache.camel.model.dataformat.Iso8583DataFormat val =
asType(node, org.apache.camel.model.dataformat.Iso8583DataFormat.class);
+ target.setDataFormatType(val);
+ break;
+ }
case "jacksonXml": {
org.apache.camel.model.dataformat.JacksonXMLDataFormat val
= asType(node, org.apache.camel.model.dataformat.JacksonXMLDataFormat.class);
target.setDataFormatType(val);
@@ -19882,6 +19963,7 @@ public final class ModelDeserializers extends
YamlDeserializerSupport {
@YamlProperty(name = "hl7", type =
"object:org.apache.camel.model.dataformat.HL7DataFormat", oneOf =
"dataFormatType"),
@YamlProperty(name = "ical", type =
"object:org.apache.camel.model.dataformat.IcalDataFormat", oneOf =
"dataFormatType"),
@YamlProperty(name = "id", type = "string", description =
"Sets the id of this node", displayName = "Id"),
+ @YamlProperty(name = "iso8583", type =
"object:org.apache.camel.model.dataformat.Iso8583DataFormat", oneOf =
"dataFormatType"),
@YamlProperty(name = "jacksonXml", type =
"object:org.apache.camel.model.dataformat.JacksonXMLDataFormat", oneOf =
"dataFormatType"),
@YamlProperty(name = "jaxb", type =
"object:org.apache.camel.model.dataformat.JaxbDataFormat", oneOf =
"dataFormatType"),
@YamlProperty(name = "json", type =
"object:org.apache.camel.model.dataformat.JsonDataFormat", oneOf =
"dataFormatType"),
@@ -20031,6 +20113,11 @@ public final class ModelDeserializers extends
YamlDeserializerSupport {
target.setDataFormatType(val);
break;
}
+ case "iso8583": {
+ org.apache.camel.model.dataformat.Iso8583DataFormat val =
asType(node, org.apache.camel.model.dataformat.Iso8583DataFormat.class);
+ target.setDataFormatType(val);
+ break;
+ }
case "jacksonXml": {
org.apache.camel.model.dataformat.JacksonXMLDataFormat val
= asType(node, org.apache.camel.model.dataformat.JacksonXMLDataFormat.class);
target.setDataFormatType(val);
diff --git
a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializersResolver.java
b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializersResolver.java
index aff887f78a3..74eaf91be9c 100644
---
a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializersResolver.java
+++
b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializersResolver.java
@@ -175,6 +175,8 @@ public final class ModelDeserializersResolver implements
YamlDeserializerResolve
case "org.apache.camel.model.InterceptFromDefinition": return new
ModelDeserializers.InterceptFromDefinitionDeserializer();
case "interceptSendToEndpoint": return new
ModelDeserializers.InterceptSendToEndpointDefinitionDeserializer();
case "org.apache.camel.model.InterceptSendToEndpointDefinition":
return new ModelDeserializers.InterceptSendToEndpointDefinitionDeserializer();
+ case "iso8583": return new
ModelDeserializers.Iso8583DataFormatDeserializer();
+ case "org.apache.camel.model.dataformat.Iso8583DataFormat": return
new ModelDeserializers.Iso8583DataFormatDeserializer();
case "jacksonXml": return new
ModelDeserializers.JacksonXMLDataFormatDeserializer();
case "org.apache.camel.model.dataformat.JacksonXMLDataFormat":
return new ModelDeserializers.JacksonXMLDataFormatDeserializer();
case "java": return new
ModelDeserializers.JavaExpressionDeserializer();
diff --git
a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json
b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json
index edf7f365b4b..2f426a89a67 100644
---
a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json
+++
b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json
@@ -2869,6 +2869,8 @@
"required" : [ "hl7" ]
}, {
"required" : [ "ical" ]
+ }, {
+ "required" : [ "iso8583" ]
}, {
"required" : [ "jacksonXml" ]
}, {
@@ -3065,6 +3067,14 @@
"$ref" :
"#/items/definitions/org.apache.camel.model.dataformat.IcalDataFormat"
}
}
+ }, {
+ "type" : "object",
+ "required" : [ "iso8583" ],
+ "properties" : {
+ "iso8583" : {
+ "$ref" :
"#/items/definitions/org.apache.camel.model.dataformat.Iso8583DataFormat"
+ }
+ }
}, {
"type" : "object",
"required" : [ "jacksonXml" ],
@@ -3312,6 +3322,7 @@
"gzipDeflater" : { },
"hl7" : { },
"ical" : { },
+ "iso8583" : { },
"jacksonXml" : { },
"jaxb" : { },
"json" : { },
@@ -7791,6 +7802,7 @@
"gzipDeflater" : { },
"hl7" : { },
"ical" : { },
+ "iso8583" : { },
"jacksonXml" : { },
"jaxb" : { },
"json" : { },
@@ -7866,6 +7878,8 @@
"required" : [ "hl7" ]
}, {
"required" : [ "ical" ]
+ }, {
+ "required" : [ "iso8583" ]
}, {
"required" : [ "jacksonXml" ]
}, {
@@ -8062,6 +8076,14 @@
"$ref" :
"#/items/definitions/org.apache.camel.model.dataformat.IcalDataFormat"
}
}
+ }, {
+ "type" : "object",
+ "required" : [ "iso8583" ],
+ "properties" : {
+ "iso8583" : {
+ "$ref" :
"#/items/definitions/org.apache.camel.model.dataformat.Iso8583DataFormat"
+ }
+ }
}, {
"type" : "object",
"required" : [ "jacksonXml" ],
@@ -10649,6 +10671,9 @@
"ical" : {
"$ref" :
"#/items/definitions/org.apache.camel.model.dataformat.IcalDataFormat"
},
+ "iso8583" : {
+ "$ref" :
"#/items/definitions/org.apache.camel.model.dataformat.Iso8583DataFormat"
+ },
"jacksonXml" : {
"$ref" :
"#/items/definitions/org.apache.camel.model.dataformat.JacksonXMLDataFormat"
},
@@ -11139,6 +11164,35 @@
}
}
},
+ "org.apache.camel.model.dataformat.Iso8583DataFormat" : {
+ "title" : "ISO-8583",
+ "description" : "Create, edit and read ISO-8583 messages.",
+ "type" : "object",
+ "additionalProperties" : false,
+ "properties" : {
+ "allowAutoWiredMessageFormat" : {
+ "type" : "boolean",
+ "title" : "Allow Auto Wired Message Format",
+ "description" : "Whether to auto-discover
com.solab.iso8583.MessageFactory from the registry"
+ },
+ "configFile" : {
+ "type" : "string",
+ "title" : "Config File",
+ "description" : "The j8583 configuration file to load from
classpath",
+ "default" : "j8583-config.xml"
+ },
+ "id" : {
+ "type" : "string",
+ "title" : "Id",
+ "description" : "The id of this node"
+ },
+ "isoType" : {
+ "type" : "string",
+ "title" : "Iso Type",
+ "description" : "The default ISO-Type to use"
+ }
+ }
+ },
"org.apache.camel.model.dataformat.JacksonXMLDataFormat" : {
"title" : "Jackson XML",
"description" : "Unmarshal an XML payloads to POJOs and back using
XMLMapper extension of Jackson.",
@@ -16407,6 +16461,8 @@
"required" : [ "hl7" ]
}, {
"required" : [ "ical" ]
+ }, {
+ "required" : [ "iso8583" ]
}, {
"required" : [ "jacksonXml" ]
}, {
@@ -16595,6 +16651,14 @@
"$ref" :
"#/items/definitions/org.apache.camel.model.dataformat.IcalDataFormat"
}
}
+ }, {
+ "type" : "object",
+ "required" : [ "iso8583" ],
+ "properties" : {
+ "iso8583" : {
+ "$ref" :
"#/items/definitions/org.apache.camel.model.dataformat.Iso8583DataFormat"
+ }
+ }
}, {
"type" : "object",
"required" : [ "jacksonXml" ],
@@ -16836,6 +16900,7 @@
"gzipDeflater" : { },
"hl7" : { },
"ical" : { },
+ "iso8583" : { },
"jacksonXml" : { },
"jaxb" : { },
"json" : { },
diff --git a/parent/pom.xml b/parent/pom.xml
index 7815bc27aaa..9da23960c48 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -175,6 +175,7 @@
<geronimo-j2ee-management-spec-version>1.1</geronimo-j2ee-management-spec-version>
<geronimo-jcdi-1.0-spec-version>1.0</geronimo-jcdi-1.0-spec-version>
<geronimo-jcdi-1.1-spec-version>1.0</geronimo-jcdi-1.1-spec-version>
+ <j8583-version>3.0.0</j8583-version>
<jakarta-jms-api-version>3.1.0</jakarta-jms-api-version>
<jakarta-persistence-api-version>3.2.0</jakarta-persistence-api-version>
<jakarta-json-api-version>2.1.3</jakarta-json-api-version>
@@ -1580,6 +1581,11 @@
<artifactId>camel-ironmq</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-iso8583</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jackson</artifactId>