EDIFACTReader Component

Properties   Methods   Events   Config Settings   Errors  

The EDIFACTReader component efficiently parses complete EDIFACT transmissions, providing a convenient way to extract and explore data from all included messages.

Syntax

nsoftware.EDISDK.EDIFACTReader

Remarks

The component allows you to parse an incoming EDI document. To parse a document, first, use LoadSchema to load a schema file into the component. Next, select the document you want to process by setting InputFile or InputData and calling Parse.

As the component processes the document, its events will fire and the contents of the document will be available in the Interchange, FunctionalGroup, Message, Segment, Element, and Component properties. The corresponding *Index properties can be thought of as a path within the document. For example, setting the MessageIndex property will cause the SegmentCount property to be updated with the number of segments within the selected message, and then the SegmentIndex property can be used to select one of the segments within that message.

To manage the amount of memory used during processing, the BuildDOM property can be used to select how much of the message will be available in the properties at once:

  • bdEntireDocument - The entire document will be available at once.
  • bdInterchange - Only the current interchange and its contents will be available.
  • bdMessage - Only the current message will be available.
  • bdNone - Only the current segment and its elements will be available.

During parsing, the component performs basic validation of the incoming document. If an error is encountered, the ValidateWarning event will fire.

Property List


The following is the full list of the properties of the component with short descriptions. Click on the links for further details.

AckTypeSpecifies the type of ACK that will be generated by GenerateAck .
BuildDOMControls how much of the document will be stored during parsing.
ComponentThe current component.
ComponentCountThe number of components in the current Element.
ComponentIndexThe index of the current Component.
DelimitersContains the delimiters for the EDI Document.
ElementThe current element.
ElementCountThe number of elements in the current Segment.
ElementIndexThe index of the current Element.
FunctionalGroupThe current FunctionalGroup
FunctionalGroupCountThe number of FunctionalGroups in the current Interchange.
FunctionalGroupIndexThe index of the current FunctionalGroup.
GroupSpecifies the group to load segments from.
InputDataThe EDI message, specified as a string.
InputFileThe file containing the EDI message.
InterchangeThe current Interchange.
InterchangeCountThe number of Interchanges in the document.
InterchangeIndexThe index of the current Interchange
MessageThe current message.
MessageCountThe number of message in the current Interchange or FunctionalGroup.
MessageIndexThe index of the current Message.
SegmentThe current segment.
SegmentCountThe number of segments in the current Message.
SegmentIndexThe index of the current segment.
ValidateOnParseWhen True , the component will validate any documents it parses.

Method List


The following is the full list of the methods of the component with short descriptions. Click on the links for further details.

ConfigSets or retrieves a configuration setting.
GenerateAckGenerates an ACK in response to the most recently parsed message.
GetElementValueReturns the value of the element or component at the specified path.
LoadSchemaLoads schema information from a file or string data.
ParseParse the EDI document and fire parsing events.
ResetResets all properties to their default values.
SchemaCodeDefines a code value within a list of codes.
SchemaCodeListDefines a list of codes.
SchemaCompositeDefines a composite element.
SchemaElementDefines a simple element.
SchemaElementRefAdds a reference to an element in a segment or composite element.
SchemaEndEnds a schema definition.
SchemaGroupDefines a group of segments.
SchemaMessageDefines a message.
SchemaSegmentDefines a segment.
SchemaSegmentRefAdds a reference to a segment in a message or group.
SchemaStartStarts a schema definition.
SetInputStreamThe stream containing the EDI data.
ValidateValidate the EDI document and warn about any errors encountered.

Event List


The following is the full list of the events fired by the component with short descriptions. Click on the links for further details.

EndFunctionalGroupFires at the end of a functional group while parsing.
EndGroupFires at the end of a group while parsing a message.
EndInterchangeFires at the end of an interchange while parsing.
EndMessageFires at the end of a message while parsing.
ErrorFires when an error occurs during message processing. Normally, the component fails with an error.
ResolveSchemaFires whenever a new EDIFACT message is encountered and no schema is found for it.
SegmentFires at the end of a Segment while parsing.
StartFunctionalGroupFires at the beginning of a functional group while parsing.
StartGroupFires at the beginning of a group while parsing a message.
StartInterchangeFires at the beginning of an interchange while parsing.
StartMessageFires at the beginning of a message while parsing.
ValidateWarningFires to warn about validation errors.

Config Settings


The following is a list of config settings for the component with short descriptions. Click on the links for further details.

DelimitersFromUNAA flag indicating if delimiters were read from UNA segment.
InputFormatThe format of the input document.
MaxValidationErrorsThe maximum number of validation errors to return.

AckType Property (EDIFACTReader Component)

Specifies the type of ACK that will be generated by GenerateAck .

Syntax

public EDIFACTReaderAckTypes AckType { get; set; }

enum EDIFACTReaderAckTypes { atFunctionalCONTRL, atTechnicalCONTRL }
Public Property AckType As EdifactreaderAckTypes

Enum EDIFACTReaderAckTypes atFunctionalCONTRL atTechnicalCONTRL End Enum

Default Value

0

Remarks

This setting specifies the type of ACK that will be generated when GenerateAck is called. Options include:

Functional CONTRL (atFunctionalCONTRL - 0)A functional CONTRL message. If any syntax errors are encountered when parsing the message, the response will indicate the details of the issue.
Technical CONTRL (atTechnicalCONTRL - 1)A technical CONTRL message, which confirms receipt of the message but not the results of parsing the message.

This property is not available at design time.

BuildDOM Property (EDIFACTReader Component)

Controls how much of the document will be stored during parsing.

Syntax

public EDIFACTReaderBuildDOMs BuildDOM { get; set; }

enum EDIFACTReaderBuildDOMs { bdEntireDocument, bdInterchange, bdMessage, bdNone }
Public Property BuildDOM As EdifactreaderBuildDOMs

Enum EDIFACTReaderBuildDOMs bdEntireDocument bdInterchange bdMessage bdNone End Enum

Default Value

0

Remarks

This property controls how much of the document will be stored in an internal model during parsing:

0 (bdEntireDocument) The entire document.
1 (bdInterchange) The current interchange.
2 (bdMessage) The current message.
3 (bdNone) No data will be stored and only the events can be used to process the document.

This property is not available at design time.

Component Property (EDIFACTReader Component)

The current component.

Syntax

public EDIElement Component { get; }
Public ReadOnly Property Component As EDIElement

Remarks

When the current Element is a composite element, this property contains the component specified by ComponentIndex.

This property is read-only and not available at design time.

Please refer to the EDIElement type for a complete list of fields.

ComponentCount Property (EDIFACTReader Component)

The number of components in the current Element.

Syntax

public int ComponentCount { get; }
Public ReadOnly Property ComponentCount As Integer

Default Value

0

Remarks

If the current Element is composite, this property contains the number of components within the element.

This property is read-only and not available at design time.

ComponentIndex Property (EDIFACTReader Component)

The index of the current Component.

Syntax

public int ComponentIndex { get; set; }
Public Property ComponentIndex As Integer

Default Value

1

Remarks

If the current Element is composite, this property is used to specify a Component within the element.

