Table of Contents
Marshals data into a specified format for transmission over a transport or component
The Marshal pattern uses Apache Camel’s pluggable data format mechanism to convert messages to a format appropriate for transmission by one of the Apache Camel components.
The Marshal pattern can be placed anywhere in the body of a route. However, it is typically placed before endpoints that transmit the message to another location.
Table 78, “Marshal Properties” describes the properties you can specify using the properties editor.
Table 78. Marshal Properties
| Name | Description |
|---|---|
| Specifies the data type into which the data will be marshalled. For data formats that require configuration, the format’s tab provides the property fields to configure the marshaller. Because the GZip, Serialization, String, and Zip data formats are
part of the Camel core, you need not add dependencies for them in
your Maven
|
| Specifies a text description for the node. This description is included in the generated XML file, but it is informational only. It is not used by Apache Camel. |
| Specifies a unique identifier for the endpoint. The tooling automatically generates an id for a node when it is created, but you can remove that id or replace it with your own. The Camel debugger requires all nodes with a breakpoint set to have a unique id. You can use the id to refer to endpoints in your Camel XML file. |
| Specifies a reference to a Spring bean configuring the Apache Camel data format to which the message body is marshalled. |
avro Table 79, “avro Properties” describes the properties needed to configure the avro marshaller.
Table 79. avro Properties
| Name | Description |
|---|---|
| Specifies the name of the instance class to use for marshalling. This
is the class defined by your schema
|
base64 Table 80, “base64 Properties” describes the properties needed to configure the base64 marshaller.
Table 80. base64 Properties
| Name | Default | Description |
|---|---|---|
| 76 | Specifies the maximum line length. |
| \r\n | Specifies the line separator to use. |
| Disabled | When disabled, encodes |
beanio Table 81, “beanio Properties” describes the properties needed to configure the beanio marshaller.
Table 81. beanio Properties
| Name | Description |
|---|---|
| Specifies the charset to use. The default is platform-specific. |
| Species whether to ignore invalid records. The default is false. |
| Species whether to ignore invalid records. The default is false. |
| Species whether to ignore invalid records. The default is false. |
| Specifies the BeanIO mapping.xml file to use. By default, this file
is loaded from the classpath, but you can add one of the
prefixes — |
| Specifies the name of the stream to use. |
bindy Table 82, “bindy Properties” describes the properties needed to configure the bindy marshaller.
Table 82. bindy Properties
| Name | Description |
|---|---|
| Specifies a fully qualified class name that explicitly defines the type to use for marshalling. For example, you might enter com.mycompany.MyOrder You must use either this property or |
| Species the language name of the locale whose date and number format will be used. If not specified, the marshaller determines and uses the formatting of a default language name. Valid values are the two-letter abbreviation of the language name, in lower case. For example,
For an exhaustive list of language names, see Codes for the Representation of Names of Languages |
| Specifies the packages to use for marshalling. A package contains a defined model with required annotations properly associated for each class in the model. For example, you might enter com.mycompany. When specifying multiple packages, separate them with a comma
( You must use either this property or |
| Specifies the record type, Select either
|
castor Table 83, “castor Properties” describes the properties needed to configure the castor marshaller.
Table 83. castor Properties
| Name | Description |
|---|---|
| Specifies additional classes to add to the Castor XmlContext. Enter
the fully qualified path. When specifying multiple classes, separate
them with a comma ( |
| Specifies the encoding to use when marshalling an Object to XML. Default is UTF-8. |
| Specifies the path to the Castor mapping file to load from the classpath. |
| Specifies any additional packages to add to the Castor XmlContext.
Enter the fully qualified path. When specifying multiple classes,
separate them with a comma ( |
| Enables/disables validation. The default is Disabled. |
crypto Table 84, “crypto Properties” describes the properties needed to configure the crypto marshaller.
Table 84. crypto Properties
| Name | Description |
|---|---|
| Specifies the name of the JCE cryptographic algorithm to use. Default
is |
| Specifies a reference to the JCE |
| Specifies the size, in bytes, of the buffer used in the signature process. |
| Specifies the name of the JCE Security Provider to use. For options, see Java Cryptography Architecture; Sun Providers Documentation. |
| Specifies a reference to a byte array containing the Initialization Vector to use to initialize the cipher. Select from the list of available options. |
| Enables inlining the configured Initialization Vector into the encrypted data stream. |
| Specifies the value of the keyref
attribute within the <dataFormats>
element in a Spring configuration. For example, |
| Specifies the algorithm to use to create the Hash-based Message
Authentication. Default is |
| Enables calculating and appending a Message Authentication Code to the encrypted data. |
csv Table 85, “csv Properties” describes the properties needed to configure the csv marshaller.
Table 85. csv Properties
| Name | Description |
|---|---|
| Specifies whether to allow missing column names in the header line. The default is Disabled for formats
|
| Specifies the character to use to mark the start of a comment line. The default is null. |
| Disables the comment marker of the reference format. The default is False. |
| Specifies the character to use for the value delimiter,
typically The default is |
| Specifies the character to use as the escape character. The default is null, except for
|
| Disables the processing of escape characters. The default is False. |
Specifies the name of the reference format to use for parsing input. Predefined reference format options are:
| |
| Reference to a custom reference format. |
| Specifies the column to use to address values in the CSV records. If your CSV source contains
a first record that also defines column names, enable the
The default is null. |
| Disables processing of the column names specified in the
|
| Specifies whether empty lines between records are ignored or turned into empty records. The default is False for formats
|
| Specifies whether spaces surrounding values are trimmed or included as part of the value. The default is False for formats
|
| Not applicable. Specifies whether the unmarshaller should use an iterator to read lines on-the-fly as needed. The default is False, which specifies eager loading/reading all lines at once. |
| Specifies the string to use to convert to and from
|
| Disables null string processing. The default is False. |
| Specifies the character to use to encapsulate values containing
special characters. If not specified, uses the default character of the
reference format, which is double quotes ( |
| Disables quote processing. The default is False. |
| Not applicable. Specifies a reference to the record converter to use for unmarshalling when
The default is null. |
| Specifies the character or characters to use for the record separator. If not specified, uses the default of the reference format. The default is |
| Disables processing of the record separator. The default is False. |
| Specifies whether to skip the header record in the input file. Enable
this property if you define your own column headers using the
|
| Not applicable. Specifies whether the unmarshaller produces maps, instead of lists, for line values. When enabled, the input must have a header line (either defined or collected). The default is False. |
custom Table 86, “custom Properties” describes the properties needed to configure the custom marshaller.
Table 86. custom Properties
| Name | Description |
|---|---|
| Reference to file that implements your custom data format using the DataFormat interface. |
flatpack Table 87, “flatpack Properties” describes the properties needed to configure the jaxb marshaller.
Table 87. flatpack Properties
| Name | Description |
|---|---|
| Specifies whether to allow lines to be shorter than expected and to ignore the extra characters. The default is Disabled. |
| Specifies the flatpack pzmap configuration file to use to configure the structure of the input. If not specified, the configuration of the input defaults to Delimited. |
| Specifies the character to use to delimit values in the input for delimited input. The default is ,. |
| Specifies whether the input format is delimited or fixed-length. The default is Delimited. |
| Specifies whether to allow lines to be longer than expected and to ignore the extra characters. The default is Disabled. |
| Specifies whether to ignore the first line (containing headers) for delimited input. The default is Disabled. |
| Specifies the parser factory to use. If not specified, the default Flatpack parser factory is used. |
| Specifies the character to use to encapsulate text. The default is
double quotes ( |
ical Table 88, “ical Properties” describes the properties needed to configure the ical marshaller.
Table 88. ical Properties
| Name | Description |
|---|---|
| Specifies whether to enable validation checking. The default is Disabled. |
jaxb Table 89, “jaxb Properties” describes the properties needed to configure the jaxb marshaller.
Table 89. jaxb Properties
| Name | Description |
|---|---|
| Specifies the context path for the jaxb data format. For example,
|
| Specifies the encoding to use when marshalling data. Valid values include:
With no value specified, Red Hat JBoss Fuse Tooling for Eclipse defaults to the encoding used by JAXB. |
| Enables the filtering of non XML characters during marshalling such
that the marshaller replaces any non-XML characters it encounters with
the string |
| Enables the marshaller’s |
| Not applicable. Specifies whether the unmarshalled message body
contains the element instance value or the
|
| Specifies whether the Marshaller relaxes message checking for JAXB compatibility to marshal XML messages as is. To enable relaxed message checking, disable this property. The default is Enabled.. |
| Specifies the The JAXB implementation auto assigns namespace prefixes (such as
n1,n2, n3,…) to namespaces when marshalling JAXB or SOAP. To use
your own custom prefixes or to eliminate prefixes, you need to
create and reference a <util:map id="myMap">
<!-- Assign the prefix soap to the soap namespace -->
<entry key="http://www.w3.org/2003/05/soap-envelope" value="soap" />
<!-- Eliminate any prefix from our own namespace -->
<entry key="http://www.mycompny.com/foo/2" value="" />
</util:map> |
| Specifies the uri of the class within the XML tree that you want to
marshal, leaving all other classes in the tree as is. Set this property
in conjunction with |
| Specifies the |
| Enables pretty printing, which adds white space as needed to tidy up the resulting XML for easy reading. The default is Disabled. |
| Not applicable. Specifies the schema to use for validation when
unmarshalling. To use multiple schemas, separate them using commas
( |
| Not applicable. Specifies the location of the schema to use for
validation when unmarshalling XML (for example,
|
| Specifies the name of XMLStreamWriterWrapper to use to marshal the stream to XML. Using the XMLStreamWriterWrapper to customize the XMLStreamWriter, you can remove, escape, or replace non-XML characters. |
json Table 90, “json Properties” describes the properties needed to configure the json marshaller.
Table 90. json Properties
| Name | Description |
|---|---|
| Not applicable. For JMS destinations. Specifies whether to allow
unmarshalling from Json to POJO using dynamic class names. To implement,
you use the JMS message header |
| Specifies a reference to the name of a custom collection type in the Camel registry to use, instead of the default, which is based on java.util.Collection. |
| Specifies the name or names of features to disable on the
|
| Specifies the name or names of features to enable on the
|
| Enables the JAXB annotation module, allowing Jackson to use JAXB annotations. Requires the Jackson library. |
| Specifies the fields to exclude from the Json output when marshalling a POJO to Json, when using Gson or Xstream. |
| Specifies the fields to exclude from the Json output when marshalling
a POJO to Json when using Jackson. Requires the Jackson library. First
you create one or more marker classes, then annotate the marker classes
with the |
| Specifies the library to use for marshalling. Select either
|
| Specifies the name or names of custom Jackson modules to use from
|
| Specifies a reference to the name or names of custom Jackson modules to use from the Camel registry. Names are specified as a string of FNQ classnames. When referencing multiple modules, separate them with a comma. |
| Enables pretty printing, which adds white space as needed to tidy up the resulting XML for easy reading. |
| Not Applicable. |
| Not applicable. Specifies to use list for unmarshalling Json to a list of map POJO. Requires the Jackson library. |
pgp Table 91, “pgp Properties” describes the properties needed to configure the pgp marshaller.
Table 91. pgp Properties
| Name | Description |
|---|---|
| Specifies the symmetric key encryption algorithm to use for encryption. Valid values are
defined in
Some example values are:
|
| Specifies whether to base64 encode the encrypted text, so it can be copied/pasted, and so on. The default is Disabled. |
| Specifies the compression algorithm to use for encryption. Valid
values are defined in
Some example values are:
|
| Specifies the hash algorithm to use for signing during encryption.
Valid values are defined in Some example values are:
|
| Specifies whether to add an integrity check sign to the encrypted file. The default is Enabled. |
| Specifies the name of the keyring file that contains the public keys
to use to encrypt the data. This file must be accessible as
a classpath resource, but you can specify its
location in the file system using the |
| Specifies the user id of the key in the PGP keyring used during encryption. You can also specify a portion of a user ID. For example, for user ID "TEST USER <test@camel.com>", you can specify the "Test User" part or the "test@camel.com" part. |
| Specifies the password to use for opening the private key. This password is not used for encryption. |
| Specifies the Java Cryptography Extension (JCE) provider to use. The default is BC (Bouncy Castle). |
| Specifies an optional name of the keyring file to use for signing during encryption or for
signature verification during decryption. This file must be
accessible as a classpath resource, but you can specify its location
in the file system using the Do not set this option when |
| Specifies the keyring to use for signing during encryption or during signature verification. Do not set this option when |
| Specifies an optional user ID for the key in the PGP keyring used for signing during encryption or for signature verification during decryption. During the signature verification process, the specified
You can also specify a portion of the user ID. For example, for user ID "TEST USER <test@camel.com>", you can specify the "Test User" part or the "test@camel.com" part. |
| Specifies an optional password to use when opening the private key used for signing during encryption. |
| Not applicable. Controls the behavior of signature verification during decryption. Valid values are:
The default is optional. |
protobuf Table 92, “protobuf Properties” describes the properties needed to configure the protobuf marshaller.
Table 92. protobuf Properties
| Name | Description |
|---|---|
| Specifies the name of the instance class to use for marshalling. This
is one of the classes generated when you compiled your
|
secureXML Table 93, “secureXML Properties” describes the properties needed to configure the secureXML marshaller.
Table 93. secureXML Properties
| Name | Description |
|---|---|
| Enables/Disables adding the public key used to encrypt the session key as a key value in the EncryptedKey structure, when performing asymmetric key encryption. The default is Enabled. |
| Species the digest algorithm to use with the RSA OAEP algorithm. Default is XMLCipher.SHA1. Valid values are:
|
| Specifies the cipher algorithm to use to encrypt the asymmetric key. The default is XMLCipher.RSA_OAEP [Camel 2.12]. Valid values are:
Asymmetric key encryption is enabled when either this property or
the |
| Specifies the ID of the configuration options to use to create and load a keyStore instance that represents the sender’s trustStore, when performing asymmetric key encryption. |
| Specifies the password to use for retrieving the private key from the keystore, when performing asymmetric decryption. |
| Specifies the MFG algorithm to use with the RSA OAEP algorithm, when performing asymmetric key encryption. The default is EncryptionConstants.MFG1_SHA1. Valid values are:
|
| Specifies a string of alphanumeric characters to use as the passphrase for marshalling the message into cyphertext. The passphrase must be appropriate for the selected encryption algorithm. If not, the marshaller throws an exception. When no phrase is specified, the marshaller generates and uses a default passphrase. |
| Specifies the key alias to use for retrieving the recipient’s public or private key from a keyStore when performing asymmetric key encryption. |
| Specifies the XPath reference to the XML element to encrypt. If left blank, the entire XML message is encrypted. |
| Enables/disables encryption of the contents of the XML element. The default is Disabled, which encrypts the XML element. |
| Specifies the cipher algorithm to use for encrypting message content. Valid values a:re:
|
[a] Used for asymmetric key encryption | |
soapjaxb Table 94, “soapjaxb Properties” describes the properties needed to configure the soapjaxb marshaller.
Table 94. soapjaxb Properties
| Name | Description |
|---|---|
| Specifies the path of the package to use for initializing the JAXB context. |
| Specifies the bean reference to use to the element name and its namespace within the body of the soap message. Select for the list of available options. |
| Specifies the encoding to use when marshalling data. Valid values include:
With no value specified, Red Hat JBoss Fuse Tooling for Eclipse defaults to the encoding used by JAXB. |
| Specifies a reference to a map containing the namespace mapping to use when marshalling using JAXB or SOAP. This option enables you to override the default behavior of the JAXB implementation, which automatically assigns its own prefixes to namespaces. First you define the map with mappings made up of key/value pair
entries, each of which specifies a namespace (key) and prefix (value) to
use for it, and assign the map an id to
use as the NOTE: This option requires that JAXB-RI 2.1 or higher (from SUN) be on the classpath. |
| Specifies an existing schema to use for XML validation. You can use
the prefix |
| Specifies the version of soap to use. Options are 1.1 or 1.2; the default is 1.1. |
string Table 95, “string Properties” describes the properties needed to configure the string marshaller.
Table 95. string Properties
| Name | Description |
|---|---|
| Specifies the character set to use for encoding. Valid values include:
With no value specified, Red Hat JBoss Fuse Tooling for Eclipse defaults to the encoding used by the platform. |
uniVocity-csv Table 96, “uniVocity-csv Properties” describes the properties needed to configure the uniVocity-csv marshaller.
Table 96. uniVocity-csv Properties
| Name | Description |
|---|---|
| Enables/disables the production of maps, instead of lists, for line values. The default is Disabled, which causes the unmarshaller to produce lists instead of maps. When enabling this option to produce maps instead of lists, headers must be enabled and either defined or collected. |
| Specifies the character to use to identify a comment. The default is #. |
| Specifies the character to use to delimit values. The default is ,. |
| Specifies the string representation of an empty value. The default is " ". |
| Enables/disables reading in the first line of the test document as the header line. The default is Disabled. |
| Enables/disables headers. The default is
Disabled. When enabled, this option sets
the headers as |
| Specifies a unique identifier for the endpoint. The Id can be used to refer to the endpoint in the Camel XML file. |
| Enables/disables ignoring leading white spaces in a line. The default is Enabled. |
| Enables/disables ignoring trailing white spaces in a line. The default is Enabled. |
| Not applicable. Enables/disables unmarshaller reading lines on-the-fly. The default is Disabled, which instructs the unmarshaller to read all lines in batch. |
| Specifies the character to use to separate lines in a file. The default is the platform’s line separator. |
| Specifies the character to use as the normalized line separator for files. The default is \n. |
| Specifies the string representation of a |
| Specifies the maximum number of records to read. The default is -1 (no records). |
| Specifies the character to use to mark the beginning of a quoted value. The default is ". |
| Specifies whether to enclose all values in quotes when writing them. The default is Disabled. |
| Specifies the character to use to mark the end of a quoted value. The default is ". |
| Enables/disables ignoring empty lines. The default is Enabled. |
uniVocity-fixed Table 97, “uniVocity-fixed Properties” describes the properties needed to configure the uniVocity-fixed marshaller.
Table 97. uniVocity-fixed Properties
| Name | Description |
|---|---|
| Enables/disables the production of maps, instead of lists, for line values. The default is Disabled, which causes the unmarshaller to produce lists instead of maps. When enabling this option to produce maps instead of lists, headers must be enabled and either defined or collected. |
| Specifies the character to use to identify a comment. The default is #. |
| Specifies the string representation of an empty value. The default is " ". |
| Enables/disables reading in the first line of the test document as the header line. The default is Disabled. |
| Enables/disables headers. The default is
Disabled. When enabled, this option sets
the headers as |
| Specifies a unique identifier for the endpoint. The Id can be used to refer to the endpoint in the Camel XML file. |
| Enables/disables ignoring leading white spaces in a line. The default is Enabled. |
| Enables/disables ignoring trailing white spaces in a line. The default is Enabled. |
| Not applicable. Enables/disables unmarshaller reading lines on-the-fly. The default is Disabled, which instructs the unmarshaller to read all lines in batch. |
| Specifies the character to use to separate lines in a file. The default is the platform’s line separator. |
| Specifies the character to use as the normalized line separator for files. The default is \n. |
| Specifies the string representation of a |
| Specifies the maximum number of records to read. The default is -1 (no records). |
| Specifies the character to use for padding. The default is ' ' (white space). |
| Specifies whether records end at a new line. The default is Disabled. |
| Enables/disables ignoring empty lines. The default is Enabled. |
| Specifies whether to skip trailing spaces up to a new line. The default is Disabled. |
uniVocity-tsv Table 98, “uniVocity-tsv Properties” describes the properties needed to configure the uniVocity-tsv marshaller.
Table 98. uniVocity-tsv Properties
| Name | Description |
|---|---|
| Enables/disables the production of maps, instead of lists, for line values. The default is Disabled, which causes the unmarshaller to produce lists instead of maps. When enabling this option to produce maps instead of lists, headers must be enabled and either defined or collected. |
| Specifies the character to use to identify a comment. The default is #. |
| Specifies the string representation of an empty value. The default is " ". |
| Specifies the character to use for escape. The default is \. |
| Enables/disables reading in the first line of the test document as the header line. The default is Disabled. |
| Enables/disables headers. The default is
Disabled. When enabled, this option sets
the headers as |
| Specifies a unique identifier for the endpoint. The Id can be used to refer to the endpoint in the Camel XML file. |
| Enables/disables ignoring leading white spaces in a line. The default is Enabled. |
| Enables/disables ignoring trailing white spaces in a line. The default is Enabled. |
| Not applicable. Enables/disables unmarshaller reading lines on-the-fly. The default is Disabled, which instructs the unmarshaller to read all lines in batch. |
| Specifies the character to use to separate lines in a file. The default is the platform’s line separator. |
| Specifies the character to use as the normalized line separator for files. The default is \n. |
| Specifies the string representation of a |
| Specifies the maximum number of records to read. The default is -1 (no records). |
| Enables/disables ignoring empty lines. The default is Enabled. |
XmlBeans Table 99, “XmlBeans Properties” describes the properties needed to configure the XmlBeans marshaller.
Table 99. XmlBeans Properties
| Name | Description |
|---|---|
| Enables pretty printing, which adds white space as needed to tidy up the resulting XML for easy reading. |
Xmljson Table 100, “xmljson Properties” describes the properties needed to configure the xmljson marshaller.
![]() | Note |
|---|---|
An asterisk (*) to the right of a property name
(marshaller properties only) indicates that the default value for that property is
set by |
Table 100. xmljson Properties
| Name | Description |
|---|---|
| Applies to unmarshalling only. |
| Applies to unmarshalling only. |
| Applies to unmarshalling only. For marshalling, encoding is determined by the input String being
processed. When converting an input Stream,
|
| Applies to unmarshalling only. |
| Specifies whether the resulting json conversion starts off with a top-most element whose name matches the XML root element. When disabled (default), the xml string
|
| Applies to unmarshalling only. |
| Specifies whether to remove the namespace prefixes from XML-qualified elements so that the resulting json string does not contain them. The default is false. |
| Applies to unmarshalling only. |
| Specifies whether namespaces are ignored. When disabled (default),
they are added to the json output using |
| Specifies whether white spaces between XML elements are treated as text values or are ignored. When disabled (default), they are treated as text values. |
| Specifies whether leading and trailing white spaces are omitted in string values. When disabled (default), they are left untouched. |
| Applies to unmarshalling only. |
Xmlrpc Table 101, “Xmlrpc Properties” describes the properties needed to configure the Xmlrpc marshaller.
Table 101. Xmlrpc Properties
| Name | Description |
|---|---|
| When enabled, specifies the message is a request. When disabled, specifies the message is a response. The default is Disabled. |
zip Table 102, “zip Properties” describes the properties needed to configure the zip marshaller.
Table 102. zip Properties
| Name | Description |
|---|---|
| Specifies the level of compression for the marshaller to use. When no value is specified, the marshaller uses its default compression algorithm. Valid values are:
|
zipFile Table 103, “zipFile Properties” describes the properties needed to configure the zipFile marshaller.
Table 103. zipFile Properties
| Name | Description |
|---|---|
| Applies only to Unmarshalling. The default is
|