Business Objects XI SDK Example, Part 1
The following example walks through a simple use of the Java SDK for XI. It explains in a step-by-step manner how the Business Objects SDK can be used in conjunction with some complementary technologies - a python script.
To illustrate SDK usage we will build a utility script that emails the contents of a Web Intelligence data source as a csv or tab delimited output.
Why base the output on the BO data source?
Because of the nature of reports being intended for human readability, various elements are included in a report that would be undesirable for system to system communication. For example, reports typically have logo files, report dates, etc. When converting a report to csv these "human intended" elements can cause problems.
We want clean, tabular output.
A quick way of learning a new API is to take supplied example code and modify.
So for this example, we will take the examples included with the Buiness Objects SDK as a starting point.
The functionality will be exposed as a call to a java web application (WAR), and will thus be easily deployable.
The primary components of the example this little system are:
1. Web application (.war file) - contains SDK code
2. Python script (report-mailer.py) - talks to the web app
3. Configuration file - text file that stores configuration information, one file per report emailed
This example is intended for a non-packaged report with a single data source (query). Based on the configured document identifier (docIdentifier in the config file), it will pull the data source from the latest instance and email the contents as requested in the configuration file.
With a little modification of the python script, we could supply output in a number of different formats. We could write to the local file system in an ftp accessible directory (available for "pull" by other systems). We could "push" the data to another server via FTP, SFTP, SCP, etc.
The war is deployed into a java application server (e.g. Tomcat). This can be the same server or a different one than the one running BO.
The example code supplied by Busness Objects is packaged with jars such that they can run standalone (from a BOXI server).
Continued in Business Objects XI SDK Example, Part 2