xBus

Technical Layer

The technical layer is responsible for communication with the neighbor systems. This comprises modules for receiving and sending data.

The next sections cope with the different data sources. For each technical protocol the available receiver and sender modules are described. A table indicates whether the modules:

A PDF-file is available as a reference, which technical modules can be used with which message modules.

 File

The File modules treat all interfaces to neighbor systems which are available as files on local or mounted file systems.

All FileXXXReceivers are available in two flavours:

FileReceiver(Thread)
The FileReceiver reads the content of files into a string.

FileSender
The FileSender writes a string to a file.

FileLineReaderReceiver(Thread)
The FileLineReaderReceiver opens a Reader object for the input file and sends a reference to it through the xBus. This is useful for transferring large documents and be able to change the encoding.

FileLineWriterSender
The FileLineWriterSender receives a Reader object and copies its data record by record (line by line) to the destination file. It is able to change the character encoding if necessary.

FileStreamReceiver(Thread)
The FileStreamReceiver opens an InputStream object for the input file and sends a reference to it through the xBus. This is useful for transferring large documents without changes of the encoding.

FileStreamSender
The FileStreamSender receives an InputStream object and copies its data byte by byte to the destination file. It is not able to change the character encoding.

FileByteArrayListReceiver(Thread)
The FileByteArrayListReceiver behaves pretty much like the FileReceiver, but it reads the data into a list of byte arrays instead of a string. For more details see the ByteArrayListMessage.

FileByteArrayListSender
The FileByteArrayListSender behaves pretty much like the FileSender, but it stores the data into lists of byte array instead of strings. For more details see the ByteArrayListMessage.

All File modules implement a transaction logic by writing temporary files and special actions during commit or rollback.

System Type Transaction Response Starting
FileReceiver Text yes no shell script
FileReceiverThread Text yes no background service, servlet engine
FileSender Text yes no -
FileLineReaderReceiver Object yes no shell script
FileLineReaderReceiverThread Object yes no background service, servlet engine
FileLineWriterSender Object yes no -
FileStreamReceiver Object yes no shell script
FileStreamReceiverThread Object yes no background service, servlet engine
FileStreamSender Object yes no -
FileByteArrayListReceiver Object yes no shell script
FileByteArrayListReceiverThread Object yes no background service, servlet engine
FileByteArrayListSender Object yes no -

 HTTP(S)

HTTP is the abbreviation for hypertext transfer protocol. It is a standard protocol for sending data through the internet. While with HTTP all data is sent as clear text, using HTTPS the data is encrypted. All HTTPxxxReceivers and HTTPxxxSenders support both protocols.

HTTPReceiver
The HTTPReceiver receives a request via a HTTP connection. It is implemented as a Java-Servlet. This means, a servlet-engine like Tomcat is needed for running the HTTPReveiver.

HTTPSender
The HTTPSender sends a message via HTTP to an URL.

HTTPStreamReceiver
The HTTPStreamReceiver opens an InputStream object for the request received via a HTTP connection and sends a reference to it through the xBus. This is useful for transferring large documents without changes of the encoding.

HTTPStreamSender
The HTTPStreamSender receives an InputStream object and copies its data byte by byte to the destination URL. It is not able to change the character encoding.

HTTPParameterReceiver
The HTTPStreamReceiver reads the request data out of the parameters of the URL. They are transformed into a XML document (described here) for further processing. The response of the processing must be an arbitrary XML document (or null), which will be given back to the caller.

HTTPParameterSender
The HTTPStreamSender gets a XML document (described here) and transforms the data into the parameters of an URL, where it will be sent to. The response must be an arbitrary XML document (or null).

HTTPByteArrayListSender
The HTTPByteArrayListSender converts a ByteArrayList into a String and sends it to the destination URL.


System Type Transaction Response Starting
HTTPReceiver Text no yes servlet engine
HTTPSender Text no yes -
HTTPStreamReceiver Object no no servlet engine
HTTPParameterSender Object no yes -
HTTPParameterReceiver Object no yes servlet engine
HTTPStreamSender Object no no -
HTTPByteArrayListSender Object no no -

 FTP

FTP is the abbreviation for file transfer protocol. It is a standard protocol to access files through an IP connection.

FTPReceiver
The FTPReceiver receives a request by reading a file from a FTP server.

FTPSender
The FTPSender sends a message by writing it into a file on a FTP server.

Both modules implement a transaction logic by writing temporary files and special actions during commit or rollback.

System Type Transaction Response Starting
FTPReceiver Text yes no shell script
FTPSender Text yes no -

 Message Queue

