EDIFACTReader Class

Properties   Methods   Events   Config Settings   Errors  

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

Syntax

EDIFACTReader

Remarks

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

As the class 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 class 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 class 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 class.
ComponentCountThe number of classes in the current Element.
ComponentIndexThe index of the current Class.
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 class will validate any documents it parses.

Method List


The following is the full list of the methods of the class 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 class 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.
ValidateValidate the EDI document and warn about any errors encountered.

Event List


The following is the full list of the events fired by the class 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 class 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 class 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 Class)

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

Syntax

ANSI (Cross Platform)
int GetAckType();
int SetAckType(int iAckType); Unicode (Windows) INT GetAckType();
INT SetAckType(INT iAckType);

Possible Values

AT_FUNCTIONAL_CONTRL(0), 
AT_TECHNICAL_CONTRL(1)
int edisdk_edifactreader_getacktype(void* lpObj);
int edisdk_edifactreader_setacktype(void* lpObj, int iAckType);
int getAckType();
int setAckType(int iAckType);

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.

Data Type

Integer

BuildDOM Property (EDIFACTReader Class)

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

Syntax

ANSI (Cross Platform)
int GetBuildDOM();
int SetBuildDOM(int iBuildDOM); Unicode (Windows) INT GetBuildDOM();
INT SetBuildDOM(INT iBuildDOM);

Possible Values

BD_ENTIRE_DOCUMENT(0), 
BD_INTERCHANGE(1),
BD_MESSAGE(2),
BD_NONE(3)
int edisdk_edifactreader_getbuilddom(void* lpObj);
int edisdk_edifactreader_setbuilddom(void* lpObj, int iBuildDOM);
int getBuildDOM();
int setBuildDOM(int iBuildDOM);

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.

Data Type

Integer

Component Property (EDIFACTReader Class)

The current class.

Syntax

EDISDKEDIElement* GetComponent();

char* edisdk_edifactreader_getcomponentdatatype(void* lpObj);
int edisdk_edifactreader_getcomponentiscomposite(void* lpObj);
int edisdk_edifactreader_getcomponentmaxlen(void* lpObj);
int edisdk_edifactreader_getcomponentminlen(void* lpObj);
char* edisdk_edifactreader_getcomponentschemadesc(void* lpObj);
char* edisdk_edifactreader_getcomponentschemaname(void* lpObj);
char* edisdk_edifactreader_getcomponentvalue(void* lpObj);
QString getComponentDataType();

bool getComponentIsComposite();

int getComponentMaxLen();

int getComponentMinLen();

QString getComponentSchemaDesc();

QString getComponentSchemaName();

QString getComponentValue();

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.

Data Type

EDISDKEDIElement

ComponentCount Property (EDIFACTReader Class)

The number of classes in the current Element.

Syntax

ANSI (Cross Platform)
int GetComponentCount();

Unicode (Windows)
INT GetComponentCount();
int edisdk_edifactreader_getcomponentcount(void* lpObj);
int getComponentCount();

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.

Data Type

Integer

ComponentIndex Property (EDIFACTReader Class)

The index of the current Class.

Syntax

ANSI (Cross Platform)
int GetComponentIndex();
int SetComponentIndex(int iComponentIndex); Unicode (Windows) INT GetComponentIndex();
INT SetComponentIndex(INT iComponentIndex);
int edisdk_edifactreader_getcomponentindex(void* lpObj);
int edisdk_edifactreader_setcomponentindex(void* lpObj, int iComponentIndex);
int getComponentIndex();
int setComponentIndex(int iComponentIndex);

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.

Data Type

Integer

Delimiters Property (EDIFACTReader Class)

Contains the delimiters for the EDI Document.

Syntax

EDISDKEDIFACTDelimiters* GetDelimiters();

char* edisdk_edifactreader_getdelimitercomponent(void* lpObj);
int edisdk_edifactreader_setdelimitercomponent(void* lpObj, const char* lpszDelimiterComponent);
char* edisdk_edifactreader_getdelimiterdecimal(void* lpObj);
int edisdk_edifactreader_setdelimiterdecimal(void* lpObj, const char* lpszDelimiterDecimal);
char* edisdk_edifactreader_getdelimiterelement(void* lpObj);
int edisdk_edifactreader_setdelimiterelement(void* lpObj, const char* lpszDelimiterElement);
char* edisdk_edifactreader_getdelimiterrelease(void* lpObj);
int edisdk_edifactreader_setdelimiterrelease(void* lpObj, const char* lpszDelimiterRelease);
char* edisdk_edifactreader_getdelimiterrepetition(void* lpObj);
int edisdk_edifactreader_setdelimiterrepetition(void* lpObj, const char* lpszDelimiterRepetition);
char* edisdk_edifactreader_getdelimitersegment(void* lpObj);
int edisdk_edifactreader_setdelimitersegment(void* lpObj, const char* lpszDelimiterSegment);
QString getDelimiterComponent();
int setDelimiterComponent(QString qsDelimiterComponent); QString getDelimiterDecimal();
int setDelimiterDecimal(QString qsDelimiterDecimal); QString getDelimiterElement();
int setDelimiterElement(QString qsDelimiterElement); QString getDelimiterRelease();
int setDelimiterRelease(QString qsDelimiterRelease); QString getDelimiterRepetition();
int setDelimiterRepetition(QString qsDelimiterRepetition); QString getDelimiterSegment();
int setDelimiterSegment(QString qsDelimiterSegment);

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.

Data Type

EDISDKEDIFACTDelimiters

Element Property (EDIFACTReader Class)

The current element.

Syntax

EDISDKEDIElement* GetElement();

char* edisdk_edifactreader_getelementdatatype(void* lpObj);
int edisdk_edifactreader_getelementiscomposite(void* lpObj);
int edisdk_edifactreader_getelementmaxlen(void* lpObj);
int edisdk_edifactreader_getelementminlen(void* lpObj);
char* edisdk_edifactreader_getelementschemadesc(void* lpObj);
char* edisdk_edifactreader_getelementschemaname(void* lpObj);
char* edisdk_edifactreader_getelementvalue(void* lpObj);
QString getElementDataType();

bool getElementIsComposite();

int getElementMaxLen();

int getElementMinLen();

QString getElementSchemaDesc();

QString getElementSchemaName();

QString getElementValue();

Remarks

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

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

Data Type

EDISDKEDIElement

ElementCount Property (EDIFACTReader Class)

The number of elements in the current Segment.

Syntax

ANSI (Cross Platform)
int GetElementCount();

Unicode (Windows)
INT GetElementCount();
int edisdk_edifactreader_getelementcount(void* lpObj);
int getElementCount();

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.

Data Type

Integer

ElementIndex Property (EDIFACTReader Class)

The index of the current Element.

Syntax

ANSI (Cross Platform)
int GetElementIndex();
int SetElementIndex(int iElementIndex); Unicode (Windows) INT GetElementIndex();
INT SetElementIndex(INT iElementIndex);
int edisdk_edifactreader_getelementindex(void* lpObj);
int edisdk_edifactreader_setelementindex(void* lpObj, int iElementIndex);
int getElementIndex();
int setElementIndex(int iElementIndex);

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.

Data Type

Integer

FunctionalGroup Property (EDIFACTReader Class)

The current FunctionalGroup.

Syntax

EDISDKEDIFACTFunctionalGroup* GetFunctionalGroup();