Note: When BuildDOM is set to bdentiredoc, after Parse is called the entire EDI document is parsed and stored in memory. You can then use InterchangeIndex, FunctionalGroupIndex, MessageIndex, SegmentIndex, ElementIndex and ComponentIndex to navigate to a specific Component within the parsed document.

This property is not available at design time.

Delimiters Property (EDIFACTReader Component)

Contains the delimiters for the EDI Document.

Syntax

public EDIFACTDelimiters Delimiters { get; }
Public ReadOnly Property Delimiters As EDIFACTDelimiters

Remarks

This property contains the delimiters that will be used when parsing the EDIFACT document. If the document uses delimiters other than the default, change the properties of this object to parse the document correctly.

This property is read-only and not available at design time.

Please refer to the EDIFACTDelimiters type for a complete list of fields.

Element Property (EDIFACTReader Component)

The current element.

Syntax

public EDIElement Element { get; }
Public ReadOnly Property Element As EDIElement

Remarks

This property contains the element within the current Segment specified by ElementIndex.

This property is read-only and not available at design time.

Please refer to the EDIElement type for a complete list of fields.

ElementCount Property (EDIFACTReader Component)

The number of elements in the current Segment.

Syntax

public int ElementCount { get; }
Public ReadOnly Property ElementCount As Integer

Default Value

0

Remarks

This property contains the number of elements in the current Segment.

This property is read-only and not available at design time.

ElementIndex Property (EDIFACTReader Component)

The index of the current Element.

Syntax

public int ElementIndex { get; set; }
Public Property ElementIndex As Integer

Default Value

1

Remarks

This property is used to specify an Element within the current Segment.

Note: When BuildDOM is set to bdentiredoc, after Parse is called the entire EDI document is parsed and stored in memory. You can then use InterchangeIndex, FunctionalGroupIndex, MessageIndex, SegmentIndex and ElementIndex to navigate to specific Element within the parsed document.

This property is not available at design time.

FunctionalGroup Property (EDIFACTReader Component)

The current FunctionalGroup

Syntax

public EDIFACTFunctionalGroup FunctionalGroup { get; }
Public ReadOnly Property FunctionalGroup As EDIFACTFunctionalGroup

Remarks

This property contains the current FunctionalGroup within the Interchange This property is read-only and not available at design time. Please refer to the FunctionalGroup type for a complete list of fields.

This property is read-only and not available at design time.

Please refer to the EDIFACTFunctionalGroup type for a complete list of fields.

FunctionalGroupCount Property (EDIFACTReader Component)

The number of FunctionalGroups in the current Interchange.

Syntax

public int FunctionalGroupCount { get; }
Public ReadOnly Property FunctionalGroupCount As Integer

Default Value

0

Remarks

This property contains the number of FunctionalGroups in the current Interchange.

This property is read-only and not available at design time.

FunctionalGroupIndex Property (EDIFACTReader Component)

The index of the current FunctionalGroup.

Syntax

public int FunctionalGroupIndex { get; set; }
Public Property FunctionalGroupIndex As Integer

Default Value

1

Remarks

This property is used to specify a FunctionalGroup within the current Interchange.

Note: When BuildDOM is set to bdentiredoc, after Parse is called the entire EDI document is parsed and stored in memory, including all interchanges, and functional groups. You can then use InterchangeIndex and FunctionalGroupIndex to navigate to a specific FunctionalGroup within the parsed document.

This property is not available at design time.

Group Property (EDIFACTReader Component)

Specifies the group to load segments from.

Syntax

public string Group { get; set; }
Public Property Group As String

Default Value

""

Remarks

When this property is set, only segments from the specified group and iteration will be available through the Segment properties.

A path for a group consists of the name of the group followed by an index indicating the iteration, like this:

reader.Group = "CPSGroup[2]";

If the group is nested inside of another group, the parent and child are connected by a ".":

reader.Group = "CPSGroup[2].LINGroup[2]"; That can be repeated if a group is nested more than one level deep.

This property is not available at design time.

InputData Property (EDIFACTReader Component)

The EDI message, specified as a string.

Syntax

public string InputData { get; set; }
Public Property InputData As String

Default Value

""

Remarks

Set this property to specify the input EDI message as a string. The message can then be parsed with Parse.

This property is not available at design time.

InputFile Property (EDIFACTReader Component)

The file containing the EDI message.

Syntax

public string InputFile { get; set; }
Public Property InputFile As String

Default Value

""

Remarks

Set this property to specify a file to read the input EDI message from. The message can then be parsed with Parse.

This property is not available at design time.

Interchange Property (EDIFACTReader Component)

The current Interchange.

Syntax

public EDIFACTInterchange Interchange { get; }
Public ReadOnly Property Interchange As EDIFACTInterchange

Remarks

This property contains the current Interchange within the document specified by InterchangeIndex.

This property is read-only and not available at design time.

Please refer to the EDIFACTInterchange type for a complete list of fields.

InterchangeCount Property (EDIFACTReader Component)

The number of Interchanges in the document.

Syntax

public int InterchangeCount { get; }
Public ReadOnly Property InterchangeCount As Integer

Default Value

0

Remarks

This property contains the number of Interchanges in the current document.

This property is read-only and not available at design time.

InterchangeIndex Property (EDIFACTReader Component)

The index of the current Interchange

Syntax

public int InterchangeIndex { get; set; }
Public Property InterchangeIndex As Integer

Default Value

1

Remarks

This property is used to specify an Interchange within the document.

Note: When BuildDOM is set to bdentiredoc, after Parse is called the entire EDI document is parsed and stored in memory, including all interchanges. You can then use InterchangeIndex to navigate to specific Interchange within the parsed document.

This property is not available at design time.

Message Property (EDIFACTReader Component)

The current message.

Syntax

public EDIFACTMessage Message { get; }
Public ReadOnly Property Message As EDIFACTMessage

Remarks

This property contains the message within the current Interchange or FunctionalGroup specified by MessageIndex.

This property is read-only and not available at design time.

Please refer to the EDIFACTMessage type for a complete list of fields.

MessageCount Property (EDIFACTReader Component)

The number of message in the current Interchange or FunctionalGroup.

Syntax

public int MessageCount { get; }
Public ReadOnly Property MessageCount As Integer

Default Value

0

Remarks

This property contains the number of messages in the current Interchange or FunctionalGroup.

This property is read-only and not available at design time.

MessageIndex Property (EDIFACTReader Component)

The index of the current Message.

Syntax

public int MessageIndex { get; set; }
Public Property MessageIndex As Integer

Default Value

1

Remarks

This property is used to specify a Message within the current Interchange or FunctionalGroup.

Note: When BuildDOM is set to bdentiredoc, after Parse is called the entire EDI document is parsed and stored in memory, including all interchanges, functional groups, and messages. You can then use InterchangeIndex, FunctionalGroupIndex and MessageIndex to navigate to a specific Message within the parsed document.

This property is not available at design time.

Segment Property (EDIFACTReader Component)

The current segment.

Syntax

public EDISegment Segment { get; }
Public ReadOnly Property Segment As EDISegment

Remarks

This property contains the segment within the current Message specified by SegmentIndex.

This property is read-only and not available at design time.

Please refer to the EDISegment type for a complete list of fields.

SegmentCount Property (EDIFACTReader Component)

The number of segments in the current Message.

Syntax

public int SegmentCount { get; }
Public ReadOnly Property SegmentCount As Integer