All message queues servers which implement Java's JMS 1.0.2 API can be accessed by the xBus.

MQReceiverThread
The MQReceiver receives messages from message queues.

MQSender
The MQSender sends a message to a message queue.


System Type Transaction Response Starting
MQReceiverThread Text yes no background service, servlet engine
MQSender Text yes no -


 Database

All databases with an existing JDBC driver can be accessed by the xBus.

DatabaseSender
The DatabaseSender sends SQL statements to a database connection and returns the result. Request and response are XML messages, with a special format described here.


System Type Transaction Response Starting
DatabaseSender Object yes yes -


 LDAP

Directory information can be retrieved from LDAP servers.

LDAPSender
The LDAPSender sends queries to a LDAP server and returns the result. Currently search queries with attributes or filters as specified in RFC 2254 are possible. Request and response are XML messages, with a special format described here.


System Type Transaction Response Starting
LDAPSender Object no yes -


 Java

JavaReceiver
The JavaReceiver can be used to send a message to the xBus by calling it directly from another java application.

The class
net.sf.xbus.bootstrap.JavaReceiverBootstrap
provides the method
public Object receive(String system, Object request) throws XException

Calling this method by a Java application will process the given request for the given system and return the result according to the configuration of the xBus.

JavaSender
The JavaSender sends data by calling a method of a class. Both class and method are read out of the configuration. The method must have this signature:
  • public Object methodname(Object callData)

PingSender
The PingSender is not a real sender. It responds exactly the data of the request. This can be used to integrate it in the routing chain to achieve only a transformation or for testing purposes.


System Type Transaction Response Starting
JavaReceiver Object no yes java application
JavaSender Object no yes -
PingSender Object no yes -


 Email

Another way of receiving and sending messages is via email.

POP3Receiver(Thread)
POP3 is the standard protocol for receiving emails. The POP3Receiver reads the first message from the INBOX of a configured POP3 account. The POP3ReceiverThread continuously waits for messages and processes them.

After successful processing, the message is deleted on the server.

POP3XMLReceiver(Thread)
While the POP3Receiver(Thread) retrieves only the body of the message, the POP3XMLReceiver(Thread) delivers more information like the sender or the subject of the message by packing all data into a XML document (described here).

SMTPSender
SMTP is the standard protocol for sending emails. The SMTPSender sends out a message to email addresses. To do this, a SMTP server must be available.


System Type Transaction Response Starting
POP3Receiver Text yes no shell script
POP3ReceiverThread Text yes no background service, servlet engine
POP3XMLReceiver XML yes no shell script
POP3XMLReceiverThread XML yes no background service, servlet engine
SMTPSender Text no no -


 Socket

TCP/IP sockets are a very rudimentary way for sending messages.

SocketSender
Sending messages via a TCP/IP socket.


System Type Transaction Response Starting
SocketSender Text no no -


 AS/400

The AS/400 is a hardware platform of IBM, nowadays also called iSeries. There are two ways of accessing an AS/400 by the xBus:

  • Reading and writing files in the QSYS.LIB file system. Each file in this file system has a description that describes the file characteristics and how the data associated with the file is organized into records, and, in many cases, the fields in the records.
  • Calling RPG programs.
The xBus accesses these resources remotely via a TCP/IP connection. How the connection to the AS/400 is build up and which requirements must be fulfilled is explained here.

AS400FileReceiver
The AS400FileReceiver reads the content of files on the AS/400 into strings.

AS400FileSender
The AS400FileSender writes a string to a file on the AS/400.

AS400LineReaderReceiver
The AS400LineReaderReceiver opens a Reader object for the input file and sends a reference to it through the xBus. This is useful for transferring large documents and be able to change the encoding.

AS400ByteArrayListReceiver
The AS400ByteArrayListReceiver behaves pretty much like the AS400FileReceiver, but it reads the data into lists of byte array instead of strings. For more details see the ByteArrayListMessage.

AS400ByteArrayListSender
The AS400ByteArrayListSender writes a byte array list to a file on the AS/400. For more details see the ByteArrayListMessage.

AS400ProgramSender
The AS400ProgramSender calls a program on the AS/400. The input parameters for the program are converted from a special XML format and the output parameters will also be converted back into a special XML format. For more information see Calling programs on the AS/400.

All AS400xxxReceiver modules implement a transaction logic with special actions during commit.

System Type Transaction Response Starting
AS400FileReceiver Text yes no shell script
AS400FileSender Text no no -
AS400LineReaderReceiver Object yes no shell script
AS400ByteArrayListReceiver Object yes no shell script
AS400ByteArrayListSender Object no no -
AS400ProgramSender Object no yes -