char* edisdk_edifactreader_getfgroupapppassword(void* lpObj);
int edisdk_edifactreader_setfgroupapppassword(void* lpObj, const char* lpszFGroupAppPassword);
char* edisdk_edifactreader_getfgroupapprecipientidentification(void* lpObj);
int edisdk_edifactreader_setfgroupapprecipientidentification(void* lpObj, const char* lpszFGroupAppRecipientIdentification);
char* edisdk_edifactreader_getfgroupapprecipientidqualifier(void* lpObj);
int edisdk_edifactreader_setfgroupapprecipientidqualifier(void* lpObj, const char* lpszFGroupAppRecipientIDQualifier);
char* edisdk_edifactreader_getfgroupappsenderidentification(void* lpObj);
int edisdk_edifactreader_setfgroupappsenderidentification(void* lpObj, const char* lpszFGroupAppSenderIdentification);
char* edisdk_edifactreader_getfgroupappsenderidqualifier(void* lpObj);
int edisdk_edifactreader_setfgroupappsenderidqualifier(void* lpObj, const char* lpszFGroupAppSenderIDQualifier);
char* edisdk_edifactreader_getfgroupassociationassignedcode(void* lpObj);
int edisdk_edifactreader_setfgroupassociationassignedcode(void* lpObj, const char* lpszFGroupAssociationAssignedCode);
char* edisdk_edifactreader_getfgroupcontrollingagency(void* lpObj);
int edisdk_edifactreader_setfgroupcontrollingagency(void* lpObj, const char* lpszFGroupControllingAgency);
char* edisdk_edifactreader_getfgroupdate(void* lpObj);
int edisdk_edifactreader_setfgroupdate(void* lpObj, const char* lpszFGroupDate);
char* edisdk_edifactreader_getfgroupgroupidentification(void* lpObj);
int edisdk_edifactreader_setfgroupgroupidentification(void* lpObj, const char* lpszFGroupGroupIdentification);
char* edisdk_edifactreader_getfgroupmessagerelease(void* lpObj);
int edisdk_edifactreader_setfgroupmessagerelease(void* lpObj, const char* lpszFGroupMessageRelease);
char* edisdk_edifactreader_getfgroupmessageversion(void* lpObj);
int edisdk_edifactreader_setfgroupmessageversion(void* lpObj, const char* lpszFGroupMessageVersion);
char* edisdk_edifactreader_getfgroupreferencenumber(void* lpObj);
int edisdk_edifactreader_setfgroupreferencenumber(void* lpObj, const char* lpszFGroupReferenceNumber);
char* edisdk_edifactreader_getfgrouptime(void* lpObj);
int edisdk_edifactreader_setfgrouptime(void* lpObj, const char* lpszFGroupTime);
QString getFGroupAppPassword();
int setFGroupAppPassword(QString qsFGroupAppPassword); QString getFGroupAppRecipientIdentification();
int setFGroupAppRecipientIdentification(QString qsFGroupAppRecipientIdentification); QString getFGroupAppRecipientIDQualifier();
int setFGroupAppRecipientIDQualifier(QString qsFGroupAppRecipientIDQualifier); QString getFGroupAppSenderIdentification();
int setFGroupAppSenderIdentification(QString qsFGroupAppSenderIdentification); QString getFGroupAppSenderIDQualifier();
int setFGroupAppSenderIDQualifier(QString qsFGroupAppSenderIDQualifier); QString getFGroupAssociationAssignedCode();
int setFGroupAssociationAssignedCode(QString qsFGroupAssociationAssignedCode); QString getFGroupControllingAgency();
int setFGroupControllingAgency(QString qsFGroupControllingAgency); QString getFGroupDate();
int setFGroupDate(QString qsFGroupDate); QString getFGroupGroupIdentification();
int setFGroupGroupIdentification(QString qsFGroupGroupIdentification); QString getFGroupMessageRelease();
int setFGroupMessageRelease(QString qsFGroupMessageRelease); QString getFGroupMessageVersion();
int setFGroupMessageVersion(QString qsFGroupMessageVersion); QString getFGroupReferenceNumber();
int setFGroupReferenceNumber(QString qsFGroupReferenceNumber); QString getFGroupTime();
int setFGroupTime(QString qsFGroupTime);

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.

Data Type

EDISDKEDIFACTFunctionalGroup

FunctionalGroupCount Property (EDIFACTReader Class)

The number of FunctionalGroups in the current Interchange.

Syntax

ANSI (Cross Platform)
int GetFunctionalGroupCount();

Unicode (Windows)
INT GetFunctionalGroupCount();
int edisdk_edifactreader_getfunctionalgroupcount(void* lpObj);
int getFunctionalGroupCount();

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.

Data Type

Integer

FunctionalGroupIndex Property (EDIFACTReader Class)

The index of the current FunctionalGroup.

Syntax

ANSI (Cross Platform)
int GetFunctionalGroupIndex();
int SetFunctionalGroupIndex(int iFunctionalGroupIndex); Unicode (Windows) INT GetFunctionalGroupIndex();
INT SetFunctionalGroupIndex(INT iFunctionalGroupIndex);
int edisdk_edifactreader_getfunctionalgroupindex(void* lpObj);
int edisdk_edifactreader_setfunctionalgroupindex(void* lpObj, int iFunctionalGroupIndex);
int getFunctionalGroupIndex();
int setFunctionalGroupIndex(int iFunctionalGroupIndex);

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.

Data Type

Integer

Group Property (EDIFACTReader Class)

Specifies the group to load segments from.

Syntax

ANSI (Cross Platform)
char* GetGroup();
int SetGroup(const char* lpszGroup); Unicode (Windows) LPWSTR GetGroup();
INT SetGroup(LPCWSTR lpszGroup);
char* edisdk_edifactreader_getgroup(void* lpObj);
int edisdk_edifactreader_setgroup(void* lpObj, const char* lpszGroup);
QString getGroup();
int setGroup(QString qsGroup);

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.

Data Type

String

InputData Property (EDIFACTReader Class)

The EDI message, specified as a string.

Syntax

ANSI (Cross Platform)
char* GetInputData();
int SetInputData(const char* lpszInputData); Unicode (Windows) LPWSTR GetInputData();
INT SetInputData(LPCWSTR lpszInputData);
char* edisdk_edifactreader_getinputdata(void* lpObj);
int edisdk_edifactreader_setinputdata(void* lpObj, const char* lpszInputData);
QString getInputData();
int setInputData(QString qsInputData);

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.

Data Type

String

InputFile Property (EDIFACTReader Class)

The file containing the EDI message.

Syntax

ANSI (Cross Platform)
char* GetInputFile();
int SetInputFile(const char* lpszInputFile); Unicode (Windows) LPWSTR GetInputFile();
INT SetInputFile(LPCWSTR lpszInputFile);
char* edisdk_edifactreader_getinputfile(void* lpObj);
int edisdk_edifactreader_setinputfile(void* lpObj, const char* lpszInputFile);
QString getInputFile();
int setInputFile(QString qsInputFile);

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.

Data Type

String

Interchange Property (EDIFACTReader Class)

The current Interchange.

Syntax

EDISDKEDIFACTInterchange* GetInterchange();