Default Value

0

Remarks

This property contains the number of elements in the current Message.

This property is read-only and not available at design time.

SegmentIndex Property (EDIFACTReader Component)

The index of the current segment.

Syntax

public int SegmentIndex { get; set; }
Public Property SegmentIndex As Integer

Default Value

1

Remarks

This property is used to specify a Segment within the current Message.

Note: When BuildDOM is set to bdentiredoc, after Parse is called the entire EDI document is parsed and stored in memory. You can then use InterchangeIndex, FunctionalGroupIndex, MessageIndex and SegmentIndex to navigate to specific Segment within the parsed document.

This property is not available at design time.

ValidateOnParse Property (EDIFACTReader Component)

When True , the component will validate any documents it parses.

Syntax

public bool ValidateOnParse { get; set; }
Public Property ValidateOnParse As Boolean

Default Value

False

Remarks

When this property is set to True, the component will perform validation on the document when Parse is called. The ValidateWarning event will fire for each error it encounters.

This property is not available at design time.

Config Method (EDIFACTReader Component)

Sets or retrieves a configuration setting.

Syntax

public string Config(string configurationString);

Async Version
public async Task<string> Config(string configurationString);
public async Task<string> Config(string configurationString, CancellationToken cancellationToken);
Public Function Config(ByVal ConfigurationString As String) As String

Async Version
Public Function Config(ByVal ConfigurationString As String) As Task(Of String)
Public Function Config(ByVal ConfigurationString As String, cancellationToken As CancellationToken) As Task(Of String)

Remarks

Config is a generic method available in every component. It is used to set and retrieve configuration settings for the component.

These settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the component, access to these internal properties is provided through the Config method.

To set a configuration setting named PROPERTY, you must call Config("PROPERTY=VALUE"), where VALUE is the value of the setting expressed as a string. For boolean values, use the strings "True", "False", "0", "1", "Yes", or "No" (case does not matter).

To read (query) the value of a configuration setting, you must call Config("PROPERTY"). The value will be returned as a string.

GenerateAck Method (EDIFACTReader Component)

Generates an ACK in response to the most recently parsed message.

Syntax

public string GenerateAck();

Async Version
public async Task<string> GenerateAck();
public async Task<string> GenerateAck(CancellationToken cancellationToken);
Public Function GenerateAck() As String

Async Version
Public Function GenerateAck() As Task(Of String)
Public Function GenerateAck(cancellationToken As CancellationToken) As Task(Of String)

Remarks

After parsing a message, call this method to generate an ACK that you can send back in response. The type of ACK generated can be controlled by setting the AckType property.

GetElementValue Method (EDIFACTReader Component)

Returns the value of the element or component at the specified path.

Syntax

public string GetElementValue(string path);

Async Version
public async Task<string> GetElementValue(string path);
public async Task<string> GetElementValue(string path, CancellationToken cancellationToken);
Public Function GetElementValue(ByVal Path As String) As String

Async Version
Public Function GetElementValue(ByVal Path As String) As Task(Of String)
Public Function GetElementValue(ByVal Path As String, cancellationToken As CancellationToken) As Task(Of String)

Remarks

This method returns the value of the element at the specified path. The path starts at the current Message and consists of groups (with indexes to indicate the iteration), a segment tag, and 1-2 indexes to indicate the element or component.

For a simple element the path should include the path to a specific iteration of a group (as in the Group property), followed by a segment tag and an index for the element position within the segment, each separated by a ".":

reader.GetElementValue("CPSGroup[2].LINGroup[2].LIN.1");

When selecting a component of a composite element, the component index should be added after the element index:

reader.GetElementValue("CPSGroup[2].LINGroup[2].QTY.1.2");

LoadSchema Method (EDIFACTReader Component)

Loads schema information from a file or string data.

Syntax

public void LoadSchema(string fileOrData, string messageName);

Async Version
public async Task LoadSchema(string fileOrData, string messageName);
public async Task LoadSchema(string fileOrData, string messageName, CancellationToken cancellationToken);
Public Sub LoadSchema(ByVal fileOrData As String, ByVal messageName As String)

Async Version
Public Sub LoadSchema(ByVal fileOrData As String, ByVal messageName As String) As Task
Public Sub LoadSchema(ByVal fileOrData As String, ByVal messageName As String, cancellationToken As CancellationToken) As Task

Remarks

This method loads schema information for use when parsing, validating, and translating messages.

The FileOrData parameter can be set to the path of a file containing schema data, or can be set to the contents of a schema file directly.

MessageName can be set to the name of a specific message to load only the specified message's schema information. If left empty or set to "*", the entire schema will be loaded.

Parse Method (EDIFACTReader Component)

Parse the EDI document and fire parsing events.

Syntax

public void Parse();

Async Version
public async Task Parse();
public async Task Parse(CancellationToken cancellationToken);
Public Sub Parse()

Async Version
Public Sub Parse() As Task
Public Sub Parse(cancellationToken As CancellationToken) As Task

Remarks

This method parses the input EDI document, firing the following events as it parses:

When multiple input sources are specified, only the highest-priority input will be used, in the following order:

  1. SetInputStream
  2. InputFile
  3. InputData

Reset Method (EDIFACTReader Component)

Resets all properties to their default values.

Syntax

public void Reset();

Async Version
public async Task Reset();
public async Task Reset(CancellationToken cancellationToken);
Public Sub Reset()

Async Version
Public Sub Reset() As Task
Public Sub Reset(cancellationToken As CancellationToken) As Task

Remarks

This method resets all properties of the component to their default values as specified in the property definitions.

SchemaCode Method (EDIFACTReader Component)

Defines a code value within a list of codes.

Syntax

public void SchemaCode(string schemaId, string codeListId, string value, string description);

Async Version
public async Task SchemaCode(string schemaId, string codeListId, string value, string description);
public async Task SchemaCode(string schemaId, string codeListId, string value, string description, CancellationToken cancellationToken);
Public Sub SchemaCode(ByVal SchemaId As String, ByVal CodeListId As String, ByVal Value As String, ByVal Description As String)

Async Version
Public Sub SchemaCode(ByVal SchemaId As String, ByVal CodeListId As String, ByVal Value As String, ByVal Description As String) As Task
Public Sub SchemaCode(ByVal SchemaId As String, ByVal CodeListId As String, ByVal Value As String, ByVal Description As String, cancellationToken As CancellationToken) As Task

Remarks

Creates a schema definition for a code value within a particular list of codes.

This method can be used when defining a schema instead of loading one from a file.

SchemaCodeList Method (EDIFACTReader Component)

Defines a list of codes.

Syntax

public void SchemaCodeList(string schemaId, string codeListId, string description);

Async Version
public async Task SchemaCodeList(string schemaId, string codeListId, string description);
public async Task SchemaCodeList(string schemaId, string codeListId, string description, CancellationToken cancellationToken);
Public Sub SchemaCodeList(ByVal SchemaId As String, ByVal CodeListId As String, ByVal Description As String)

Async Version
Public Sub SchemaCodeList(ByVal SchemaId As String, ByVal CodeListId As String, ByVal Description As String) As Task
Public Sub SchemaCodeList(ByVal SchemaId As String, ByVal CodeListId As String, ByVal Description As String, cancellationToken As CancellationToken) As Task

