EDIFACT EDI Connector 2.2 - Configuring Schemas - Mule 4

Standard versions of the schemas for all defined EDIFACT messages and supported versions are included with this connector. If your implementation conventions differ from the standard, you can create schemas to describe your messages.

Set Your Schema Locations

To configure schemas in Anypoint Studio:

  1. Switch to the XML view by clicking Configuration XML.

  2. Modify your EDIFACT EDI configuration to include a list of all schemas by adding an <http://edischema[edi:schema]> element for each document type:

<edifact-edi:config name="EDIFACT_EDI__Configuration" identKeys="true" doc:name="EDIFACT EDI: Configuration">
    <edifact:schema value="/edifact/d96a/ORDERS.esl"/>

After you create a global element for your EDIFACT EDI in Studio, configure any schemas and operations.

Configuration Options in XML

All values listed in the Studio configuration can be set directly in XML.

General parameters control both Send and Receive document handling.

XML Value Studio Option

schemas=list of values

List of schema paths the connector can use. Each path can be either a file system or classpath.


Substitution character used to replace invalid characters within string values when using the syntax level UNOA or UNOB.


Specification to use either separator or release characters as defaults for messages.


Data element separator character.


Component element separator character.


Repetition separator character.


Segment terminator character.


Release character.

Self-Identification Parameters

Use these parameters to identify your side of the trading partner relationship:

XML Value Studio Option


Mule interchange Sender or Receiver ID (UNB2.1/UNB3.1).


Interchange Sender or Receiver ID qualifier (UNB2.2/UNB3.2).

Partner Identification Parameters

These identify your partner.

XML Value Studio Option


Partner interchange Sender or Receiver ID for Mule application (UNB2.1/UNB3.1).


Partner interchange Sender or Receiver ID qualifier (UNB2.2/UNB3.2).

Parser Parameters for Error Conditions

These control the parser operation and the types of error conditions that reject Receive messages.

XML Value (default) Studio Option


Enforce the minimum and maximum lengths for receive values.


Enforce the repetition count limits for receive values.


Enforce valid characters for a Read operation. Only applies when using syntax levels UNOA and UNOB.


Allow unknown segments in a message.


Enforce the segment order in a message.


Allow segments marked as Unused in a message.


Enforce segment repetition count limits in a message.


Java character encoding used for Receive messages. This overrides receive UNB.


Require unique interchange control references (such as UNB.5). The default behavior records the interchange numbers previously processed and rejects duplicate interchange numbers from the same partner. It is derived from the interchange Sender and Receiver identification. Setting to false enables received interchange processing to continue and relies on the application flow to track the numbers and manage them appropriately.


Enforce globally unique message reference numbers (UNH.1) for received messages. By default, message reference numbers need to be unique only within a particular interchange. Setting to true requires message reference numbers to be unique across all interchanges received from the same partner and application. This is derived from the interchange sender and recipient identification.


Minimum number of days to store interchange, group, and message numbers for uniqueness checking.

Writer Parameters

These control the types of writer operations.

XML Value Studio Option


Character encoding used for writing messages. There must be one defined in each EDIFACT syntax version.


Syntax version for Send messages. Used to determine the data structures for service segments and CONTRL acknowledgment message structures in DataSense metadata for both Send and Receive.

lineEnding="NONE" "LF" "CRLF" "CR"

Line ending to add between segments. Improves the readability of the output message text by adding line endings between segments.


Always send the UNA service segment. A UNA is included only in an interchange when the syntax separator characters don’t match the defaults for both the syntax version and character encoding when in use. Setting to true means a UNA is always sent.


Enforce valid characters for a Write operation. This applies when using syntax levels UNOA and UNOB.


Send unique message reference numbers (UNH.1). false (default) assigns message reference numbers sequentially within each interchange and reuses them in a different interchange. true assigns unique transaction set numbers across all interchanges sent to the same partner. It is derived by the interchange sender and recipient identification.


The initial interchange control reference used for outgoing messages.


The initial Message Reference Number used for outgoing messages.


Request acknowledgments for Send interchanges using the Acknowledgment Request field (UNB.9).


Test indicator digit used on Send interchanges (UNB.11). By default interchanges are not sent as tests.


Choose your own data values for control-segment identifiers such as UNB and UNZ segments or use the supplied values. false always generates control numbers when writing letting you choose values.

Next Step

After you complete configuring the connector, you can try the Examples.

Was this article helpful?

💙 Thanks for your feedback!

Edit on GitHub