char* edisdk_edifactreader_getinterchangeackrequest(void* lpObj);
int edisdk_edifactreader_setinterchangeackrequest(void* lpObj, const char* lpszInterchangeAckRequest);
char* edisdk_edifactreader_getinterchangeagreementidentifier(void* lpObj);
int edisdk_edifactreader_setinterchangeagreementidentifier(void* lpObj, const char* lpszInterchangeAgreementIdentifier);
char* edisdk_edifactreader_getinterchangeapplicationreference(void* lpObj);
int edisdk_edifactreader_setinterchangeapplicationreference(void* lpObj, const char* lpszInterchangeApplicationReference);
char* edisdk_edifactreader_getinterchangecharacterencoding(void* lpObj);
int edisdk_edifactreader_setinterchangecharacterencoding(void* lpObj, const char* lpszInterchangeCharacterEncoding);
char* edisdk_edifactreader_getinterchangecodelistversionnumber(void* lpObj);
int edisdk_edifactreader_setinterchangecodelistversionnumber(void* lpObj, const char* lpszInterchangeCodeListVersionNumber);
char* edisdk_edifactreader_getinterchangedate(void* lpObj);
int edisdk_edifactreader_setinterchangedate(void* lpObj, const char* lpszInterchangeDate);
char* edisdk_edifactreader_getinterchangeprocessingprioritycode(void* lpObj);
int edisdk_edifactreader_setinterchangeprocessingprioritycode(void* lpObj, const char* lpszInterchangeProcessingPriorityCode);
char* edisdk_edifactreader_getinterchangerecipientidentification(void* lpObj);
int edisdk_edifactreader_setinterchangerecipientidentification(void* lpObj, const char* lpszInterchangeRecipientIdentification);
char* edisdk_edifactreader_getinterchangerecipientidqualifier(void* lpObj);
int edisdk_edifactreader_setinterchangerecipientidqualifier(void* lpObj, const char* lpszInterchangeRecipientIDQualifier);
char* edisdk_edifactreader_getinterchangerecipientinternalidentification(void* lpObj);
int edisdk_edifactreader_setinterchangerecipientinternalidentification(void* lpObj, const char* lpszInterchangeRecipientInternalIdentification);
char* edisdk_edifactreader_getinterchangerecipientinternalsubidentification(void* lpObj);
int edisdk_edifactreader_setinterchangerecipientinternalsubidentification(void* lpObj, const char* lpszInterchangeRecipientInternalSubIdentification);
char* edisdk_edifactreader_getinterchangerecipientpassword(void* lpObj);
int edisdk_edifactreader_setinterchangerecipientpassword(void* lpObj, const char* lpszInterchangeRecipientPassword);
char* edisdk_edifactreader_getinterchangerecipientpasswordqualifier(void* lpObj);
int edisdk_edifactreader_setinterchangerecipientpasswordqualifier(void* lpObj, const char* lpszInterchangeRecipientPasswordQualifier);
char* edisdk_edifactreader_getinterchangereferencenumber(void* lpObj);
int edisdk_edifactreader_setinterchangereferencenumber(void* lpObj, const char* lpszInterchangeReferenceNumber);
char* edisdk_edifactreader_getinterchangesenderidentification(void* lpObj);
int edisdk_edifactreader_setinterchangesenderidentification(void* lpObj, const char* lpszInterchangeSenderIdentification);
char* edisdk_edifactreader_getinterchangesenderidqualifier(void* lpObj);
int edisdk_edifactreader_setinterchangesenderidqualifier(void* lpObj, const char* lpszInterchangeSenderIDQualifier);
char* edisdk_edifactreader_getinterchangesenderinternalidentification(void* lpObj);
int edisdk_edifactreader_setinterchangesenderinternalidentification(void* lpObj, const char* lpszInterchangeSenderInternalIdentification);
char* edisdk_edifactreader_getinterchangesenderinternalsubidentification(void* lpObj);
int edisdk_edifactreader_setinterchangesenderinternalsubidentification(void* lpObj, const char* lpszInterchangeSenderInternalSubIdentification);
char* edisdk_edifactreader_getinterchangesyntaxidentifier(void* lpObj);
int edisdk_edifactreader_setinterchangesyntaxidentifier(void* lpObj, const char* lpszInterchangeSyntaxIdentifier);
char* edisdk_edifactreader_getinterchangesyntaxversionnumber(void* lpObj);
int edisdk_edifactreader_setinterchangesyntaxversionnumber(void* lpObj, const char* lpszInterchangeSyntaxVersionNumber);
char* edisdk_edifactreader_getinterchangetestindicator(void* lpObj);
int edisdk_edifactreader_setinterchangetestindicator(void* lpObj, const char* lpszInterchangeTestIndicator);
char* edisdk_edifactreader_getinterchangetime(void* lpObj);
int edisdk_edifactreader_setinterchangetime(void* lpObj, const char* lpszInterchangeTime);
QString getInterchangeAckRequest();
int setInterchangeAckRequest(QString qsInterchangeAckRequest); QString getInterchangeAgreementIdentifier();
int setInterchangeAgreementIdentifier(QString qsInterchangeAgreementIdentifier); QString getInterchangeApplicationReference();
int setInterchangeApplicationReference(QString qsInterchangeApplicationReference); QString getInterchangeCharacterEncoding();
int setInterchangeCharacterEncoding(QString qsInterchangeCharacterEncoding); QString getInterchangeCodeListVersionNumber();
int setInterchangeCodeListVersionNumber(QString qsInterchangeCodeListVersionNumber); QString getInterchangeDate();
int setInterchangeDate(QString qsInterchangeDate); QString getInterchangeProcessingPriorityCode();
int setInterchangeProcessingPriorityCode(QString qsInterchangeProcessingPriorityCode); QString getInterchangeRecipientIdentification();
int setInterchangeRecipientIdentification(QString qsInterchangeRecipientIdentification); QString getInterchangeRecipientIDQualifier();
int setInterchangeRecipientIDQualifier(QString qsInterchangeRecipientIDQualifier); QString getInterchangeRecipientInternalIdentification();
int setInterchangeRecipientInternalIdentification(QString qsInterchangeRecipientInternalIdentification); QString getInterchangeRecipientInternalSubIdentification();
int setInterchangeRecipientInternalSubIdentification(QString qsInterchangeRecipientInternalSubIdentification); QString getInterchangeRecipientPassword();
int setInterchangeRecipientPassword(QString qsInterchangeRecipientPassword); QString getInterchangeRecipientPasswordQualifier();
int setInterchangeRecipientPasswordQualifier(QString qsInterchangeRecipientPasswordQualifier); QString getInterchangeReferenceNumber();
int setInterchangeReferenceNumber(QString qsInterchangeReferenceNumber); QString getInterchangeSenderIdentification();
int setInterchangeSenderIdentification(QString qsInterchangeSenderIdentification); QString getInterchangeSenderIDQualifier();
int setInterchangeSenderIDQualifier(QString qsInterchangeSenderIDQualifier); QString getInterchangeSenderInternalIdentification();
int setInterchangeSenderInternalIdentification(QString qsInterchangeSenderInternalIdentification); QString getInterchangeSenderInternalSubIdentification();
int setInterchangeSenderInternalSubIdentification(QString qsInterchangeSenderInternalSubIdentification); QString getInterchangeSyntaxIdentifier();
int setInterchangeSyntaxIdentifier(QString qsInterchangeSyntaxIdentifier); QString getInterchangeSyntaxVersionNumber();
int setInterchangeSyntaxVersionNumber(QString qsInterchangeSyntaxVersionNumber); QString getInterchangeTestIndicator();
int setInterchangeTestIndicator(QString qsInterchangeTestIndicator); QString getInterchangeTime();
int setInterchangeTime(QString qsInterchangeTime);

Remarks

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

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

Data Type

EDISDKEDIFACTInterchange

InterchangeCount Property (EDIFACTReader Class)

The number of Interchanges in the document.

Syntax

ANSI (Cross Platform)
int GetInterchangeCount();

Unicode (Windows)
INT GetInterchangeCount();
int edisdk_edifactreader_getinterchangecount(void* lpObj);
int getInterchangeCount();

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.

Data Type

Integer

InterchangeIndex Property (EDIFACTReader Class)

The index of the current Interchange.

Syntax

ANSI (Cross Platform)
int GetInterchangeIndex();
int SetInterchangeIndex(int iInterchangeIndex); Unicode (Windows) INT GetInterchangeIndex();
INT SetInterchangeIndex(INT iInterchangeIndex);
int edisdk_edifactreader_getinterchangeindex(void* lpObj);
int edisdk_edifactreader_setinterchangeindex(void* lpObj, int iInterchangeIndex);
int getInterchangeIndex();
int setInterchangeIndex(int iInterchangeIndex);

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.

Data Type

Integer

Message Property (EDIFACTReader Class)

The current message.

Syntax

EDISDKEDIFACTMessage* GetMessage();

