DB2 Web Query SDK Arrives

DB2 Web Query Software Development Kit enables developers to integrate DB2 Web Query with other applications.

DB2 Web Query Software Development Kit enables developers to integrate DB2 Web Query with other applications.

Since its introduction a year ago, DB2* Web Query for i has been used in various ways to create a wide array of powerful reports, graphs and dashboards to solve business and reporting needs. During that time, IBM has heard from many i application developers, who expressed the need to integrate their DB2 Web Query reports into their own applications (most notably, Web-based applications) easily and seamlessly. IBM listened, and in this article, I’ll introduce to you 5733-QU4, the DB2 Web Query Software Development Kit (SDK), a new product that enables application developers to seamlessly integrate DB2 Web Query content into other applications. Announced in July, the new product should be available soon.

To run DB2 Web Query reports today, users must interactively use the interfaces provided through a Web browser. This means they must open the browser, enter the URL for the DB2 Web Query launch page, and select reports under the domain and subfolder tree. While this is acceptable for many customers and partners, others have their own Web portals or Web applications and need to expose DB2 Web Query reports, graphs and dashboards to these applications to deliver report content directly to end users. The DB2 Web Query SDK can now fulfill those reporting requirements.

The SDK provides various function calls in the form of Web services. A Web service is a self-contained application that performs certain functions that are based on open standards and are published on the Web. Web services are the foundation for service oriented architecture (SOA)-based application development. The benefits of Web services and SOA are well documented elsewhere, but to summarize, they provide a mechanism to access units of business logic that are platform and programming-language independent, consistent, reusable and easily accessible. You can think of them as Web-accessible APIs. But in the case of the DB2 Web Query SDK, the Web service is available within your network. Any Web application that either runs on IBM i or can access the system—regardless of whether it’s written in C++, C#, Visual Basic .NET or Java*—can invoke these Web services to run reports and deliver content to end users.

SDK Architecture

The SDK fits nicely with existing installs because it leverages and extends the existing DB2 Web Query base component architecture. As I mentioned, without the SDK, users employ a Web browser and an HTTP interface to interact with DB2 Web Query. With the SDK, applications interface with DB2 Web Query using SOAP, a protocol that exchanges information using XML-based messages. The new Web-service functions reside in the servlet container of the IBM i integrated Web application server. SDK requests come in as SOAP messages and are processed by these Web services. For example, when invoked, the WebQueryRunFex Web service function runs the specified report and returns its output in a structure called WebQueryReturn. The report output can then be displayed immediately (e.g., by a Java servlet) or saved to a temporary file and displayed later in the application. This enhanced architecture is shown in Figure 1 (page 46) with the new SDK components framed in red.

The WSDL File

Like other Web services, the DB2 Web Query SDK Web services require the implementation of a WSDL file. The WSDL is an XML document containing everything the application needs to know about the each of the provided Web services, including the function names, the parameters and their attributes, the expected output, and the method for calling each function. It describes all of the information to be exchanged between the Web service consumer and provider and can be used to construct the code that will ultimately invoke the Web service.

Fortunately, the processes of both the WSDL creation and the conversion from the information available in the WSDL to the source code don’t have to be manual tasks. DB2 Web Query provides the capability to create the WSDL by opening a Web browser and specifying the following URL (where “sys_name” is the system name or IP address of the system where 5733-QU2 and 5733-QU4 are installed):


The WSDL file can then be saved and used as input for processes that generate the code to invoke the Web services.

The SDK Web-service functions let developers build applications that deliver DB2 Web Query content.

Gene Cobb is a DB2 for i technology specialist in the IBM i ERP development team.

comments powered by Disqus



2019 Solutions Edition

A Comprehensive Online Buyer's Guide to Solutions, Services and Education.

Are You Multilingual?

Rational enables development in multiplatform environments

IBM Systems Magazine Subscribe Box Read Now Link Subscribe Now Link iPad App Google Play Store
IBMi News Sign Up Today! Past News Letters