Remarks

Creates a schema definition for an empty list of codes. SchemaCode can be used to add code values to the list.

This method can be used when defining a schema instead of loading one from a file.

SchemaComposite Method (EDIFACTReader Component)

Defines a composite element.

Syntax

public void SchemaComposite(string schemaId, string compositeId, string description);

Async Version
public async Task SchemaComposite(string schemaId, string compositeId, string description);
public async Task SchemaComposite(string schemaId, string compositeId, string description, CancellationToken cancellationToken);
Public Sub SchemaComposite(ByVal SchemaId As String, ByVal CompositeId As String, ByVal Description As String)

Async Version
Public Sub SchemaComposite(ByVal SchemaId As String, ByVal CompositeId As String, ByVal Description As String) As Task
Public Sub SchemaComposite(ByVal SchemaId As String, ByVal CompositeId As String, ByVal Description As String, cancellationToken As CancellationToken) As Task

Remarks

Creates a schema definition for a composite element. SchemaElementRef can be used to add components to the element.

This method can be used when defining a schema instead of loading one from a file.

SchemaElement Method (EDIFACTReader Component)

Defines a simple element.

Syntax

public void SchemaElement(string schemaId, string elementId, string dataType, int minLength, int maxLength, string codeId, string description);

Async Version
public async Task SchemaElement(string schemaId, string elementId, string dataType, int minLength, int maxLength, string codeId, string description);
public async Task SchemaElement(string schemaId, string elementId, string dataType, int minLength, int maxLength, string codeId, string description, CancellationToken cancellationToken);
Public Sub SchemaElement(ByVal SchemaId As String, ByVal ElementId As String, ByVal DataType As String, ByVal MinLength As Integer, ByVal MaxLength As Integer, ByVal CodeId As String, ByVal Description As String)

Async Version
Public Sub SchemaElement(ByVal SchemaId As String, ByVal ElementId As String, ByVal DataType As String, ByVal MinLength As Integer, ByVal MaxLength As Integer, ByVal CodeId As String, ByVal Description As String) As Task
Public Sub SchemaElement(ByVal SchemaId As String, ByVal ElementId As String, ByVal DataType As String, ByVal MinLength As Integer, ByVal MaxLength As Integer, ByVal CodeId As String, ByVal Description As String, cancellationToken As CancellationToken) As Task

Remarks

Creates a schema definition for a simple element.

This method can be used when defining a schema instead of loading one from a file.

SchemaElementRef Method (EDIFACTReader Component)

Adds a reference to an element in a segment or composite element.

Syntax

public void SchemaElementRef(string schemaId, string parentId, string elementId, string refId, bool required, int maxCount);

Async Version
public async Task SchemaElementRef(string schemaId, string parentId, string elementId, string refId, bool required, int maxCount);
public async Task SchemaElementRef(string schemaId, string parentId, string elementId, string refId, bool required, int maxCount, CancellationToken cancellationToken);
Public Sub SchemaElementRef(ByVal SchemaId As String, ByVal ParentId As String, ByVal ElementId As String, ByVal RefId As String, ByVal Required As Boolean, ByVal MaxCount As Integer)

Async Version
Public Sub SchemaElementRef(ByVal SchemaId As String, ByVal ParentId As String, ByVal ElementId As String, ByVal RefId As String, ByVal Required As Boolean, ByVal MaxCount As Integer) As Task
Public Sub SchemaElementRef(ByVal SchemaId As String, ByVal ParentId As String, ByVal ElementId As String, ByVal RefId As String, ByVal Required As Boolean, ByVal MaxCount As Integer, cancellationToken As CancellationToken) As Task

Remarks

Adds a reference to an element to the specified parent, which can be the most recently defined segment or composite element.

This method can be used when defining a schema instead of loading one from a file.

SchemaEnd Method (EDIFACTReader Component)

Ends a schema definition.

Syntax

public void SchemaEnd();

Async Version
public async Task SchemaEnd();
public async Task SchemaEnd(CancellationToken cancellationToken);
Public Sub SchemaEnd()

Async Version
Public Sub SchemaEnd() As Task
Public Sub SchemaEnd(cancellationToken As CancellationToken) As Task

Remarks

Ends a schema definition when a schema is being defined manually instead of loaded from a file.

SchemaGroup Method (EDIFACTReader Component)

Defines a group of segments.

Syntax

public void SchemaGroup(string schemaId, string groupPath, string groupId, bool required, int maxCount);

Async Version
public async Task SchemaGroup(string schemaId, string groupPath, string groupId, bool required, int maxCount);
public async Task SchemaGroup(string schemaId, string groupPath, string groupId, bool required, int maxCount, CancellationToken cancellationToken);
Public Sub SchemaGroup(ByVal SchemaId As String, ByVal GroupPath As String, ByVal GroupId As String, ByVal Required As Boolean, ByVal MaxCount As Integer)

Async Version
Public Sub SchemaGroup(ByVal SchemaId As String, ByVal GroupPath As String, ByVal GroupId As String, ByVal Required As Boolean, ByVal MaxCount As Integer) As Task
Public Sub SchemaGroup(ByVal SchemaId As String, ByVal GroupPath As String, ByVal GroupId As String, ByVal Required As Boolean, ByVal MaxCount As Integer, cancellationToken As CancellationToken) As Task

Remarks

Creates a schema definition for a group of segments. SchemaSegmentRef can be used to add references to defined segments.

This method can be used when defining a schema instead of loading one from a file.

SchemaMessage Method (EDIFACTReader Component)

Defines a message.

Syntax

public void SchemaMessage(string schemaId, string messageId, string description);

Async Version
public async Task SchemaMessage(string schemaId, string messageId, string description);
public async Task SchemaMessage(string schemaId, string messageId, string description, CancellationToken cancellationToken);
Public Sub SchemaMessage(ByVal SchemaId As String, ByVal MessageId As String, ByVal Description As String)

Async Version
Public Sub SchemaMessage(ByVal SchemaId As String, ByVal MessageId As String, ByVal Description As String) As Task
Public Sub SchemaMessage(ByVal SchemaId As String, ByVal MessageId As String, ByVal Description As String, cancellationToken As CancellationToken) As Task

Remarks

Creates a schema definition for a message. SchemaSegmentRef and SchemaGroup can be used to add segment references and groups to the message.

This method can be used when defining a schema instead of loading one from a file.

SchemaSegment Method (EDIFACTReader Component)

Defines a segment.

Syntax

public void SchemaSegment(string schemaId, string segmentId, string description);

Async Version
public async Task SchemaSegment(string schemaId, string segmentId, string description);
public async Task SchemaSegment(string schemaId, string segmentId, string description, CancellationToken cancellationToken);
Public Sub SchemaSegment(ByVal SchemaId As String, ByVal SegmentId As String, ByVal Description As String)

Async Version
Public Sub SchemaSegment(ByVal SchemaId As String, ByVal SegmentId As String, ByVal Description As String) As Task
Public Sub SchemaSegment(ByVal SchemaId As String, ByVal SegmentId As String, ByVal Description As String, cancellationToken As CancellationToken) As Task

Remarks

Creates a schema definition for a segment. SchemaElementRef can be used to add component references to the segment.

This method can be used when defining a schema instead of loading one from a file.