char* edisdk_edifactreader_getmsgassociationassignedcode(void* lpObj);
int edisdk_edifactreader_setmsgassociationassignedcode(void* lpObj, const char* lpszMsgAssociationAssignedCode);
char* edisdk_edifactreader_getmsgcodelistversionnumber(void* lpObj);
int edisdk_edifactreader_setmsgcodelistversionnumber(void* lpObj, const char* lpszMsgCodeListVersionNumber);
char* edisdk_edifactreader_getmsgcommonaccessreference(void* lpObj);
int edisdk_edifactreader_setmsgcommonaccessreference(void* lpObj, const char* lpszMsgCommonAccessReference);
char* edisdk_edifactreader_getmsgcontrollingagency(void* lpObj);
int edisdk_edifactreader_setmsgcontrollingagency(void* lpObj, const char* lpszMsgControllingAgency);
char* edisdk_edifactreader_getmsgfirstandlasttransfer(void* lpObj);
int edisdk_edifactreader_setmsgfirstandlasttransfer(void* lpObj, const char* lpszMsgFirstAndLastTransfer);
char* edisdk_edifactreader_getmsgmessageimplcontrollingagency(void* lpObj);
int edisdk_edifactreader_setmsgmessageimplcontrollingagency(void* lpObj, const char* lpszMsgMessageImplControllingAgency);
char* edisdk_edifactreader_getmsgmessageimplidentification(void* lpObj);
int edisdk_edifactreader_setmsgmessageimplidentification(void* lpObj, const char* lpszMsgMessageImplIdentification);
char* edisdk_edifactreader_getmsgmessageimplrelease(void* lpObj);
int edisdk_edifactreader_setmsgmessageimplrelease(void* lpObj, const char* lpszMsgMessageImplRelease);
char* edisdk_edifactreader_getmsgmessageimplversion(void* lpObj);
int edisdk_edifactreader_setmsgmessageimplversion(void* lpObj, const char* lpszMsgMessageImplVersion);
char* edisdk_edifactreader_getmsgmessagerelease(void* lpObj);
int edisdk_edifactreader_setmsgmessagerelease(void* lpObj, const char* lpszMsgMessageRelease);
char* edisdk_edifactreader_getmsgmessagesubsetcontrollingagency(void* lpObj);
int edisdk_edifactreader_setmsgmessagesubsetcontrollingagency(void* lpObj, const char* lpszMsgMessageSubsetControllingAgency);
char* edisdk_edifactreader_getmsgmessagesubsetidentification(void* lpObj);
int edisdk_edifactreader_setmsgmessagesubsetidentification(void* lpObj, const char* lpszMsgMessageSubsetIdentification);
char* edisdk_edifactreader_getmsgmessagesubsetrelease(void* lpObj);
int edisdk_edifactreader_setmsgmessagesubsetrelease(void* lpObj, const char* lpszMsgMessageSubsetRelease);
char* edisdk_edifactreader_getmsgmessagesubsetversion(void* lpObj);
int edisdk_edifactreader_setmsgmessagesubsetversion(void* lpObj, const char* lpszMsgMessageSubsetVersion);
char* edisdk_edifactreader_getmsgmessagetype(void* lpObj);
int edisdk_edifactreader_setmsgmessagetype(void* lpObj, const char* lpszMsgMessageType);
char* edisdk_edifactreader_getmsgmessagetypesubfunctionidentification(void* lpObj);
int edisdk_edifactreader_setmsgmessagetypesubfunctionidentification(void* lpObj, const char* lpszMsgMessageTypeSubFunctionIdentification);
char* edisdk_edifactreader_getmsgmessageversion(void* lpObj);
int edisdk_edifactreader_setmsgmessageversion(void* lpObj, const char* lpszMsgMessageVersion);
char* edisdk_edifactreader_getmsgreferencenumber(void* lpObj);
int edisdk_edifactreader_setmsgreferencenumber(void* lpObj, const char* lpszMsgReferenceNumber);
char* edisdk_edifactreader_getmsgscenariocontrollingagency(void* lpObj);
int edisdk_edifactreader_setmsgscenariocontrollingagency(void* lpObj, const char* lpszMsgScenarioControllingAgency);
char* edisdk_edifactreader_getmsgscenarioidentification(void* lpObj);
int edisdk_edifactreader_setmsgscenarioidentification(void* lpObj, const char* lpszMsgScenarioIdentification);
char* edisdk_edifactreader_getmsgscenariorelease(void* lpObj);
int edisdk_edifactreader_setmsgscenariorelease(void* lpObj, const char* lpszMsgScenarioRelease);
char* edisdk_edifactreader_getmsgscenarioversion(void* lpObj);
int edisdk_edifactreader_setmsgscenarioversion(void* lpObj, const char* lpszMsgScenarioVersion);
char* edisdk_edifactreader_getmsgsequenceoftransfers(void* lpObj);
int edisdk_edifactreader_setmsgsequenceoftransfers(void* lpObj, const char* lpszMsgSequenceOfTransfers);
QString getMsgAssociationAssignedCode();
int setMsgAssociationAssignedCode(QString qsMsgAssociationAssignedCode); QString getMsgCodeListVersionNumber();
int setMsgCodeListVersionNumber(QString qsMsgCodeListVersionNumber); QString getMsgCommonAccessReference();
int setMsgCommonAccessReference(QString qsMsgCommonAccessReference); QString getMsgControllingAgency();
int setMsgControllingAgency(QString qsMsgControllingAgency); QString getMsgFirstAndLastTransfer();
int setMsgFirstAndLastTransfer(QString qsMsgFirstAndLastTransfer); QString getMsgMessageImplControllingAgency();
int setMsgMessageImplControllingAgency(QString qsMsgMessageImplControllingAgency); QString getMsgMessageImplIdentification();
int setMsgMessageImplIdentification(QString qsMsgMessageImplIdentification); QString getMsgMessageImplRelease();
int setMsgMessageImplRelease(QString qsMsgMessageImplRelease); QString getMsgMessageImplVersion();
int setMsgMessageImplVersion(QString qsMsgMessageImplVersion); QString getMsgMessageRelease();
int setMsgMessageRelease(QString qsMsgMessageRelease); QString getMsgMessageSubsetControllingAgency();
int setMsgMessageSubsetControllingAgency(QString qsMsgMessageSubsetControllingAgency); QString getMsgMessageSubsetIdentification();
int setMsgMessageSubsetIdentification(QString qsMsgMessageSubsetIdentification); QString getMsgMessageSubsetRelease();
int setMsgMessageSubsetRelease(QString qsMsgMessageSubsetRelease); QString getMsgMessageSubsetVersion();
int setMsgMessageSubsetVersion(QString qsMsgMessageSubsetVersion); QString getMsgMessageType();
int setMsgMessageType(QString qsMsgMessageType); QString getMsgMessageTypeSubFunctionIdentification();
int setMsgMessageTypeSubFunctionIdentification(QString qsMsgMessageTypeSubFunctionIdentification); QString getMsgMessageVersion();
int setMsgMessageVersion(QString qsMsgMessageVersion); QString getMsgReferenceNumber();
int setMsgReferenceNumber(QString qsMsgReferenceNumber); QString getMsgScenarioControllingAgency();
int setMsgScenarioControllingAgency(QString qsMsgScenarioControllingAgency); QString getMsgScenarioIdentification();
int setMsgScenarioIdentification(QString qsMsgScenarioIdentification); QString getMsgScenarioRelease();
int setMsgScenarioRelease(QString qsMsgScenarioRelease); QString getMsgScenarioVersion();
int setMsgScenarioVersion(QString qsMsgScenarioVersion); QString getMsgSequenceOfTransfers();
int setMsgSequenceOfTransfers(QString qsMsgSequenceOfTransfers);

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.

Data Type

EDISDKEDIFACTMessage

MessageCount Property (EDIFACTReader Class)

The number of message in the current Interchange or FunctionalGroup.

Syntax

ANSI (Cross Platform)
int GetMessageCount();

Unicode (Windows)
INT GetMessageCount();
int edisdk_edifactreader_getmessagecount(void* lpObj);
int getMessageCount();

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.

Data Type

Integer

MessageIndex Property (EDIFACTReader Class)

The index of the current Message.

Syntax

ANSI (Cross Platform)
int GetMessageIndex();
int SetMessageIndex(int iMessageIndex); Unicode (Windows) INT GetMessageIndex();
INT SetMessageIndex(INT iMessageIndex);
int edisdk_edifactreader_getmessageindex(void* lpObj);
int edisdk_edifactreader_setmessageindex(void* lpObj, int iMessageIndex);
int getMessageIndex();
int setMessageIndex(int iMessageIndex);

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.

Data Type

Integer

Segment Property (EDIFACTReader Class)

The current segment.

Syntax

EDISDKEDISegment* GetSegment();

int edisdk_edifactreader_getsegmentoptional(void* lpObj);
char* edisdk_edifactreader_getsegmentpath(void* lpObj);
char* edisdk_edifactreader_getsegmentschemapath(void* lpObj);
char* edisdk_edifactreader_getsegmenttag(void* lpObj);
bool getSegmentOptional();

QString getSegmentPath();

QString getSegmentSchemaPath();

QString getSegmentTag();

Remarks

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

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

Data Type

EDISDKEDISegment

SegmentCount Property (EDIFACTReader Class)

The number of segments in the current Message.

Syntax

ANSI (Cross Platform)
int GetSegmentCount();

Unicode (Windows)
INT GetSegmentCount();
int edisdk_edifactreader_getsegmentcount(void* lpObj);
int getSegmentCount();

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.

Data Type

Integer

SegmentIndex Property (EDIFACTReader Class)

The index of the current segment.

Syntax

ANSI (Cross Platform)
int GetSegmentIndex();
int SetSegmentIndex(int iSegmentIndex); Unicode (Windows) INT GetSegmentIndex();
INT SetSegmentIndex(INT iSegmentIndex);
int edisdk_edifactreader_getsegmentindex(void* lpObj);
int edisdk_edifactreader_setsegmentindex(void* lpObj, int iSegmentIndex);
int getSegmentIndex();
int setSegmentIndex(int iSegmentIndex);

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.

Data Type

Integer

ValidateOnParse Property (EDIFACTReader Class)

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

Syntax

ANSI (Cross Platform)
int GetValidateOnParse();
int SetValidateOnParse(int bValidateOnParse); Unicode (Windows) BOOL GetValidateOnParse();
INT SetValidateOnParse(BOOL bValidateOnParse);
int edisdk_edifactreader_getvalidateonparse(void* lpObj);
int edisdk_edifactreader_setvalidateonparse(void* lpObj, int bValidateOnParse);
bool getValidateOnParse();
int setValidateOnParse(bool bValidateOnParse);

Default Value

FALSE

Remarks

When this property is set to True, the class 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.

Data Type

Boolean

Config Method (EDIFACTReader Class)

Sets or retrieves a configuration setting.

Syntax

ANSI (Cross Platform)
char* Config(const char* lpszConfigurationString);

Unicode (Windows)
LPWSTR Config(LPCWSTR lpszConfigurationString);
char* edisdk_edifactreader_config(void* lpObj, const char* lpszConfigurationString);
QString config(const QString& qsConfigurationString);

Remarks

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

These settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the class, 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.

Error Handling (C++)

This method returns a String value; after it returns, call the GetLastErrorCode() method to obtain its result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message.

GenerateAck Method (EDIFACTReader Class)

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

Syntax

ANSI (Cross Platform)
char* GenerateAck();

Unicode (Windows)
LPWSTR GenerateAck();
char* edisdk_edifactreader_generateack(void* lpObj);
QString generateAck();

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.

Error Handling (C++)

This method returns a String value; after it returns, call the GetLastErrorCode() method to obtain its result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message.

GetElementValue Method (EDIFACTReader Class)

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

Syntax

ANSI (Cross Platform)
char* GetElementValue(const char* lpszPath);

Unicode (Windows)
LPWSTR GetElementValue(LPCWSTR lpszPath);
char* edisdk_edifactreader_getelementvalue(void* lpObj, const char* lpszPath);
QString getElementValue(const QString& qsPath);

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");

Error Handling (C++)

This method returns a String value; after it returns, call the GetLastErrorCode() method to obtain its result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message.

LoadSchema Method (EDIFACTReader Class)

Loads schema information from a file or string data.

Syntax

ANSI (Cross Platform)
int LoadSchema(const char* lpszfileOrData, const char* lpszmessageName);

Unicode (Windows)
INT LoadSchema(LPCWSTR lpszfileOrData, LPCWSTR lpszmessageName);
int edisdk_edifactreader_loadschema(void* lpObj, const char* lpszfileOrData, const char* lpszmessageName);
int loadSchema(const QString& qsfileOrData, const QString& qsmessageName);

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.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

Parse Method (EDIFACTReader Class)

Parse the EDI document and fire parsing events.

Syntax

ANSI (Cross Platform)
int Parse();

Unicode (Windows)
INT Parse();
int edisdk_edifactreader_parse(void* lpObj);
int parse();

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

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

Reset Method (EDIFACTReader Class)

Resets all properties to their default values.

Syntax

ANSI (Cross Platform)
int Reset();

Unicode (Windows)
INT Reset();
int edisdk_edifactreader_reset(void* lpObj);
int reset();

Remarks

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

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

SchemaCode Method (EDIFACTReader Class)

Defines a code value within a list of codes.

Syntax

ANSI (Cross Platform)
int SchemaCode(const char* lpszSchemaId, const char* lpszCodeListId, const char* lpszValue, const char* lpszDescription);

Unicode (Windows)
INT SchemaCode(LPCWSTR lpszSchemaId, LPCWSTR lpszCodeListId, LPCWSTR lpszValue, LPCWSTR lpszDescription);
int edisdk_edifactreader_schemacode(void* lpObj, const char* lpszSchemaId, const char* lpszCodeListId, const char* lpszValue, const char* lpszDescription);
int schemaCode(const QString& qsSchemaId, const QString& qsCodeListId, const QString& qsValue, const QString& qsDescription);

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.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

SchemaCodeList Method (EDIFACTReader Class)

Defines a list of codes.

Syntax

ANSI (Cross Platform)
int SchemaCodeList(const char* lpszSchemaId, const char* lpszCodeListId, const char* lpszDescription);

Unicode (Windows)
INT SchemaCodeList(LPCWSTR lpszSchemaId, LPCWSTR lpszCodeListId, LPCWSTR lpszDescription);
int edisdk_edifactreader_schemacodelist(void* lpObj, const char* lpszSchemaId, const char* lpszCodeListId, const char* lpszDescription);
int schemaCodeList(const QString& qsSchemaId, const QString& qsCodeListId, const QString& qsDescription);

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.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

SchemaComposite Method (EDIFACTReader Class)

Defines a composite element.

Syntax

ANSI (Cross Platform)
int SchemaComposite(const char* lpszSchemaId, const char* lpszCompositeId, const char* lpszDescription);

Unicode (Windows)
INT SchemaComposite(LPCWSTR lpszSchemaId, LPCWSTR lpszCompositeId, LPCWSTR lpszDescription);
int edisdk_edifactreader_schemacomposite(void* lpObj, const char* lpszSchemaId, const char* lpszCompositeId, const char* lpszDescription);
int schemaComposite(const QString& qsSchemaId, const QString& qsCompositeId, const QString& qsDescription);

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.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

SchemaElement Method (EDIFACTReader Class)

Defines a simple element.

Syntax

ANSI (Cross Platform)
int SchemaElement(const char* lpszSchemaId, const char* lpszElementId, const char* lpszDataType, int iMinLength, int iMaxLength, const char* lpszCodeId, const char* lpszDescription);

Unicode (Windows)
INT SchemaElement(LPCWSTR lpszSchemaId, LPCWSTR lpszElementId, LPCWSTR lpszDataType, INT iMinLength, INT iMaxLength, LPCWSTR lpszCodeId, LPCWSTR lpszDescription);
int edisdk_edifactreader_schemaelement(void* lpObj, const char* lpszSchemaId, const char* lpszElementId, const char* lpszDataType, int iMinLength, int iMaxLength, const char* lpszCodeId, const char* lpszDescription);
int schemaElement(const QString& qsSchemaId, const QString& qsElementId, const QString& qsDataType, int iMinLength, int iMaxLength, const QString& qsCodeId, const QString& qsDescription);

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.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

SchemaElementRef Method (EDIFACTReader Class)

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

Syntax

ANSI (Cross Platform)
int SchemaElementRef(const char* lpszSchemaId, const char* lpszParentId, const char* lpszElementId, const char* lpszRefId, int bRequired, int iMaxCount);

Unicode (Windows)
INT SchemaElementRef(LPCWSTR lpszSchemaId, LPCWSTR lpszParentId, LPCWSTR lpszElementId, LPCWSTR lpszRefId, BOOL bRequired, INT iMaxCount);
int edisdk_edifactreader_schemaelementref(void* lpObj, const char* lpszSchemaId, const char* lpszParentId, const char* lpszElementId, const char* lpszRefId, int bRequired, int iMaxCount);
int schemaElementRef(const QString& qsSchemaId, const QString& qsParentId, const QString& qsElementId, const QString& qsRefId, bool bRequired, int iMaxCount);

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.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

SchemaEnd Method (EDIFACTReader Class)

Ends a schema definition.

Syntax

ANSI (Cross Platform)
int SchemaEnd();

Unicode (Windows)
INT SchemaEnd();
int edisdk_edifactreader_schemaend(void* lpObj);
int schemaEnd();

Remarks

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

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

SchemaGroup Method (EDIFACTReader Class)

Defines a group of segments.

Syntax

ANSI (Cross Platform)
int SchemaGroup(const char* lpszSchemaId, const char* lpszGroupPath, const char* lpszGroupId, int bRequired, int iMaxCount);

Unicode (Windows)
INT SchemaGroup(LPCWSTR lpszSchemaId, LPCWSTR lpszGroupPath, LPCWSTR lpszGroupId, BOOL bRequired, INT iMaxCount);
int edisdk_edifactreader_schemagroup(void* lpObj, const char* lpszSchemaId, const char* lpszGroupPath, const char* lpszGroupId, int bRequired, int iMaxCount);
int schemaGroup(const QString& qsSchemaId, const QString& qsGroupPath, const QString& qsGroupId, bool bRequired, int iMaxCount);

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.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

SchemaMessage Method (EDIFACTReader Class)

Defines a message.

Syntax

ANSI (Cross Platform)
int SchemaMessage(const char* lpszSchemaId, const char* lpszMessageId, const char* lpszDescription);

Unicode (Windows)
INT SchemaMessage(LPCWSTR lpszSchemaId, LPCWSTR lpszMessageId, LPCWSTR lpszDescription);
int edisdk_edifactreader_schemamessage(void* lpObj, const char* lpszSchemaId, const char* lpszMessageId, const char* lpszDescription);
int schemaMessage(const QString& qsSchemaId, const QString& qsMessageId, const QString& qsDescription);

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.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

SchemaSegment Method (EDIFACTReader Class)

Defines a segment.

Syntax

ANSI (Cross Platform)
int SchemaSegment(const char* lpszSchemaId, const char* lpszSegmentId, const char* lpszDescription);

Unicode (Windows)
INT SchemaSegment(LPCWSTR lpszSchemaId, LPCWSTR lpszSegmentId, LPCWSTR lpszDescription);
int edisdk_edifactreader_schemasegment(void* lpObj, const char* lpszSchemaId, const char* lpszSegmentId, const char* lpszDescription);
int schemaSegment(const QString& qsSchemaId, const QString& qsSegmentId, const QString& qsDescription);

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.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

SchemaSegmentRef Method (EDIFACTReader Class)

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

Syntax

