EDIFACT Integrator - Online Help
EDIFACT Integrator
Questions / Feedback?

EDIFACTTranslator Bean

Properties   Methods   Events   Configuration Settings   Errors  

The EDIFACTTranslator component provides a simple way to convert EDI to XML and vice versa.

Syntax

InEDIFACT.Edifacttranslator

Remarks

The EDIFACTTranslator bean provides a way to convert EDI to XML and vice versa.

Getting Started

The bean will convert to XML or EDI depending on the value of InputFormat. If InputFormat is set to ifEDIFACT the data will be converted from EDI to XML. If InputFormat is set to ifXML the data will be converted from XML to EDI.

When converting from EDI to XML optionally call LoadSchema before calling Translate so that additional information can be included in the XML. If a schema is specified the XML will include types and descriptions as element attributes which are useful for interpreting the XML.

EDI elements may optionally be renamed when creating XML. To define how an element is renamed add a renaming rule by calling AddRenamingRule.

After calling Translate the resulting output will contain the EDI or XML data. If the output data is XML the ExportXMLSchema method may be called to export a schema (.xsd) defining the structure of a valid XML document. XML documents which adhere to this document may be translated from XML to EDI.

Input and Output Properties

The bean will determine the source and destination of the input and output based on which properties are set.

The order in which the input properties are checked is as follows:

When a valid source is found the search stops. The order in which the output properties are checked is as follows:

Property List


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

InputDataThe data to translate.
InputFileThe file to translate.
InputFormatThe format of the input data.
OutputDataThe translated data.
OutputFileThe file to which the translated data will be written.
OverwriteWhether to overwrite the file.
RenamingRuleThe rule defining how EDI elements are renamed when translating to XML.
RenamingRuleCountThe number of renaming rules.
RenamingRuleIndexThe index of the current renaming rule.
SchemaFormatThe format of the schema file.
SuffixWhat to append after each segment delimiter.

Method List


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

addRenamingRuleThis method adds a renaming rule to define how an EDI element is renamed when translating to XML.
configSets or retrieves a configuration setting .
exportXMLSchemaExports a XML schema.
loadRenamingRulesLoads a set of renaming rules from file.
loadSchemaLoads a schema file describing a Transaction Set.
loadSchemaStreamLoads a schema stream describing a Transaction Set.
resetResets the state of the control.
saveRenamingRulesSaves the current renaming rule set to a file.
setInputStreamSets the stream from which the component will read the data to translate.
setOutputStreamThe stream to which the component will write the translated data.
translateTranslates the specified data.

Event List


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

EndFunctionalGroupFires whenever a control segment is read that marks the end of an interchange.
EndInterchangeFires whenever a control segment is read that marks the end of an interchange.
EndLoopFires when the end of a loop is detected in a transaction set.
EndTransactionFires whenever a control segment is read that marks the end of a transaction.
ErrorInformation about errors during data delivery.
ResolveSchemaFires whenever a new transaction set is encountered and no schema is found for it.
SegmentFires whenever a data segment in a transaction set is read.
StartFunctionalGroupFires whenever a control segment is read that marks the start of a functional group.
StartInterchangeFires whenever a control segment is read that marks the start of an interchange.
StartLoopFires when the starting of a loop is detected in a transaction set.
StartTransactionFires whenever a control segment is read that marks the start of a transaction.
WarningFires whenever a validation warning is encountered.

Configuration Settings


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

CloseStreamAfterTranslateIf true, the component will close the output stream after translation.
CrossFieldValidationEnabledEnables cross-field validation rules.
EncodingThe character encoding to be applied when reading and writing data.
IncludeFootersWhether to include footer information in the XML.
RenamingRulesDataThe renaming rules data.
ComponentDelimiterThe delimiter character to use to separate components.
ElementDelimiterThe delimiter character to use to separate data elements.
ReleaseCharThe character to use to escape delimiters within values.
RepetitionCharThe repetition character.
SegmentDelimiterThe delimiter character to use to separate segments.
UseSchemaIdSpecifies whether to use the Id from the schema as the XML element name.
StrictSchemaValidationSpecifies the behavior during schema validation.
CodePageThe system code page used for Unicode to Multibyte translations.

 
 
Copyright (c) 2018 /n software inc. - All rights reserved.
Build 1.0.6635.0