EDI to XML transformer
Transforms EDI messages into one or more XML messages
Transformer that uses Smooks for converting EDI messages into one or more XML documents.
Supports the following message payload types for the EDI content:
String
byte[]
File
*InputStream
*Reader
*StreamSource
*
The resulting XML documents will always be returned as a String
value.
*: 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.
EDI mapping
The EDI mapping file specifying the format of the request 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 EDI 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 EDI content (i.e. new lines not immediately following the end of a segment).
Default is false.
Charset
Character set to be used to decode the bytes of the incoming message into (readable) text. If the payload of the incoming message is already in "text form" (i.e. a String
, Reader
or StreamSource
), this property is not used.
Default is UTF-8
.
The supported encodings vary between different implementations of the Java platform, however the following encodings should always be available on any implementation: US-ASCII, ISO-8859-1, UTF-8, UTF-16BE, UTF-16LE, UTF-16.
A list of the supported encodings in the Sun/Oracle Java 6 SE runtime environment can be found here.
Additionally, eMagiz contains build-in support for the following two encodings:
- x-UTF-8-BOM (eight-bit Unicode Transformation Format, with byte-order mark)
- x-UTF-16BE-BOM (sixteen-bit UTF, big-endian byte order, with byte-order mark)
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