ANSI (Cross Platform)
int SchemaSegmentRef(const char* lpszSchemaId, const char* lpszSegmentPath, const char* lpszSegmentId, int bRequired, int iMaxCount);

Unicode (Windows)
INT SchemaSegmentRef(LPCWSTR lpszSchemaId, LPCWSTR lpszSegmentPath, LPCWSTR lpszSegmentId, BOOL bRequired, INT iMaxCount);
int edisdk_edifactreader_schemasegmentref(void* lpObj, const char* lpszSchemaId, const char* lpszSegmentPath, const char* lpszSegmentId, int bRequired, int iMaxCount);
int schemaSegmentRef(const QString& qsSchemaId, const QString& qsSegmentPath, const QString& qsSegmentId, bool bRequired, int iMaxCount);

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.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

SchemaStart Method (EDIFACTReader Class)

Starts a schema definition.

Syntax

ANSI (Cross Platform)
int SchemaStart(const char* lpszSchemaId);

Unicode (Windows)
INT SchemaStart(LPCWSTR lpszSchemaId);
int edisdk_edifactreader_schemastart(void* lpObj, const char* lpszSchemaId);
int schemaStart(const QString& qsSchemaId);

Remarks

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

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

Validate Method (EDIFACTReader Class)

Validate the EDI document and warn about any errors encountered.

Syntax

ANSI (Cross Platform)
int Validate();

Unicode (Windows)
INT Validate();
int edisdk_edifactreader_validate(void* lpObj);
int validate();

Remarks

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

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

EndFunctionalGroup Event (EDIFACTReader Class)

Fires at the end of a functional group while parsing.

Syntax

ANSI (Cross Platform)
virtual int FireEndFunctionalGroup(EDIFACTReaderEndFunctionalGroupEventParams *e);
typedef struct {
const char *Tag;
int MessageCount;
const char *ReferenceNumber; int reserved; } EDIFACTReaderEndFunctionalGroupEventParams;
Unicode (Windows) virtual INT FireEndFunctionalGroup(EDIFACTReaderEndFunctionalGroupEventParams *e);
typedef struct {
LPCWSTR Tag;
INT MessageCount;
LPCWSTR ReferenceNumber; INT reserved; } EDIFACTReaderEndFunctionalGroupEventParams;
#define EID_EDIFACTREADER_ENDFUNCTIONALGROUP 1

virtual INT EDISDK_CALL FireEndFunctionalGroup(LPSTR &lpszTag, INT &iMessageCount, LPSTR &lpszReferenceNumber);
class EDIFACTReaderEndFunctionalGroupEventParams {
public:
  const QString &tag();

  int messageCount();

  const QString &referenceNumber();

  int eventRetVal();
  void setEventRetVal(int iRetVal);
};
// To handle, subclass EDIFACTReader and override this emitter function. virtual int fireEndFunctionalGroup(EDIFACTReaderEndFunctionalGroupEventParams *e) {...} // Or, connect one or more slots to this signal. void endFunctionalGroup(EDIFACTReaderEndFunctionalGroupEventParams *e);

Remarks

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

EndGroup Event (EDIFACTReader Class)

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

Syntax

ANSI (Cross Platform)
virtual int FireEndGroup(EDIFACTReaderEndGroupEventParams *e);
typedef struct {
const char *Name;
int SchemaIndex; int reserved; } EDIFACTReaderEndGroupEventParams;
Unicode (Windows) virtual INT FireEndGroup(EDIFACTReaderEndGroupEventParams *e);
typedef struct {
LPCWSTR Name;
INT SchemaIndex; INT reserved; } EDIFACTReaderEndGroupEventParams;
#define EID_EDIFACTREADER_ENDGROUP 2

virtual INT EDISDK_CALL FireEndGroup(LPSTR &lpszName, INT &iSchemaIndex);
class EDIFACTReaderEndGroupEventParams {
public:
  const QString &name();

  int schemaIndex();

  int eventRetVal();
  void setEventRetVal(int iRetVal);
};
// To handle, subclass EDIFACTReader and override this emitter function. virtual int fireEndGroup(EDIFACTReaderEndGroupEventParams *e) {...} // Or, connect one or more slots to this signal. void endGroup(EDIFACTReaderEndGroupEventParams *e);

Remarks

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

EndInterchange Event (EDIFACTReader Class)

Fires at the end of an interchange while parsing.

Syntax

ANSI (Cross Platform)
virtual int FireEndInterchange(EDIFACTReaderEndInterchangeEventParams *e);
typedef struct {
const char *Tag;
int GroupCount;
const char *ReferenceNumber; int reserved; } EDIFACTReaderEndInterchangeEventParams;
Unicode (Windows) virtual INT FireEndInterchange(EDIFACTReaderEndInterchangeEventParams *e);
typedef struct {
LPCWSTR Tag;
INT GroupCount;
LPCWSTR ReferenceNumber; INT reserved; } EDIFACTReaderEndInterchangeEventParams;
#define EID_EDIFACTREADER_ENDINTERCHANGE 3

virtual INT EDISDK_CALL FireEndInterchange(LPSTR &lpszTag, INT &iGroupCount, LPSTR &lpszReferenceNumber);
class EDIFACTReaderEndInterchangeEventParams {
public:
  const QString &tag();

  int groupCount();

  const QString &referenceNumber();

  int eventRetVal();
  void setEventRetVal(int iRetVal);
};
// To handle, subclass EDIFACTReader and override this emitter function. virtual int fireEndInterchange(EDIFACTReaderEndInterchangeEventParams *e) {...} // Or, connect one or more slots to this signal. void endInterchange(EDIFACTReaderEndInterchangeEventParams *e);

Remarks

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

EndMessage Event (EDIFACTReader Class)

Fires at the end of a message while parsing.

Syntax

ANSI (Cross Platform)
virtual int FireEndMessage(EDIFACTReaderEndMessageEventParams *e);
typedef struct {
const char *Tag;
int SegmentCount;
const char *ReferenceNumber; int reserved; } EDIFACTReaderEndMessageEventParams;
Unicode (Windows) virtual INT FireEndMessage(EDIFACTReaderEndMessageEventParams *e);
typedef struct {
LPCWSTR Tag;
INT SegmentCount;
LPCWSTR ReferenceNumber; INT reserved; } EDIFACTReaderEndMessageEventParams;
#define EID_EDIFACTREADER_ENDMESSAGE 4

virtual INT EDISDK_CALL FireEndMessage(LPSTR &lpszTag, INT &iSegmentCount, LPSTR &lpszReferenceNumber);
class EDIFACTReaderEndMessageEventParams {
public:
  const QString &tag();

  int segmentCount();

  const QString &referenceNumber();

  int eventRetVal();
  void setEventRetVal(int iRetVal);
};
// To handle, subclass EDIFACTReader and override this emitter function. virtual int fireEndMessage(EDIFACTReaderEndMessageEventParams *e) {...} // Or, connect one or more slots to this signal. void endMessage(EDIFACTReaderEndMessageEventParams *e);

Remarks

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

Error Event (EDIFACTReader Class)

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

Syntax

ANSI (Cross Platform)
virtual int FireError(EDIFACTReaderErrorEventParams *e);
typedef struct {
int ErrorCode;
const char *Description; int reserved; } EDIFACTReaderErrorEventParams;
Unicode (Windows) virtual INT FireError(EDIFACTReaderErrorEventParams *e);
typedef struct {
INT ErrorCode;
LPCWSTR Description; INT reserved; } EDIFACTReaderErrorEventParams;
#define EID_EDIFACTREADER_ERROR 5

virtual INT EDISDK_CALL FireError(INT &iErrorCode, LPSTR &lpszDescription);
class EDIFACTReaderErrorEventParams {
public:
  int errorCode();

  const QString &description();

  int eventRetVal();
  void setEventRetVal(int iRetVal);
};
// To handle, subclass EDIFACTReader and override this emitter function. virtual int fireError(EDIFACTReaderErrorEventParams *e) {...} // Or, connect one or more slots to this signal. void error(EDIFACTReaderErrorEventParams *e);

Remarks

The Error event is fired in case of exceptional conditions during message processing. Normally, the class fails with an error.

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 Class)

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

Syntax

ANSI (Cross Platform)
virtual int FireResolveSchema(EDIFACTReaderResolveSchemaEventParams *e);
typedef struct {
const char *MessageVersion;
const char *MessageType; int reserved; } EDIFACTReaderResolveSchemaEventParams;
Unicode (Windows) virtual INT FireResolveSchema(EDIFACTReaderResolveSchemaEventParams *e);
typedef struct {
LPCWSTR MessageVersion;
LPCWSTR MessageType; INT reserved; } EDIFACTReaderResolveSchemaEventParams;
#define EID_EDIFACTREADER_RESOLVESCHEMA 6

