UN/EDIFACT to XML transformer
Transforms UN/EDIFACT interchanges into one or more XML messages
Transformer that uses Smooks for converting UN/EDIFACT interchanges into one or more XML documents.
Supports the following message payload types for the UN/EDIFACT content:
byte[]
File
*InputStream
*Reader
*StreamSource
*String
(not recommended)
The resulting XML documents will always be returned as a String
value. While a String
value is also supported as the input type, this is not recommended because the correct character encoding is specified within the UN/EDIFACT message (segment UNB
).
*: Note that this transformer is capable of processing huge message streams by splitting them into a series of many smaller messages: to achieve this specify a target selector on the advanced tab.
UN/EDIFACT version
The version of the incoming UN/EDIFACT messages.
Required
Delete files
Specify whether to delete the source file after a (successful) transformation.
When set to true, it will only have an effect if the inbound message has a File
payload or a file_originalFile
header value containing either a File
instance or a String
representing the original file path.
Default is false.
Validate
Whether to perform data validation when processing the UN/EDIFACT content.
Note this validation only applies to the contents of fields/components/subcomponents that have one or more of the following settings specified: data type, min length or max length. The structure of the message is always validated during processing, irregardless of this setting.
Default is false.
Ignore new lines
Whether to ignore "unexpected" new lines in the UN/EDIFACT content (i.e. new lines not immediately following the end of a segment).
Default is false.
Ignore empty nodes
Whether to ignore empty nodes (i.e. fields with no content), or to generate empty XML elements in these cases instead.
Default is true.
Target selector
Smooks selector expression for splitting the EDI message stream into fragments for the output XML messages.
Default is $document
, which results in the entire incoming EDI message stream being transformed into a single XML message.
Selector namespace
Optional XML namespace for the selector expression.
If specified, XML elements will only match the target selector expression if they have the exact same namespace. If not specified (the default), the namespace is ignored when matching XML elements to the target selector expression.
Requires reply
Whether this transformer must send at least one message to the output channel for each incoming message. If enabled and an incoming message doesn't result in at least one outgoing message, a ReplyRequiredException
is thrown instead.
Default is true.
Apply sequence
Whether to add the sequence headers (correlationId
, sequenceNumber
and sequenceSize
) to the output messages.
Note that because of the streaming nature of this transformer, the correct value for the sequenceSize
header cannot be determined when sending the output messages: value -1
is used instead.
Default is false.
Send timeout
Set the timeout (in milliseconds) for sending messages to the output channel.
Default is -1
, i.e. wait indefinitely.
Output channel
Channel where output messages should be sent after (successfully) processing the input message.
You can select the nullChannel
here to silently drop the output messages.
Required
Input channel
Channel to consume the input messages from.
Required
Id
Name that uniquely identifies this flow component.
Required