xBus

Configuring a Byte Array List Transfer without Transformation

All configuration issues related to the byte array list transfer without transformation are listed here. Byte array list may also be used together with record transformation. The configuration for this situation is outlined in Configuring a Record Transformation.

 
 standard.conf Entries

The chapter System Definitions explains the single keys in detail.

Entries for the Source Interface

Chapter Section Key Value
System source interface name Type Object
System source interface name Message ByteArrayListMessage
System source interface name Filename input data file path
System source interface name FinalResolution action on the input file after successful transfer
System source interface name OnError action on the input file in case of an error
System source interface name Encoding string encoding on the source system - only necessary if the system does not report the (correct) encoding
System source interface name RecordLineLength only necessary if records are to be identified by counting bytes instead of reading until line breaks
System source interface name AS400 name of the AS400 machine if it is the source system
Journal Write source interface name.Receive true or false
System source interface name DescriptionFile name of the source structure description XML file without path

The last key is the only particular to interfaces with byte array data transfer without transformation (and record transformation). It tells the system where to find the description of the source interface data structure. This structure description is essential for parsing. All XML interface descriptions are stored in the directory etc/InterfaceDescriptions within the xBus home directory. Information about its structure are listed in the section XML interface file descriptions.
Indeed this parameter also applies to the destination interface. On that side it is used for serializing the internal DOM tree. This is done by inserting all serializing-relevant information into the internal DOM tree.

The entries for the data transfer type have to be "ByteArrayListMessage" and "Object". Internally the interface content is stored in a DOM tree instead of a string.

All other listed entries are treated just like for all interfacing techniques.

Entries for the Destination Interface

Chapter Section Key Value
System destination interface name Type Object
System destination interface name Message ByteArrayListMessage
System destination interface name Sender the sender class to use
System destination interface name Filename output data file path
System destination interface name ConflictResolution action on already existing file
System destination interface name Encoding string encoding on the source system - only necessary if the system does not report the (correct) encoding
System destination interface name AS400 name of the AS400 machine if it is the destination system
Journal Write destination interface name.Send true or false

Most configuration entries are just like for the source interface - only describing destination features. The only new is the sender key. It specifies which method to use for writing to the destination system. The specified sender must be able to treat byte array l ists. (For information on the different senders, please refer to the chapter Technical Layer.)

The structure information necessary for serializing is incorporated in the internally used DOM tree. Thus, no description file is needed for sending..

Entries for the Routing

Chapter Section Key Value
Router source interface name.function Distributen destination interface name

ByteArrayListMessages. do not return a response. They can only be used with distribute routing. Multiple destinations are possible.

Entries for the XML Parser

Chapter Section Key Value
ParserSettings RecordTypeMessage IgnoringComments true
ParserSettings RecordTypeMessage IgnoringElementContentWhitespace true
ParserSettings RecordTypeMessage XMLValidating false

The parser settings determine how the interface description documents are parsed. The first two parameters have to be "true" because the ByteArrayListMessage parsing function are not capable of treating DOM tree nodes without substantial content, i.e. comment nodes and text nodes with formating whitespace sequences. The last parameter should be set to "false" to avoid checking the interface descriptions again and again. Activating the checks is interesting during developing new interface descriptions in XML. See also Configuration of parser options.

 
 XML Interface File Descriptions

The structure of the interface file is described in XML. The respective file sticks to the data type definition InterfaceSpecSimple.dtd:

 

<?xml version="1.0" encoding="UTF-8"?>

<!ELEMENT InterfaceSpec ( Lines, RecordTypes ) >
<!-- Root element -->
<!ATTLIST InterfaceSpec Name NMTOKEN #REQUIRED >

<!ELEMENT Lines ( RecordType+ ) >
<!-- List of all record types.
<!ATTLIST Lines IdentifierPos NMTOKEN #REQUIRED >
<!-- Position in row. Counting starts at 0. -->
<!ATTLIST Lines IdentifierLength NMTOKEN #REQUIRED >

<!ELEMENT RecordType ( #PCDATA ) >
<!-- Declaration of a record type -->
<!ATTLIST RecordType Identifier CDATA #REQUIRED >
<!-- Specifies the used record type identifier value. -->

<!ELEMENT RecordTypes ( RecordTypeSpec+ ) >
<!-- Structure descriptions of all record types -->

<!ELEMENT RecordTypeSpec ( Field+ ) >
<!-- Structure description for a single record type. -->
<!ATTLIST RecordTypeSpec Name NMTOKEN #REQUIRED >

<!ELEMENT Field EMPTY >
<!-- Specification of a single field -->
<!ATTLIST Field Name NMTOKEN #REQUIRED >
<!ATTLIST Field Length NMTOKEN #REQUIRED >

The root node in the interface description is labeled <InterfaceSpec>. Its name attribute contains the name of the specified interface.

The interface description contains the <Lines> and the <RecordTypes> sections. They explain the record structure in the interface file.

The <Lines> section lists all record types which may be contained in the file. Additionally it states how to find the record type identifiers in the record rows.

The structure of all record types is given in the <RecordTypes> section. Thus for each record type its fields are listed. Field names are arbitrary as long as they are legal XML identifiers.

The XML parser used in the xBus may be configured to check the interface file descriptions against the DTD listed above. This serves mainly debugging purposes. Once the interface descriptions are established, there is no need for checking them again and again. For simplicity the checking option applies to all interface descriptions.

Hints for producing XML structure descriptions are listed in Tips for XML structure descriptions.