virtual INT EDISDK_CALL FireResolveSchema(LPSTR &lpszMessageVersion, LPSTR &lpszMessageType);
class EDIFACTReaderResolveSchemaEventParams {
public:
  const QString &messageVersion();

  const QString &messageType();

  int eventRetVal();
  void setEventRetVal(int iRetVal);
};
// To handle, subclass EDIFACTReader and override this emitter function. virtual int fireResolveSchema(EDIFACTReaderResolveSchemaEventParams *e) {...} // Or, connect one or more slots to this signal. void resolveSchema(EDIFACTReaderResolveSchemaEventParams *e);

Remarks

This method fires when the class 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 class still doesn't have a matching schema, then it will attempt schema-less parsing of the EDIFACT message.

Segment Event (EDIFACTReader Class)

Fires at the end of a Segment while parsing.

Syntax

ANSI (Cross Platform)
virtual int FireSegment(EDIFACTReaderSegmentEventParams *e);
typedef struct {
const char *Tag;
const char *SchemaPath;
int Optional;
int ElementCount;
int SchemaIndex;
int SegmentIndex;
int MaxCount;
const char *Path; int reserved; } EDIFACTReaderSegmentEventParams;
Unicode (Windows) virtual INT FireSegment(EDIFACTReaderSegmentEventParams *e);
typedef struct {
LPCWSTR Tag;
LPCWSTR SchemaPath;
BOOL Optional;
INT ElementCount;
INT SchemaIndex;
INT SegmentIndex;
INT MaxCount;
LPCWSTR Path; INT reserved; } EDIFACTReaderSegmentEventParams;
#define EID_EDIFACTREADER_SEGMENT 7

virtual INT EDISDK_CALL FireSegment(LPSTR &lpszTag, LPSTR &lpszSchemaPath, BOOL &bOptional, INT &iElementCount, INT &iSchemaIndex, INT &iSegmentIndex, INT &iMaxCount, LPSTR &lpszPath);
class EDIFACTReaderSegmentEventParams {
public:
  const QString &tag();

  const QString &schemaPath();

  bool optional();

  int elementCount();

  int schemaIndex();

  int segmentIndex();

  int maxCount();

  const QString &path();

  int eventRetVal();
  void setEventRetVal(int iRetVal);
};
// To handle, subclass EDIFACTReader and override this emitter function. virtual int fireSegment(EDIFACTReaderSegmentEventParams *e) {...} // Or, connect one or more slots to this signal. void segment(EDIFACTReaderSegmentEventParams *e);

Remarks

Fires at the end of a Segment while parsing a document

StartFunctionalGroup Event (EDIFACTReader Class)

Fires at the beginning of a functional group while parsing.

Syntax

ANSI (Cross Platform)
virtual int FireStartFunctionalGroup(EDIFACTReaderStartFunctionalGroupEventParams *e);
typedef struct {
const char *Tag;
const char *AppSenderIdentification;
const char *AppRecipientIdentification;
const char *DateTime;
const char *ReferenceNumber; int reserved; } EDIFACTReaderStartFunctionalGroupEventParams;
Unicode (Windows) virtual INT FireStartFunctionalGroup(EDIFACTReaderStartFunctionalGroupEventParams *e);
typedef struct {
LPCWSTR Tag;
LPCWSTR AppSenderIdentification;
LPCWSTR AppRecipientIdentification;
LPCWSTR DateTime;
LPCWSTR ReferenceNumber; INT reserved; } EDIFACTReaderStartFunctionalGroupEventParams;
#define EID_EDIFACTREADER_STARTFUNCTIONALGROUP 8

virtual INT EDISDK_CALL FireStartFunctionalGroup(LPSTR &lpszTag, LPSTR &lpszAppSenderIdentification, LPSTR &lpszAppRecipientIdentification, LPSTR &lpszDateTime, LPSTR &lpszReferenceNumber);
class EDIFACTReaderStartFunctionalGroupEventParams {
public:
  const QString &tag();

  const QString &appSenderIdentification();

  const QString &appRecipientIdentification();

  const QString &dateTime();

  const QString &referenceNumber();

  int eventRetVal();
  void setEventRetVal(int iRetVal);
};
// To handle, subclass EDIFACTReader and override this emitter function. virtual int fireStartFunctionalGroup(EDIFACTReaderStartFunctionalGroupEventParams *e) {...} // Or, connect one or more slots to this signal. void startFunctionalGroup(EDIFACTReaderStartFunctionalGroupEventParams *e);

Remarks

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

StartGroup Event (EDIFACTReader Class)

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

Syntax

ANSI (Cross Platform)
virtual int FireStartGroup(EDIFACTReaderStartGroupEventParams *e);
typedef struct {
const char *Name;
int SchemaIndex;
int MaxCount;
const char *Path; int reserved; } EDIFACTReaderStartGroupEventParams;
Unicode (Windows) virtual INT FireStartGroup(EDIFACTReaderStartGroupEventParams *e);
typedef struct {
LPCWSTR Name;
INT SchemaIndex;
INT MaxCount;
LPCWSTR Path; INT reserved; } EDIFACTReaderStartGroupEventParams;
#define EID_EDIFACTREADER_STARTGROUP 9

virtual INT EDISDK_CALL FireStartGroup(LPSTR &lpszName, INT &iSchemaIndex, INT &iMaxCount, LPSTR &lpszPath);
class EDIFACTReaderStartGroupEventParams {
public:
  const QString &name();

  int schemaIndex();

  int maxCount();

  const QString &path();

  int eventRetVal();
  void setEventRetVal(int iRetVal);
};
// To handle, subclass EDIFACTReader and override this emitter function. virtual int fireStartGroup(EDIFACTReaderStartGroupEventParams *e) {...} // Or, connect one or more slots to this signal. void startGroup(EDIFACTReaderStartGroupEventParams *e);

Remarks

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

StartInterchange Event (EDIFACTReader Class)

Fires at the beginning of an interchange while parsing.

Syntax

ANSI (Cross Platform)
virtual int FireStartInterchange(EDIFACTReaderStartInterchangeEventParams *e);
typedef struct {
const char *Tag;
const char *SyntaxIdentifier;
const char *SyntaxVersion;
const char *SenderIdentification;
const char *RecipientIdentification;
const char *DateTime;
const char *ReferenceNumber; int reserved; } EDIFACTReaderStartInterchangeEventParams;
Unicode (Windows) virtual INT FireStartInterchange(EDIFACTReaderStartInterchangeEventParams *e);
typedef struct {
LPCWSTR Tag;
LPCWSTR SyntaxIdentifier;
LPCWSTR SyntaxVersion;
LPCWSTR SenderIdentification;
LPCWSTR RecipientIdentification;
LPCWSTR DateTime;
LPCWSTR ReferenceNumber; INT reserved; } EDIFACTReaderStartInterchangeEventParams;
#define EID_EDIFACTREADER_STARTINTERCHANGE 10

virtual INT EDISDK_CALL FireStartInterchange(LPSTR &lpszTag, LPSTR &lpszSyntaxIdentifier, LPSTR &lpszSyntaxVersion, LPSTR &lpszSenderIdentification, LPSTR &lpszRecipientIdentification, LPSTR &lpszDateTime, LPSTR &lpszReferenceNumber);
class EDIFACTReaderStartInterchangeEventParams {
public:
  const QString &tag();

  const QString &syntaxIdentifier();

  const QString &syntaxVersion();

  const QString &senderIdentification();

  const QString &recipientIdentification();

  const QString &dateTime();

  const QString &referenceNumber();

  int eventRetVal();
  void setEventRetVal(int iRetVal);
};
// To handle, subclass EDIFACTReader and override this emitter function. virtual int fireStartInterchange(EDIFACTReaderStartInterchangeEventParams *e) {...} // Or, connect one or more slots to this signal. void startInterchange(EDIFACTReaderStartInterchangeEventParams *e);

Remarks

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

StartMessage Event (EDIFACTReader Class)

Fires at the beginning of a message while parsing.

Syntax

ANSI (Cross Platform)
virtual int FireStartMessage(EDIFACTReaderStartMessageEventParams *e);
typedef struct {
const char *Tag;
const char *MessageRelease;
const char *MessageType;
const char *ReferenceNumber;
int SchemaLoaded; int reserved; } EDIFACTReaderStartMessageEventParams;
Unicode (Windows) virtual INT FireStartMessage(EDIFACTReaderStartMessageEventParams *e);
typedef struct {
LPCWSTR Tag;
LPCWSTR MessageRelease;
LPCWSTR MessageType;
LPCWSTR ReferenceNumber;
BOOL SchemaLoaded; INT reserved; } EDIFACTReaderStartMessageEventParams;
#define EID_EDIFACTREADER_STARTMESSAGE 11