SchemaSegmentRef Method (EDIFACTReader Component)

Adds a reference to a segment in a message or group.

Syntax

public void SchemaSegmentRef(string schemaId, string segmentPath, string segmentId, bool required, int maxCount);

Async Version
public async Task SchemaSegmentRef(string schemaId, string segmentPath, string segmentId, bool required, int maxCount);
public async Task SchemaSegmentRef(string schemaId, string segmentPath, string segmentId, bool required, int maxCount, CancellationToken cancellationToken);
Public Sub SchemaSegmentRef(ByVal SchemaId As String, ByVal SegmentPath As String, ByVal SegmentId As String, ByVal Required As Boolean, ByVal MaxCount As Integer)

Async Version
Public Sub SchemaSegmentRef(ByVal SchemaId As String, ByVal SegmentPath As String, ByVal SegmentId As String, ByVal Required As Boolean, ByVal MaxCount As Integer) As Task
Public Sub SchemaSegmentRef(ByVal SchemaId As String, ByVal SegmentPath As String, ByVal SegmentId As String, ByVal Required As Boolean, ByVal MaxCount As Integer, cancellationToken As CancellationToken) As Task

Remarks

Adds a reference to a segment to the specified path.

This method can be used when defining a schema instead of loading one from a file.

SchemaStart Method (EDIFACTReader Component)

Starts a schema definition.

Syntax

public void SchemaStart(string schemaId);

Async Version
public async Task SchemaStart(string schemaId);
public async Task SchemaStart(string schemaId, CancellationToken cancellationToken);
Public Sub SchemaStart(ByVal SchemaId As String)

Async Version
Public Sub SchemaStart(ByVal SchemaId As String) As Task
Public Sub SchemaStart(ByVal SchemaId As String, cancellationToken As CancellationToken) As Task

Remarks

Starts manually defining a schema, as an alternative to loading one from a file.

SetInputStream Method (EDIFACTReader Component)

The stream containing the EDI data.

Syntax

public void SetInputStream(System.IO.Stream inputStream);

Async Version
public async Task SetInputStream(System.IO.Stream inputStream);
public async Task SetInputStream(System.IO.Stream inputStream, CancellationToken cancellationToken);
Public Sub SetInputStream(ByVal InputStream As System.IO.Stream)

Async Version
Public Sub SetInputStream(ByVal InputStream As System.IO.Stream) As Task
Public Sub SetInputStream(ByVal InputStream As System.IO.Stream, cancellationToken As CancellationToken) As Task

Remarks

Call this method to specify a stream to read the input EDI data from. The data can then be parsed with Parse.

Validate Method (EDIFACTReader Component)

Validate the EDI document and warn about any errors encountered.

Syntax

public void Validate();

Async Version
public async Task Validate();
public async Task Validate(CancellationToken cancellationToken);
Public Sub Validate()

Async Version
Public Sub Validate() As Task
Public Sub Validate(cancellationToken As CancellationToken) As Task

Remarks

This method parses the input EDI document, firing the ValidateWarning event for any non-blocking errors it encounters.

EndFunctionalGroup Event (EDIFACTReader Component)

Fires at the end of a functional group while parsing.

Syntax

public event OnEndFunctionalGroupHandler OnEndFunctionalGroup;

public delegate void OnEndFunctionalGroupHandler(object sender, EDIFACTReaderEndFunctionalGroupEventArgs e);

public class EDIFACTReaderEndFunctionalGroupEventArgs : EventArgs {
  public string Tag { get; }
  public int MessageCount { get; }
  public string ReferenceNumber { get; }
}
Public Event OnEndFunctionalGroup As OnEndFunctionalGroupHandler

Public Delegate Sub OnEndFunctionalGroupHandler(sender As Object, e As EDIFACTReaderEndFunctionalGroupEventArgs)

Public Class EDIFACTReaderEndFunctionalGroupEventArgs Inherits EventArgs
  Public ReadOnly Property Tag As String
  Public ReadOnly Property MessageCount As Integer
  Public ReadOnly Property ReferenceNumber As String
End Class

Remarks

This event fires when the component encounters the end of a functional group while parsing a document.

EndGroup Event (EDIFACTReader Component)

Fires at the end of a group while parsing a message.

Syntax

public event OnEndGroupHandler OnEndGroup;

public delegate void OnEndGroupHandler(object sender, EDIFACTReaderEndGroupEventArgs e);

public class EDIFACTReaderEndGroupEventArgs : EventArgs {
  public string Name { get; }
  public int SchemaIndex { get; }
}
Public Event OnEndGroup As OnEndGroupHandler

Public Delegate Sub OnEndGroupHandler(sender As Object, e As EDIFACTReaderEndGroupEventArgs)

Public Class EDIFACTReaderEndGroupEventArgs Inherits EventArgs
  Public ReadOnly Property Name As String
  Public ReadOnly Property SchemaIndex As Integer
End Class

Remarks

This event fires when the component encounters the end of a group while parsing a message.

EndInterchange Event (EDIFACTReader Component)

Fires at the end of an interchange while parsing.

Syntax

public event OnEndInterchangeHandler OnEndInterchange;

public delegate void OnEndInterchangeHandler(object sender, EDIFACTReaderEndInterchangeEventArgs e);

public class EDIFACTReaderEndInterchangeEventArgs : EventArgs {
  public string Tag { get; }
  public int GroupCount { get; }
  public string ReferenceNumber { get; }
}
Public Event OnEndInterchange As OnEndInterchangeHandler

Public Delegate Sub OnEndInterchangeHandler(sender As Object, e As EDIFACTReaderEndInterchangeEventArgs)

Public Class EDIFACTReaderEndInterchangeEventArgs Inherits EventArgs
  Public ReadOnly Property Tag As String
  Public ReadOnly Property GroupCount As Integer
  Public ReadOnly Property ReferenceNumber As String
End Class

Remarks

This event fires at the end of an interchange while parsing a document.

EndMessage Event (EDIFACTReader Component)

Fires at the end of a message while parsing.

Syntax

public event OnEndMessageHandler OnEndMessage;

public delegate void OnEndMessageHandler(object sender, EDIFACTReaderEndMessageEventArgs e);

public class EDIFACTReaderEndMessageEventArgs : EventArgs {
  public string Tag { get; }
  public int SegmentCount { get; }
  public string ReferenceNumber { get; }
}
Public Event OnEndMessage As OnEndMessageHandler

Public Delegate Sub OnEndMessageHandler(sender As Object, e As EDIFACTReaderEndMessageEventArgs)

Public Class EDIFACTReaderEndMessageEventArgs Inherits EventArgs
  Public ReadOnly Property Tag As String
  Public ReadOnly Property SegmentCount As Integer
  Public ReadOnly Property ReferenceNumber As String
End Class

Remarks

This event fires when the component encounters the end of a message while parsing a document.

Error Event (EDIFACTReader Component)

Fires when an error occurs during message processing. Normally, the component fails with an error.

Syntax

public event OnErrorHandler OnError;

public delegate void OnErrorHandler(object sender, EDIFACTReaderErrorEventArgs e);

public class EDIFACTReaderErrorEventArgs : EventArgs {
  public int ErrorCode { get; }
  public string Description { get; }
}
Public Event OnError As OnErrorHandler

