This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-4.8.x
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/camel-4.8.x by this push:
     new 74cd0992bb6 CAMEL-21482: camel-jaxb - JaxbDataFormat ignoreJAXBElement 
is default true
74cd0992bb6 is described below

commit 74cd0992bb6e3278def67a000ad279e99b93ae4b
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Thu Nov 28 10:28:54 2024 +0100

    CAMEL-21482: camel-jaxb - JaxbDataFormat ignoreJAXBElement is default true
---
 .../org/apache/camel/catalog/dataformats/jaxb.json |  6 ++---
 .../org/apache/camel/catalog/models/jaxb.json      |  6 ++---
 .../apache/camel/catalog/schemas/camel-spring.xsd  |  6 ++---
 .../org/apache/camel/converter/jaxb/jaxb.json      |  6 ++---
 .../org/apache/camel/model/dataformat/jaxb.json    |  6 ++---
 .../camel/model/dataformat/JaxbDataFormat.java     |  6 ++---
 .../reifier/dataformat/JaxbDataFormatReifier.java  | 27 +++++++++++++++++++---
 7 files changed, 42 insertions(+), 21 deletions(-)

diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/jaxb.json
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/jaxb.json
index 6974cb9c4a9..049f4a372d2 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/jaxb.json
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/jaxb.json
@@ -21,9 +21,9 @@
     "contextPathIsClassName": { "index": 2, "kind": "attribute", 
"displayName": "Context Path Is Class Name", "group": "common", "required": 
false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": 
"This can be set to true to mark that the contextPath is referring to a 
classname and not a package name." },
     "schema": { "index": 3, "kind": "attribute", "displayName": "Schema", 
"group": "common", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"description": "To validate against an existing schema. Your can use the prefix 
classpath:, file: or http: to specify how the resource should be resolved. You 
can separate multiple schema files by using the ',' character." },
     "schemaSeverityLevel": { "index": 4, "kind": "attribute", "displayName": 
"Schema Severity Level", "group": "common", "required": false, "type": "enum", 
"javaType": "java.lang.Integer", "enum": [ "0", "1", "2" ], "deprecated": 
false, "autowired": false, "secret": false, "defaultValue": "0", "description": 
"Sets the schema severity level to use when validating against a schema. This 
level determines the minimum severity error that triggers JAXB to stop continue 
parsing. The default val [...]
-    "prettyPrint": { "index": 5, "kind": "attribute", "displayName": "Pretty 
Print", "group": "common", "required": false, "type": "boolean", "javaType": 
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": false, "description": "To enable pretty printing output nicely 
formatted. Is by default false." },
-    "objectFactory": { "index": 6, "kind": "attribute", "displayName": "Object 
Factory", "group": "advanced", "label": "advanced", "required": false, "type": 
"boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": false, "description": "Whether to allow 
using ObjectFactory classes to create the POJO classes during marshalling. This 
only applies to POJO classes that has not been annotated with JAXB and 
providing jaxb.index desc [...]
-    "ignoreJAXBElement": { "index": 7, "kind": "attribute", "displayName": 
"Ignore JAXBElement", "group": "advanced", "label": "advanced", "required": 
false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": 
"Whether to ignore JAXBElement elements - only needed to be set to false in 
very special use-cases." },
+    "prettyPrint": { "index": 5, "kind": "attribute", "displayName": "Pretty 
Print", "group": "common", "required": false, "type": "boolean", "javaType": 
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": true, "description": "To enable pretty printing output nicely 
formatted. Is by default false." },
+    "objectFactory": { "index": 6, "kind": "attribute", "displayName": "Object 
Factory", "group": "advanced", "label": "advanced", "required": false, "type": 
"boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": true, "description": "Whether to allow 
using ObjectFactory classes to create the POJO classes during marshalling. This 
only applies to POJO classes that has not been annotated with JAXB and 
providing jaxb.index descr [...]
+    "ignoreJAXBElement": { "index": 7, "kind": "attribute", "displayName": 
"Ignore JAXBElement", "group": "advanced", "label": "advanced", "required": 
false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": true, "description": 
"Whether to ignore JAXBElement elements - only needed to be set to false in 
very special use-cases." },
     "mustBeJAXBElement": { "index": 8, "kind": "attribute", "displayName": 
"Must Be JAXBElement", "group": "advanced", "label": "advanced", "required": 
false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": 
"Whether marhsalling must be java objects with JAXB annotations. And if not 
then it fails. This option can be set to false to relax that, such as when the 
data is already in XML format." },
     "filterNonXmlChars": { "index": 9, "kind": "attribute", "displayName": 
"Filter Non Xml Chars", "group": "advanced", "label": "advanced", "required": 
false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": "To 
ignore non xml characheters and replace them with an empty space." },
     "encoding": { "index": 10, "kind": "attribute", "displayName": "Encoding", 
"group": "common", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"description": "To overrule and use a specific encoding" },
diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/jaxb.json
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/jaxb.json
index a5157f58459..d1e727e3b76 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/jaxb.json
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/jaxb.json
@@ -18,9 +18,9 @@
     "contextPathIsClassName": { "index": 2, "kind": "attribute", 
"displayName": "Context Path Is Class Name", "group": "common", "required": 
false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": 
"This can be set to true to mark that the contextPath is referring to a 
classname and not a package name." },
     "schema": { "index": 3, "kind": "attribute", "displayName": "Schema", 
"group": "common", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"description": "To validate against an existing schema. Your can use the prefix 
classpath:, file: or http: to specify how the resource should be resolved. You 
can separate multiple schema files by using the ',' character." },
     "schemaSeverityLevel": { "index": 4, "kind": "attribute", "displayName": 
"Schema Severity Level", "group": "common", "required": false, "type": "enum", 
"javaType": "java.lang.Integer", "enum": [ "0", "1", "2" ], "deprecated": 
false, "autowired": false, "secret": false, "defaultValue": "0", "description": 
"Sets the schema severity level to use when validating against a schema. This 
level determines the minimum severity error that triggers JAXB to stop continue 
parsing. The default val [...]
-    "prettyPrint": { "index": 5, "kind": "attribute", "displayName": "Pretty 
Print", "group": "common", "required": false, "type": "boolean", "javaType": 
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": false, "description": "To enable pretty printing output nicely 
formatted. Is by default false." },
-    "objectFactory": { "index": 6, "kind": "attribute", "displayName": "Object 
Factory", "group": "advanced", "label": "advanced", "required": false, "type": 
"boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": false, "description": "Whether to allow 
using ObjectFactory classes to create the POJO classes during marshalling. This 
only applies to POJO classes that has not been annotated with JAXB and 
providing jaxb.index desc [...]
-    "ignoreJAXBElement": { "index": 7, "kind": "attribute", "displayName": 
"Ignore JAXBElement", "group": "advanced", "label": "advanced", "required": 
false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": 
"Whether to ignore JAXBElement elements - only needed to be set to false in 
very special use-cases." },
+    "prettyPrint": { "index": 5, "kind": "attribute", "displayName": "Pretty 
Print", "group": "common", "required": false, "type": "boolean", "javaType": 
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": true, "description": "To enable pretty printing output nicely 
formatted. Is by default false." },
+    "objectFactory": { "index": 6, "kind": "attribute", "displayName": "Object 
Factory", "group": "advanced", "label": "advanced", "required": false, "type": 
"boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": true, "description": "Whether to allow 
using ObjectFactory classes to create the POJO classes during marshalling. This 
only applies to POJO classes that has not been annotated with JAXB and 
providing jaxb.index descr [...]
+    "ignoreJAXBElement": { "index": 7, "kind": "attribute", "displayName": 
"Ignore JAXBElement", "group": "advanced", "label": "advanced", "required": 
false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": true, "description": 
"Whether to ignore JAXBElement elements - only needed to be set to false in 
very special use-cases." },
     "mustBeJAXBElement": { "index": 8, "kind": "attribute", "displayName": 
"Must Be JAXBElement", "group": "advanced", "label": "advanced", "required": 
false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": 
"Whether marhsalling must be java objects with JAXB annotations. And if not 
then it fails. This option can be set to false to relax that, such as when the 
data is already in XML format." },
     "filterNonXmlChars": { "index": 9, "kind": "attribute", "displayName": 
"Filter Non Xml Chars", "group": "advanced", "label": "advanced", "required": 
false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": "To 
ignore non xml characheters and replace them with an empty space." },
     "encoding": { "index": 10, "kind": "attribute", "displayName": "Encoding", 
"group": "common", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"description": "To overrule and use a specific encoding" },
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 16367a950bd..e56505b1cbe 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
@@ -8978,7 +8978,7 @@ value: 0
           <xs:annotation>
             <xs:documentation xml:lang="en">
 <![CDATA[
-To enable pretty printing output nicely formatted. Is by default false. 
Default value: false
+To enable pretty printing output nicely formatted. Is by default false. 
Default value: true
 ]]>
             </xs:documentation>
           </xs:annotation>
@@ -8988,7 +8988,7 @@ To enable pretty printing output nicely formatted. Is by 
default false. Default
             <xs:documentation xml:lang="en">
 <![CDATA[
 Whether to allow using ObjectFactory classes to create the POJO classes during 
marshalling. This only applies to POJO
-classes that has not been annotated with JAXB and providing jaxb.index 
descriptor files. Default value: false
+classes that has not been annotated with JAXB and providing jaxb.index 
descriptor files. Default value: true
 ]]>
             </xs:documentation>
           </xs:annotation>
@@ -8997,7 +8997,7 @@ classes that has not been annotated with JAXB and 
providing jaxb.index descripto
           <xs:annotation>
             <xs:documentation xml:lang="en">
 <![CDATA[
-Whether to ignore JAXBElement elements - only needed to be set to false in 
very special use-cases. Default value: false
+Whether to ignore JAXBElement elements - only needed to be set to false in 
very special use-cases. Default value: true
 ]]>
             </xs:documentation>
           </xs:annotation>
diff --git 
a/components/camel-jaxb/src/generated/resources/META-INF/org/apache/camel/converter/jaxb/jaxb.json
 
b/components/camel-jaxb/src/generated/resources/META-INF/org/apache/camel/converter/jaxb/jaxb.json
index 6974cb9c4a9..049f4a372d2 100644
--- 
a/components/camel-jaxb/src/generated/resources/META-INF/org/apache/camel/converter/jaxb/jaxb.json
+++ 
b/components/camel-jaxb/src/generated/resources/META-INF/org/apache/camel/converter/jaxb/jaxb.json
@@ -21,9 +21,9 @@
     "contextPathIsClassName": { "index": 2, "kind": "attribute", 
"displayName": "Context Path Is Class Name", "group": "common", "required": 
false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": 
"This can be set to true to mark that the contextPath is referring to a 
classname and not a package name." },
     "schema": { "index": 3, "kind": "attribute", "displayName": "Schema", 
"group": "common", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"description": "To validate against an existing schema. Your can use the prefix 
classpath:, file: or http: to specify how the resource should be resolved. You 
can separate multiple schema files by using the ',' character." },
     "schemaSeverityLevel": { "index": 4, "kind": "attribute", "displayName": 
"Schema Severity Level", "group": "common", "required": false, "type": "enum", 
"javaType": "java.lang.Integer", "enum": [ "0", "1", "2" ], "deprecated": 
false, "autowired": false, "secret": false, "defaultValue": "0", "description": 
"Sets the schema severity level to use when validating against a schema. This 
level determines the minimum severity error that triggers JAXB to stop continue 
parsing. The default val [...]
-    "prettyPrint": { "index": 5, "kind": "attribute", "displayName": "Pretty 
Print", "group": "common", "required": false, "type": "boolean", "javaType": 
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": false, "description": "To enable pretty printing output nicely 
formatted. Is by default false." },
-    "objectFactory": { "index": 6, "kind": "attribute", "displayName": "Object 
Factory", "group": "advanced", "label": "advanced", "required": false, "type": 
"boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": false, "description": "Whether to allow 
using ObjectFactory classes to create the POJO classes during marshalling. This 
only applies to POJO classes that has not been annotated with JAXB and 
providing jaxb.index desc [...]
-    "ignoreJAXBElement": { "index": 7, "kind": "attribute", "displayName": 
"Ignore JAXBElement", "group": "advanced", "label": "advanced", "required": 
false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": 
"Whether to ignore JAXBElement elements - only needed to be set to false in 
very special use-cases." },
+    "prettyPrint": { "index": 5, "kind": "attribute", "displayName": "Pretty 
Print", "group": "common", "required": false, "type": "boolean", "javaType": 
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": true, "description": "To enable pretty printing output nicely 
formatted. Is by default false." },
+    "objectFactory": { "index": 6, "kind": "attribute", "displayName": "Object 
Factory", "group": "advanced", "label": "advanced", "required": false, "type": 
"boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": true, "description": "Whether to allow 
using ObjectFactory classes to create the POJO classes during marshalling. This 
only applies to POJO classes that has not been annotated with JAXB and 
providing jaxb.index descr [...]
+    "ignoreJAXBElement": { "index": 7, "kind": "attribute", "displayName": 
"Ignore JAXBElement", "group": "advanced", "label": "advanced", "required": 
false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": true, "description": 
"Whether to ignore JAXBElement elements - only needed to be set to false in 
very special use-cases." },
     "mustBeJAXBElement": { "index": 8, "kind": "attribute", "displayName": 
"Must Be JAXBElement", "group": "advanced", "label": "advanced", "required": 
false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": 
"Whether marhsalling must be java objects with JAXB annotations. And if not 
then it fails. This option can be set to false to relax that, such as when the 
data is already in XML format." },
     "filterNonXmlChars": { "index": 9, "kind": "attribute", "displayName": 
"Filter Non Xml Chars", "group": "advanced", "label": "advanced", "required": 
false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": "To 
ignore non xml characheters and replace them with an empty space." },
     "encoding": { "index": 10, "kind": "attribute", "displayName": "Encoding", 
"group": "common", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"description": "To overrule and use a specific encoding" },
diff --git 
a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/jaxb.json
 
b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/jaxb.json
index a5157f58459..d1e727e3b76 100644
--- 
a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/jaxb.json
+++ 
b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/jaxb.json
@@ -18,9 +18,9 @@
     "contextPathIsClassName": { "index": 2, "kind": "attribute", 
"displayName": "Context Path Is Class Name", "group": "common", "required": 
false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": 
"This can be set to true to mark that the contextPath is referring to a 
classname and not a package name." },
     "schema": { "index": 3, "kind": "attribute", "displayName": "Schema", 
"group": "common", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"description": "To validate against an existing schema. Your can use the prefix 
classpath:, file: or http: to specify how the resource should be resolved. You 
can separate multiple schema files by using the ',' character." },
     "schemaSeverityLevel": { "index": 4, "kind": "attribute", "displayName": 
"Schema Severity Level", "group": "common", "required": false, "type": "enum", 
"javaType": "java.lang.Integer", "enum": [ "0", "1", "2" ], "deprecated": 
false, "autowired": false, "secret": false, "defaultValue": "0", "description": 
"Sets the schema severity level to use when validating against a schema. This 
level determines the minimum severity error that triggers JAXB to stop continue 
parsing. The default val [...]
-    "prettyPrint": { "index": 5, "kind": "attribute", "displayName": "Pretty 
Print", "group": "common", "required": false, "type": "boolean", "javaType": 
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": false, "description": "To enable pretty printing output nicely 
formatted. Is by default false." },
-    "objectFactory": { "index": 6, "kind": "attribute", "displayName": "Object 
Factory", "group": "advanced", "label": "advanced", "required": false, "type": 
"boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": false, "description": "Whether to allow 
using ObjectFactory classes to create the POJO classes during marshalling. This 
only applies to POJO classes that has not been annotated with JAXB and 
providing jaxb.index desc [...]
-    "ignoreJAXBElement": { "index": 7, "kind": "attribute", "displayName": 
"Ignore JAXBElement", "group": "advanced", "label": "advanced", "required": 
false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": 
"Whether to ignore JAXBElement elements - only needed to be set to false in 
very special use-cases." },
+    "prettyPrint": { "index": 5, "kind": "attribute", "displayName": "Pretty 
Print", "group": "common", "required": false, "type": "boolean", "javaType": 
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": true, "description": "To enable pretty printing output nicely 
formatted. Is by default false." },
+    "objectFactory": { "index": 6, "kind": "attribute", "displayName": "Object 
Factory", "group": "advanced", "label": "advanced", "required": false, "type": 
"boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": true, "description": "Whether to allow 
using ObjectFactory classes to create the POJO classes during marshalling. This 
only applies to POJO classes that has not been annotated with JAXB and 
providing jaxb.index descr [...]
+    "ignoreJAXBElement": { "index": 7, "kind": "attribute", "displayName": 
"Ignore JAXBElement", "group": "advanced", "label": "advanced", "required": 
false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": true, "description": 
"Whether to ignore JAXBElement elements - only needed to be set to false in 
very special use-cases." },
     "mustBeJAXBElement": { "index": 8, "kind": "attribute", "displayName": 
"Must Be JAXBElement", "group": "advanced", "label": "advanced", "required": 
false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": 
"Whether marhsalling must be java objects with JAXB annotations. And if not 
then it fails. This option can be set to false to relax that, such as when the 
data is already in XML format." },
     "filterNonXmlChars": { "index": 9, "kind": "attribute", "displayName": 
"Filter Non Xml Chars", "group": "advanced", "label": "advanced", "required": 
false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": "To 
ignore non xml characheters and replace them with an empty space." },
     "encoding": { "index": 10, "kind": "attribute", "displayName": "Encoding", 
"group": "common", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"description": "To overrule and use a specific encoding" },
diff --git 
a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/JaxbDataFormat.java
 
b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/JaxbDataFormat.java
index d7181ce785f..4aeffcee004 100644
--- 
a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/JaxbDataFormat.java
+++ 
b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/JaxbDataFormat.java
@@ -45,13 +45,13 @@ public class JaxbDataFormat extends DataFormatDefinition 
implements ContentTypeH
     @Metadata(javaType = "java.lang.Integer", enums = "0,1,2", defaultValue = 
"0")
     private String schemaSeverityLevel;
     @XmlAttribute
-    @Metadata(javaType = "java.lang.Boolean")
+    @Metadata(javaType = "java.lang.Boolean", defaultValue = "true")
     private String prettyPrint;
     @XmlAttribute
-    @Metadata(label = "advanced", javaType = "java.lang.Boolean")
+    @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue 
= "true")
     private String objectFactory;
     @XmlAttribute
-    @Metadata(label = "advanced", javaType = "java.lang.Boolean")
+    @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue 
= "true")
     private String ignoreJAXBElement;
     @XmlAttribute
     @Metadata(label = "advanced", javaType = "java.lang.Boolean")
diff --git 
a/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/dataformat/JaxbDataFormatReifier.java
 
b/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/dataformat/JaxbDataFormatReifier.java
index 7ac3561b279..aa6325b97e1 100644
--- 
a/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/dataformat/JaxbDataFormatReifier.java
+++ 
b/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/dataformat/JaxbDataFormatReifier.java
@@ -30,9 +30,24 @@ public class JaxbDataFormatReifier extends 
DataFormatReifier<JaxbDataFormat> {
 
     @Override
     protected void prepareDataFormatConfig(Map<String, Object> properties) {
-        properties.put("prettyPrint", definition.getPrettyPrint());
-        properties.put("objectFactory", definition.getObjectFactory());
-        properties.put("ignoreJAXBElement", definition.getIgnoreJAXBElement());
+        if (definition.getPrettyPrint() != null) {
+            properties.put("prettyPrint", definition.getPrettyPrint());
+        } else {
+            // is default true
+            properties.put("prettyPrint", "true");
+        }
+        if (definition.getObjectFactory() != null) {
+            properties.put("objectFactory", definition.getObjectFactory());
+        } else {
+            // is default true
+            properties.put("objectFactory", "true");
+        }
+        if (definition.getIgnoreJAXBElement() != null) {
+            properties.put("ignoreJAXBElement", 
definition.getIgnoreJAXBElement());
+        } else {
+            // is default true
+            properties.put("ignoreJAXBElement", "true");
+        }
         properties.put("mustBeJAXBElement", definition.getMustBeJAXBElement());
         properties.put("filterNonXmlChars", definition.getFilterNonXmlChars());
         properties.put("fragment", definition.getFragment());
@@ -48,6 +63,12 @@ public class JaxbDataFormatReifier extends 
DataFormatReifier<JaxbDataFormat> {
         properties.put("schemaLocation", definition.getSchemaLocation());
         properties.put("noNamespaceSchemaLocation", 
definition.getNoNamespaceSchemaLocation());
         properties.put("jaxbProviderProperties", 
definition.getJaxbProviderProperties());
+        if (definition.getContentTypeHeader() != null) {
+            properties.put("contentTypeHeader", 
definition.getContentTypeHeader());
+        } else {
+            // is default true
+            properties.put("contentTypeHeader", "true");
+        }
         properties.put("accessExternalSchemaProtocols", 
definition.getAccessExternalSchemaProtocols());
     }
 

Reply via email to