xBus

xbus.conf

The xbus.conf is a purely technical file, with global configuration entries:

  • Mapping of Java class names to short names
  • Settings for the XML parser
  • Configuration which transformers to use
Normally it doesn't need to be updated or configured.

 Mapping of Java class names to short names

  • Class_Message_short name=class name

    This section specifies the names of the classes which must be instanced to create the appropriate message modules. The short name is used in standard.conf.

    
    Class_Message_RecordTypeMessage=net.sf.xbus.protocol.records.RecordTypeMessage
  • Class_Sender_short name=class name

    This section specifies the names of the classes which must be instanced to create the appropriate sender modules. The short name is used in standard.conf.

    
    Class_Sender_FileSender=net.sf.xbus.technical.file.FileSender
  • Class_Transformer_short name=class name

    This section specifies the names of the classes which must be instanced to create the appropriate transformer modules. The short name is used in standard.conf and in the declaration of the standard transformers in xbus.conf.

    
    Class_Transformer_CloneTransformer=net.sf.xbus.protocol.CloneTransformer
    
  • Class_Application_Router=class name

    This section specifies the names of the classes which must be instanced to create the appropriate application modules.

    
    Class_Application_Router=net.sf.xbus.application.Router
    

 Settings for the XML parser

Some of the xBus message types include parsing XML documents:

The tables below describe the settings to configure the behavior of the XML parser.


global    required

chapter section key example
ParserSettings Message Type XMLValidating ParserSettings_ByteArrayListMessage_XMLValidating=false
ParserSettings_Default_XMLValidating=false

Set this parameter to true to validate the parsed XML document against its DTD. The name of the DTD must be specified as the DOCTYPE in the XML document. The file containing the DTD itself must be stored in XBUS_HOME/etc/dtd.

Setting this parameter to true will decrease the performance, because validating the XML documents is an additional burden for the XML parser. In productive use you should limitate the usage of validating whenever you can, but for testing it is a powerful feature.


global    optional

chapter section key example
ParserSettings Message Type SchemaValidating System_Example3InFile_XMLSchema=Address.xsd

When you specify the name of a XML Schema with this parameter, the XML message will be validated against this Schema during parsing. The file containing the XML Schema itself must be stored in XBUS_HOME/etc/Schema.

When the name of a XML Schema is included in the XML message, it is ignored.

Setting this parameter will decrease the performance, because validating the XML message is an additional burden for the XML parser. In productive use you should limitate the usage of validating whenever you can, but for testing it is a powerful feature.


global    required

chapter section key example
ParserSettings Message Type IgnoringComments ParserSettings_AS400ProgramMessage_IgnoringComments=true
ParserSettings_Default_IgnoringComments=false

Set this parameter to true to avoid integrating XML comments into the parsed DOM tree.

For RecordTypeMessage the value has to be true because the RecordTypeParser and the RecordTypeSerialiser classes are not capable of treating comment nodes in the DOM tree of an interface description.


global    required

chapter section key example
ParserSettings Message Type IgnoringElementContentWhitespace ParserSettings_RecordTypeMessage_IgnoringElementContentWhitespace
=true
ParserSettings_Default_IgnoringElementContentWhitespace
=false

Set this parameter to true to avoid integrating text nodes with formating information into the parsed DOM tree.

For RecordTypeMessage the value has to be true because the RecordTypeParser and the RecordTypeSerialiser classes are not capable of treating formating whitespace text nodes in the DOM tree of an interface description.


global    optional

chapter section key example
ParserSettings Message Type CheckingActivated ParserSettings_RecordTypeMessage_CheckingActivated=false

Set this parameter to "true" for checking xBus-specific criteria on the parsed XML. Such criteria express properties which cannot be formulated in the DTD.

Currently this parameter and the additional checking are only available for RecordTypeMessage.

The additional checks for RecordTypeMessages are listed in the description for configuring a record type transformation. The value should be "false" for RecordTypeMessage. Otherwise the interface descriptions would be checked on each data transfer. During developing new interface descriptions, setting the parameter to "true" is useful for debugging.

 Configuration which transformers to use

The parameters from this section configure the transformation of one data structure into another before sending it to a destination system or after receiving a response.

Note that all parameters for the transformation have the configurable "Section" and "Key" in their keywords:

  • for some parameters we use receive message (message received from the source system) as "Section" and send message (message that must be send to the destination system) as "Key"
  • for others, we use the logical names from the source and destination systems accordingly.

global    required

chapter section key example
Transformer receive message send message Transformer_SimpleTextMessage_SimpleTextMessage=SimpleTextCloneTransformer

To create the appropriate Transformer object which is needed to transform the received data (receive message) into the format needed for sending it to the destination (send message), the class name will be read from the xbus.conf. All used short names for the Transformer classes must be defined in the xBus configuration.

This parameter specifies the short name of the suitable transformer for transformation receive message into send message. Although it is global, all implemented variants of the transformation must be listed in the configuration file.

The table bellow help you to determine which transformers are implemented against specific messages. It is also helpful when you configure Routing definitions between two systems.

This parameter declares the default transformer for each pair of message types. If desired this may be overwritten for the concrete interface pair.

receive message send message requested Transformer
Arbitrary Message except RecordTypeMessage and XMLMessageImplementation Same Message CloneTransformer
Arbitrary Message except SimpleObjectMessage XBUSXMLMessage XMLWrapperTransformer
ByteArrayListMessage SimpleObjectMessage ByteArrayList2StreamTransformer
RecordTypeMessage RecordTypeMessage RecordTypeTransformer *
RecordTypeMessage SimpleObjectMessage ByteArrayList2StreamTransformer
RecordTypeMessage SimpleTextMessage XMLSerializerTransformer
RecordTypeMessage SOAPMessage XSLTTransformer *
RecordTypeMessage XMLMessageImplementation XSLTTransformer *
SimpleObjectMessage ByteArrayListMessage Stream2ByteArrayListTransformer
SimpleObjectMessage RecordTypeMessage Stream2ByteArrayListTransformer
SimpleObjectMessage XBUSXMLMessage Stream2TextTransformer
SimpleTextMessage SOAPMessage XMLParserTransformer
SimpleTextMessage XMLMessageImplementation XMLParserTransformer
SOAPMessage RecordTypeMessage XSLTTransformer *
SOAPMessage SimpleTextMessage XMLSerializerTransformer
SOAPMessage XMLMessageImplementation XSLTTransformer *
XBUSXMLMessage Arbitrary Message except SimpleObjectMessage XMLUnwrapperTransformer
XBUSXMLMessage SimpleObjectMessage Text2StreamTransformer
XMLMessageImplementation RecordTypeMessage XSLTTransformer *
XMLMessageImplementation SimpleTextMessage XMLSerializerTransformer
XMLMessageImplementation SOAPMessage XSLTTransformer *
XMLMessageImplementation XMLMessageImplementation XSLTTransformer *

* - the XSLTStylesheet parameter is necessary for these transformer to specify the concrete transformation. Cf. the respective description

Note again that all entries from the above table should be in your configuration file as well. If they are missing, please insert them (without changes or reconfigurations).