Public Delegate Sub OnErrorHandler(sender As Object, e As EDIFACTReaderErrorEventArgs)

Public Class EDIFACTReaderErrorEventArgs Inherits EventArgs
  Public ReadOnly Property ErrorCode As Integer
  Public ReadOnly Property Description As String
End Class

Remarks

The Error event is fired in case of exceptional conditions during message processing. Normally, the component throws an exception.

ConnectionId is the associated client Id, ErrorCode contains an error code, and Description contains a textual description of the error. For a list of valid error codes and their descriptions, please refer to the Error Codes section.

ResolveSchema Event (EDIFACTReader Component)

Fires whenever a new EDIFACT message is encountered and no schema is found for it.

Syntax

public event OnResolveSchemaHandler OnResolveSchema;

public delegate void OnResolveSchemaHandler(object sender, EDIFACTReaderResolveSchemaEventArgs e);

public class EDIFACTReaderResolveSchemaEventArgs : EventArgs {
  public string MessageVersion { get; }
  public string MessageType { get; }
}
Public Event OnResolveSchema As OnResolveSchemaHandler

Public Delegate Sub OnResolveSchemaHandler(sender As Object, e As EDIFACTReaderResolveSchemaEventArgs)

Public Class EDIFACTReaderResolveSchemaEventArgs Inherits EventArgs
  Public ReadOnly Property MessageVersion As String
  Public ReadOnly Property MessageType As String
End Class

Remarks

This method fires when the component encounters an EDIFACT message it has not loaded a schema for. The parameters of the event can be used to locate the correct schema and load it with LoadSchema.

MessageVersion - The EDIFACT version of the message, such as D97A.

MessageType - The type of message, such as INVOIC.

After the event fires, if the component still doesn't have a matching schema, then it will attempt schema-less parsing of the EDIFACT message.

Segment Event (EDIFACTReader Component)

Fires at the end of a Segment while parsing.

Syntax

public event OnSegmentHandler OnSegment;

public delegate void OnSegmentHandler(object sender, EDIFACTReaderSegmentEventArgs e);

public class EDIFACTReaderSegmentEventArgs : EventArgs {
  public string Tag { get; }
  public string SchemaPath { get; }
  public bool Optional { get; }
  public int ElementCount { get; }
  public int SchemaIndex { get; }
  public int SegmentIndex { get; }
  public int MaxCount { get; }
  public string Path { get; }
}
Public Event OnSegment As OnSegmentHandler

Public Delegate Sub OnSegmentHandler(sender As Object, e As EDIFACTReaderSegmentEventArgs)

Public Class EDIFACTReaderSegmentEventArgs Inherits EventArgs
  Public ReadOnly Property Tag As String
  Public ReadOnly Property SchemaPath As String
  Public ReadOnly Property Optional As Boolean
  Public ReadOnly Property ElementCount As Integer
  Public ReadOnly Property SchemaIndex As Integer
  Public ReadOnly Property SegmentIndex As Integer
  Public ReadOnly Property MaxCount As Integer
  Public ReadOnly Property Path As String
End Class

Remarks

Fires at the end of a Segment while parsing a document

StartFunctionalGroup Event (EDIFACTReader Component)

Fires at the beginning of a functional group while parsing.

Syntax

public event OnStartFunctionalGroupHandler OnStartFunctionalGroup;

public delegate void OnStartFunctionalGroupHandler(object sender, EDIFACTReaderStartFunctionalGroupEventArgs e);

public class EDIFACTReaderStartFunctionalGroupEventArgs : EventArgs {
  public string Tag { get; }
  public string AppSenderIdentification { get; }
  public string AppRecipientIdentification { get; }
  public string DateTime { get; }
  public string ReferenceNumber { get; }
}
Public Event OnStartFunctionalGroup As OnStartFunctionalGroupHandler

Public Delegate Sub OnStartFunctionalGroupHandler(sender As Object, e As EDIFACTReaderStartFunctionalGroupEventArgs)

Public Class EDIFACTReaderStartFunctionalGroupEventArgs Inherits EventArgs
  Public ReadOnly Property Tag As String
  Public ReadOnly Property AppSenderIdentification As String
  Public ReadOnly Property AppRecipientIdentification As String
  Public ReadOnly Property DateTime As String
  Public ReadOnly Property ReferenceNumber As String
End Class

Remarks

This event fires when the component encounters the start of a functional group while parsing a document.

StartGroup Event (EDIFACTReader Component)

Fires at the beginning of a group while parsing a message.

Syntax

public event OnStartGroupHandler OnStartGroup;

public delegate void OnStartGroupHandler(object sender, EDIFACTReaderStartGroupEventArgs e);

public class EDIFACTReaderStartGroupEventArgs : EventArgs {
  public string Name { get; }
  public int SchemaIndex { get; }
  public int MaxCount { get; }
  public string Path { get; }
}
Public Event OnStartGroup As OnStartGroupHandler

Public Delegate Sub OnStartGroupHandler(sender As Object, e As EDIFACTReaderStartGroupEventArgs)

Public Class EDIFACTReaderStartGroupEventArgs Inherits EventArgs
  Public ReadOnly Property Name As String
  Public ReadOnly Property SchemaIndex As Integer
  Public ReadOnly Property MaxCount As Integer
  Public ReadOnly Property Path As String
End Class

Remarks

This event fires when the component encounters the start of a group while parsing a message.

StartInterchange Event (EDIFACTReader Component)

Fires at the beginning of an interchange while parsing.

Syntax

public event OnStartInterchangeHandler OnStartInterchange;

public delegate void OnStartInterchangeHandler(object sender, EDIFACTReaderStartInterchangeEventArgs e);

public class EDIFACTReaderStartInterchangeEventArgs : EventArgs {
  public string Tag { get; }
  public string SyntaxIdentifier { get; }
  public string SyntaxVersion { get; }
  public string SenderIdentification { get; }
  public string RecipientIdentification { get; }
  public string DateTime { get; }
  public string ReferenceNumber { get; }
}
Public Event OnStartInterchange As OnStartInterchangeHandler

Public Delegate Sub OnStartInterchangeHandler(sender As Object, e As EDIFACTReaderStartInterchangeEventArgs)

Public Class EDIFACTReaderStartInterchangeEventArgs Inherits EventArgs
  Public ReadOnly Property Tag As String
  Public ReadOnly Property SyntaxIdentifier As String
  Public ReadOnly Property SyntaxVersion As String
  Public ReadOnly Property SenderIdentification As String
  Public ReadOnly Property RecipientIdentification As String
  Public ReadOnly Property DateTime As String
  Public ReadOnly Property ReferenceNumber As String
End Class

Remarks

This event fires at the beginning of an interchange while parsing a document.

StartMessage Event (EDIFACTReader Component)

Fires at the beginning of a message while parsing.

Syntax

public event OnStartMessageHandler OnStartMessage;

public delegate void OnStartMessageHandler(object sender, EDIFACTReaderStartMessageEventArgs e);

public class EDIFACTReaderStartMessageEventArgs : EventArgs {
  public string Tag { get; }
  public string MessageRelease { get; }
  public string MessageType { get; }
  public string ReferenceNumber { get; }
  public bool SchemaLoaded { get; }
}
Public Event OnStartMessage As OnStartMessageHandler