virtual INT EDISDK_CALL FireStartMessage(LPSTR &lpszTag, LPSTR &lpszMessageRelease, LPSTR &lpszMessageType, LPSTR &lpszReferenceNumber, BOOL &bSchemaLoaded);
class EDIFACTReaderStartMessageEventParams {
public:
  const QString &tag();

  const QString &messageRelease();

  const QString &messageType();

  const QString &referenceNumber();

  bool schemaLoaded();

  int eventRetVal();
  void setEventRetVal(int iRetVal);
};
// To handle, subclass EDIFACTReader and override this emitter function. virtual int fireStartMessage(EDIFACTReaderStartMessageEventParams *e) {...} // Or, connect one or more slots to this signal. void startMessage(EDIFACTReaderStartMessageEventParams *e);

Remarks

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

ValidateWarning Event (EDIFACTReader Class)

Fires to warn about validation errors.

Syntax

ANSI (Cross Platform)
virtual int FireValidateWarning(EDIFACTReaderValidateWarningEventParams *e);
typedef struct {
int64 Position;
int Line;
int Column;
const char *ErrorCode;
const char *ErrorMessage;
int ErrorType; int reserved; } EDIFACTReaderValidateWarningEventParams;
Unicode (Windows) virtual INT FireValidateWarning(EDIFACTReaderValidateWarningEventParams *e);
typedef struct {
LONG64 Position;
INT Line;
INT Column;
LPCWSTR ErrorCode;
LPCWSTR ErrorMessage;
INT ErrorType; INT reserved; } EDIFACTReaderValidateWarningEventParams;
#define EID_EDIFACTREADER_VALIDATEWARNING 12

virtual INT EDISDK_CALL FireValidateWarning(LONG64 &lPosition, INT &iLine, INT &iColumn, LPSTR &lpszErrorCode, LPSTR &lpszErrorMessage, INT &iErrorType);
class EDIFACTReaderValidateWarningEventParams {
public:
  qint64 position();

  int line();

  int column();

  const QString &errorCode();

  const QString &errorMessage();

  int errorType();

  int eventRetVal();
  void setEventRetVal(int iRetVal);
};
// To handle, subclass EDIFACTReader and override this emitter function. virtual int fireValidateWarning(EDIFACTReaderValidateWarningEventParams *e) {...} // Or, connect one or more slots to this signal. void validateWarning(EDIFACTReaderValidateWarningEventParams *e);

Remarks

When the class 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.

Syntax

EDISDKEDIElement (declared in edisdk.h)

Remarks

This represents an element appearing in an EDI document.

The following fields are available:

Fields

DataType
char* (read-only)

Default Value: ""

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
int (read-only)

Default Value: 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 Value: 0

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

MinLen
int (read-only)

Default Value: 0

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

SchemaDesc
char* (read-only)

Default Value: ""

The description of the element as specified in the schema.

SchemaName
char* (read-only)

Default Value: ""

The name of the element as specified in the schema.

Value
char* (read-only)

Default Value: ""

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

Constructors

EDIElement()

EDIFACTDelimiters Type

The delimiters used in the EDIFACT document.

Syntax

EDISDKEDIFACTDelimiters (declared in edisdk.h)

Remarks

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

The following fields are available:

Fields

Component
char*

Default Value: ":"

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

Decimal
char*

Default Value: "."

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

Element
char*

Default Value: "+"

The delimiter used to separate elements within a segment.

Release
char*

Default Value: "?"

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
char*

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

The character used to indicate a repeating element or component.

Segment
char*

Default Value: "'"

The character used to terminate a segment.

Constructors

EDIFACTDelimiters()

EDIFACTFunctionalGroup Type

A functional group of messages.

Syntax

EDISDKEDIFACTFunctionalGroup (declared in edisdk.h)

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
char*

Default Value: ""

The application password as specified in the functional group header.

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

AppRecipientIdentification
char*

Default Value: ""

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
char*

Default Value: ""

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
char*

Default Value: ""

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

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

AppSenderIDQualifier
char*

Default Value: ""

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
char*

Default Value: ""

The assigned code for the message type.

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

ControllingAgency
char*

Default Value: ""

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
char*

Default Value: ""

The date that the group of messages was prepared.

GroupIdentification
char*

Default Value: ""

The identification value for the functional group.

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

MessageRelease
char*

Default Value: ""

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
char*

Default Value: ""

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
char*

Default Value: ""

The reference number for the functional group.

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

Time
char*

Default Value: ""

The time that the group of messages was prepared.

Constructors

EDIFACTFunctionalGroup()

EDIFACTInterchange Type

An interchange containing functional groups and messages.

Syntax

EDISDKEDIFACTInterchange (declared in edisdk.h)

Remarks

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

The following fields are available:

Fields

AckRequest
char*

Default Value: ""

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

AgreementIdentifier
char*

Default Value: ""

The identifier for the communication agreement used by the interchange.

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

ApplicationReference
char*

Default Value: ""

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
char*

Default Value: ""

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
char*

Default Value: ""

The identifier for the communication agreement used by the interchange.

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

Date
char*

Default Value: ""

The date that the interchange was prepared.

ProcessingPriorityCode
char*

Default Value: ""

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

RecipientIdentification
char*

Default Value: ""

The identification for the interchange's recipient.

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

RecipientIDQualifier
char*

Default Value: ""

The qualifier for the recipient identification code.

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

RecipientInternalIdentification
char*

Default Value: ""

More specific recipient identification for internal use.

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

RecipientInternalSubIdentification
char*

Default Value: ""

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

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

RecipientPassword
char*

Default Value: ""

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
char*

Default Value: ""

A qualifier for the recipient password.

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

ReferenceNumber
char*

Default Value: ""

A reference number for the interchange.

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

SenderIdentification
char*

Default Value: ""

The identification for the interchange's sender.

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

SenderIDQualifier
char*

Default Value: ""

The qualifier for the sender identification code.

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

SenderInternalIdentification
char*

Default Value: ""

More specific sender identification for internal use.

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

SenderInternalSubIdentification
char*

Default Value: ""

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

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

SyntaxIdentifier
char*

Default Value: ""

A identifier specifying the controlling agency and valid character set.

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

SyntaxVersionNumber
char*

Default Value: ""

A 1-character numeric value indicating the syntax version.

TestIndicator
char*

Default Value: ""

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

Time
char*

Default Value: ""

The time that the interchange was prepared.

Constructors

EDIFACTInterchange()

EDIFACTMessage Type

An EDIFACT message.

Syntax

EDISDKEDIFACTMessage (declared in edisdk.h)

Remarks

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

The following fields are available:

Fields

AssociationAssignedCode
char*

Default Value: ""

A code assigned to the message by the controlling organization.

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

CodeListVersionNumber
char*

Default Value: ""

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
char*

Default Value: ""

A reference value to associate this message with related messages.

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

ControllingAgency
char*

Default Value: ""

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
char*

Default Value: ""

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

MessageImplControllingAgency
char*

Default Value: ""

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
char*

Default Value: ""

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
char*

Default Value: ""

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
char*

Default Value: ""

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
char*

Default Value: ""

Identifies the release number for the message.

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

MessageSubsetControllingAgency
char*

Default Value: ""

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
char*

Default Value: ""

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
char*

Default Value: ""

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
char*

Default Value: ""

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
char*

Default Value: ""

A code identifying the message's type.

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

MessageTypeSubFunctionIdentification
char*

Default Value: ""

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
char*

Default Value: ""

Identifies the version number for the message.

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

ReferenceNumber
char*

Default Value: ""

A unique reference number for the message.

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

ScenarioControllingAgency
char*

Default Value: ""

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
char*

Default Value: ""

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
char*

Default Value: ""

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
char*

Default Value: ""

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
char*

Default Value: ""

Specifies the message's position in a sequence.

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

Constructors

EDIFACTMessage()

EDISegment Type

A segment of an EDI document.

Syntax

EDISDKEDISegment (declared in edisdk.h)

Remarks

This represents a segment appearing in an EDI document.

The following fields are available:

Fields

Optional
int (read-only)

Default Value: FALSE

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

Path
char* (read-only)

Default Value: ""

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

SchemaPath
char* (read-only)

Default Value: ""

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
char* (read-only)

Default Value: ""

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

Constructors

EDISegment()

Config Settings (EDIFACTReader Class)

The class 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 class, 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 Class)

Error Handling (C++)

Call the GetLastErrorCode() method to obtain the last called method's result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. Known error codes are listed below. If an error occurs, the GetLastError() method can be called to retrieve the associated error message.

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.