Public Delegate Sub OnStartMessageHandler(sender As Object, e As EDIFACTReaderStartMessageEventArgs)

Public Class EDIFACTReaderStartMessageEventArgs Inherits EventArgs
  Public ReadOnly Property Tag As String
  Public ReadOnly Property MessageRelease As String
  Public ReadOnly Property MessageType As String
  Public ReadOnly Property ReferenceNumber As String
  Public ReadOnly Property SchemaLoaded As Boolean
End Class

Remarks

This event fires when the component encounters the start of a message while parsing a document.

ValidateWarning Event (EDIFACTReader Component)

Fires to warn about validation errors.

Syntax

public event OnValidateWarningHandler OnValidateWarning;

public delegate void OnValidateWarningHandler(object sender, EDIFACTReaderValidateWarningEventArgs e);

public class EDIFACTReaderValidateWarningEventArgs : EventArgs {
  public long Position { get; }
  public int Line { get; }
  public int Column { get; }
  public string ErrorCode { get; }
  public string ErrorMessage { get; }
  public int ErrorType { get; }
}
Public Event OnValidateWarning As OnValidateWarningHandler

Public Delegate Sub OnValidateWarningHandler(sender As Object, e As EDIFACTReaderValidateWarningEventArgs)

Public Class EDIFACTReaderValidateWarningEventArgs Inherits EventArgs
  Public ReadOnly Property Position As Long
  Public ReadOnly Property Line As Integer
  Public ReadOnly Property Column As Integer
  Public ReadOnly Property ErrorCode As String
  Public ReadOnly Property ErrorMessage As String
  Public ReadOnly Property ErrorType As Integer
End Class

Remarks

When the component encounters a non-blocking error while validating a document, this event fires with information about the error.

EDIElement Type

An element of an EDI document.

Remarks

This represents an element appearing in an EDI document.

The following fields are available:

Fields

DataType
string (read-only)

Default: ""

The type of data contained in the element.

Possible values for EDIFACT include:

A The element can only contain alphabetic characters.
AN The element can contain any alphanumeric characters.
N The element can only contain numeric characters.
composite The element is a composite element containing multiple components.

Possible values for X12 include:

AN The element can contain any alphanumeric characters.
ID The element contains an identifier for a code value.
Nn The element contains a numeric integer value.
R The element contains a number with an optional decimal value.
DT The element contains a string representing a date.
TM The element contains a string representing a time.
B The element contains binary data.
composite The element is a composite element containing multiple components.

IsComposite
bool (read-only)

Default: False

Specifies whether the element is a simple or composite element. If true, the element is a composite element that contains other components.

MaxLen
int (read-only)

Default: 0

For a simple element, this specifies the maximum length of the element according to the schema.

MinLen
int (read-only)

Default: 0

For a simple element, this specifies the minimum length of the element according to the schema.

SchemaDesc
string (read-only)

Default: ""

The description of the element as specified in the schema.

SchemaName
string (read-only)

Default: ""

The name of the element as specified in the schema.

Value
string (read-only)

Default: ""

If the element is a simple element, this field contains its value.

Constructors

public EDIElement();
Public EDIElement()

EDIFACTDelimiters Type

The delimiters used in the EDIFACT document.

Remarks

This type contains fields specifying the various delimiters used within the EDIFACT document.

The following fields are available:

Fields

Component
string

Default: ":"

The character used to separate the components in a composite element.

Decimal
string

Default: "."

The character used to separate the integer portion of a numeric value from the fractional portion.

Element
string

Default: "+"

The delimiter used to separate elements within a segment.

Release
string

Default: "?"

The character used to escape other characters within a field. For example, with the default EDIFACT delimiters, "?+" should be considered "+" character that appears within a field, not an element separator.

Repetition
string

Default: "*(syntax 4) or empty(syntax 3)"

The character used to indicate a repeating element or component.

Segment
string

Default: "'"

The character used to terminate a segment.

Constructors

EDIFACTFunctionalGroup Type

A functional group of messages.

Remarks

This type represents a functional group of messages, with fields describing the values from the UNG segment.

The following fields are available:

Fields

AppPassword
string

Default: ""

The application password as specified in the functional group header.

This is an alphanumeric field with a value up to 14 characters long.

AppRecipientIdentification
string

Default: ""

The name or code of the intended recipient of the message group.

This is an alphanumeric field with a value up to 35 characters long.

AppRecipientIDQualifier
string

Default: ""

The qualifier for the recipient's identification (if it contains a code value).

This is an alphanumeric field with a value up to 4 characters long.

AppSenderIdentification
string

Default: ""

The name or code of the message group's sender.

This is an alphanumeric field with a value up to 35 characters long.

AppSenderIDQualifier
string

Default: ""

The qualifier for the sender's identification (if it contains a code value).

This is an alphanumeric field with a value up to 4 characters long.

AssociationAssignedCode
string

Default: ""

The assigned code for the message type.

This is an alphanumeric field with a value up to 6 characters long.

ControllingAgency
string

Default: ""

A code value that indicates the agency responsible for maintaining the message specifications.

This is an alphanumeric field with a value up to 3 characters long.

Date
string

Default: ""

The date that the group of messages was prepared.

GroupIdentification
string

Default: ""

The identification value for the functional group.

This is an alphanumeric field with a value up to 6 characters long.

MessageRelease
string

Default: ""

The message release number for the message type appearing in the message group.

This is an alphanumeric field with a value up to 3 characters long.

MessageVersion
string

Default: ""

The message version number for message type appearing in the functional group.

This is an alphanumeric field with a value up to 3 characters long.

ReferenceNumber
string

Default: ""

The reference number for the functional group.

This is an alphanumeric field with a value up to 14 characters long.

Time
string

Default: ""

The time that the group of messages was prepared.

Constructors

EDIFACTInterchange Type

An interchange containing functional groups and messages.

Remarks

This type represents an EDIFACT interchange, with fields describing the values from the UNB segment.

The following fields are available:

Fields

AckRequest
string

Default: ""

If this field is '1', an ACK was requested in response to this interchange.

AgreementIdentifier
string

Default: ""

The identifier for the communication agreement used by the interchange.

This is an alphanumeric field with a value up to 35 characters long.

ApplicationReference
string

Default: ""

If the interchange contains only one type of message, this can contain the identifier for the type of message.

This is an alphanumeric field with a value up to 14 characters long.

CharacterEncoding
string

Default: ""

The character encoding used by the interchange.

This is an alphanumeric field with a value up to 3 characters long, and is only present for EDIFACT syntax 4.

CodeListVersionNumber
string

Default: ""

The identifier for the communication agreement used by the interchange.

This is an alphanumeric field with a value up to 6 characters long.

Date
string

Default: ""

The date that the interchange was prepared.

ProcessingPriorityCode
string

Default: ""

A 1-character code that requests a specific processing priority for the interchange.

RecipientIdentification
string

Default: ""

The identification for the interchange's recipient.

This is an alphanumeric field with a value up to 35 characters long.

RecipientIDQualifier
string

Default: ""

The qualifier for the recipient identification code.

This is an alphanumeric field with a value up to 4 characters long.

RecipientInternalIdentification
string

Default: ""

More specific recipient identification for internal use.

This is an alphanumeric field with a value up to 35 characters long.

RecipientInternalSubIdentification
string

Default: ""

A sub-identification string for the receiver for internal use.

This is an alphanumeric field with a value up to 35 characters long.

RecipientPassword
string

Default: ""

A password to be verified by the recipient, such as a system or network password.

This is an alphanumeric field with a value up to 14 characters long.

RecipientPasswordQualifier
string

Default: ""

A qualifier for the recipient password.

This is an alphanumeric field with a value up to 2 characters long.

ReferenceNumber
string

Default: ""

A reference number for the interchange.

This is an alphanumeric field with a value up to 14 characters long.

SenderIdentification
string

Default: ""

The identification for the interchange's sender.

This is an alphanumeric field with a value up to 35 characters long.

SenderIDQualifier
string

Default: ""

The qualifier for the sender identification code.

This is an alphanumeric field with a value up to 4 characters long.

SenderInternalIdentification
string

Default: ""

More specific sender identification for internal use.

This is an alphanumeric field with a value up to 35 characters long.

SenderInternalSubIdentification
string

Default: ""

A sub-identification string for the sender for internal use.

This is an alphanumeric field with a value up to 35 characters long.

SyntaxIdentifier
string

Default: ""

A identifier specifying the controlling agency and valid character set.

This is an alphanumeric field with a value up to 4 characters long.

SyntaxVersionNumber
string

Default: ""

A 1-character numeric value indicating the syntax version.

TestIndicator
string

Default: ""

If this field is '1', the interchange is a test interchange.

Time
string

Default: ""

The time that the interchange was prepared.

Constructors

EDIFACTMessage Type

An EDIFACT message.

Remarks

This type represents an EDIFACT message, with fields describing the values from the UNH segment.

The following fields are available:

Fields

AssociationAssignedCode
string

Default: ""

A code assigned to the message by the controlling organization.

This is an alphanumeric field with a value up to 6 characters long.

CodeListVersionNumber
string

Default: ""

The version number of the code list that should be used.

This is an alphanumeric field with a value up to 6 characters long. This field only appears in EDIFACT syntax version 4.

CommonAccessReference
string

Default: ""

A reference value to associate this message with related messages.

This is an alphanumeric field with a value up to 35 characters long.

ControllingAgency
string

Default: ""

A code that identifies the controlling agency for this message type.

This is an alphanumeric field with a value up to 3 characters long.

FirstAndLastTransfer
string

Default: ""

A single-character field that indicates the first and last messages in a related set.

MessageImplControllingAgency
string

Default: ""

A code value that identifies the controlling agency for the message implementation.

This is an alphanumeric field with a value up to 3 characters long. This field only appears in EDIFACT syntax version 4.

MessageImplIdentification
string

Default: ""

Identifies the message implementation.

This is an alphanumeric field with a value up to 14 characters long. This field only appears in EDIFACT syntax version 4.

MessageImplRelease
string

Default: ""

Identifies the release number for the message implementation.

This is an alphanumeric field with a value up to 3 characters long. This field only appears in EDIFACT syntax version 4.

MessageImplVersion
string

Default: ""

Identifies the version number for the message implementation.

This is an alphanumeric field with a value up to 3 characters long. This field only appears in EDIFACT syntax version 4.

MessageRelease
string

Default: ""

Identifies the release number for the message.

This is an alphanumeric field with a value up to 3 characters long.

MessageSubsetControllingAgency
string

Default: ""

A code value that identifies the controlling agency for the message subset.

This is an alphanumeric field with a value up to 3 characters long. This field only appears in EDIFACT syntax version 4.

MessageSubsetIdentification
string

Default: ""

Identifies the message subset.

This is an alphanumeric field with a value up to 14 characters long. This field only appears in EDIFACT syntax version 4.

MessageSubsetRelease
string

Default: ""

Identifies the release number for the message subset.

This is an alphanumeric field with a value up to 3 characters long. This field only appears in EDIFACT syntax version 4.

MessageSubsetVersion
string

Default: ""

Identifies the version number for the message subset.

This is an alphanumeric field with a value up to 3 characters long. This field only appears in EDIFACT syntax version 4.

MessageType
string

Default: ""

A code identifying the message's type.

This is an alphanumeric field with a value up to 6 characters long.

MessageTypeSubFunctionIdentification
string

Default: ""

A code identifying the sub-function of the message's type.

This is an alphanumeric field with a value up to 6 characters long. This field only appears in EDIFACT syntax version 4.

MessageVersion
string

Default: ""

Identifies the version number for the message.

This is an alphanumeric field with a value up to 3 characters long.

ReferenceNumber
string

Default: ""

A unique reference number for the message.

This is an alphanumeric field with a value up to 14 characters long.

ScenarioControllingAgency
string

Default: ""

Identifies the controlling agency for the message scenario.

This is an alphanumeric field with a value up to 3 characters long. This field only appears in EDIFACT syntax version 4.

ScenarioIdentification
string

Default: ""

The identifier for the message scenario.

This is an alphanumeric field with a value up to 14 characters long. This field only appears in EDIFACT syntax version 4.

ScenarioRelease
string

Default: ""

The message scenario's release number.

This is an alphanumeric field with a value up to 3 characters long. This field only appears in EDIFACT syntax version 4.

ScenarioVersion
string

Default: ""

The message scenario's version number.

This is an alphanumeric field with a value up to 3 characters long. This field only appears in EDIFACT syntax version 4.

SequenceOfTransfers
string

Default: ""

Specifies the message's position in a sequence.

This is an alphanumeric field with a value up to 2 characters long.

Constructors

public EDIFACTMessage();
Public EDIFACTMessage()

EDISegment Type

A segment of an EDI document.

Remarks

This represents a segment appearing in an EDI document.

The following fields are available:

Fields

Optional
bool (read-only)

Default: False

Specifies whether the segment is required or optional. If true, the element is optional.

Path
string (read-only)

Default: ""

Contains the path to the segment, including the groups that the segment is contained in.

SchemaPath
string (read-only)

Default: ""

Contains a numeric representation of the path to the segment, using the indexes within the schema, such as \4[3]\5[6]\7[8].

Tag
string (read-only)

Default: ""

The tag of the segment, such as BGM, DTM, FTX, etc.

Constructors

public EDISegment();
Public EDISegment()

Config Settings (EDIFACTReader Component)

The component accepts one or more of the following configuration settings. Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the component, access to these internal properties is provided through the Config method.

EDIFACTReader Config Settings

DelimitersFromUNA:   A flag indicating if delimiters were read from UNA segment.

This setting controls whether delimiters were read from the UNA segment. The default value is false. This configuration setting is read-only.

InputFormat:   The format of the input document.

This setting controls the type of input document for parsing. Possible values are:

0 (default)EDIFACT
1XML
MaxValidationErrors:   The maximum number of validation errors to return.

This setting controls the maximum number of validation errors that will be returned during the validation process. The default value is 200.

Trappable Errors (EDIFACTReader Component)

EDIFACTReader Errors

202   Invalid argument.
304   Cannot write to file.
1003   Could not find the selected schema in the chosen file.
1099   Encountered an unexpected segment tag.
1100   Attempted to perform an action while the component was busy, or close an incomplete interchange.
1044   Tried to load an invalid schema file.
1201   The index is out of range.
1202   The selected ACK type is invalid.
1203   Encountered an error while validating the UNA segment.