Purchase your Section 508 Compliance Support guide now!

Purchase your Section 508 Compliance Support guide now!
Showing posts with label Cognos SDK. Show all posts
Showing posts with label Cognos SDK. Show all posts

five axis jars in the IBM Cognos 8 SDK java lib

http://cognos8help.blogspot.com/2011/02/five-axis-jars-in-ibm-cognos-8-sdk-java.html

five axis jars in the IBM Cognos 8 SDK java lib

There are five axis jars in the IBM Cognos 8 SDK java lib. What are they and when should they be used?
Also, what happens with IBM Cognos 8 SDK if I installed axis 1.4 because I need it for other applications running in the same?

Answer

The IBM Cognos 8 SDK Java samples need Apache axis 1.1

IBM Cognos 8 contains five axis related jars in the /sdk /java/lib directory:

-axis.jar
-axisCognosClient.jar
-axisReportNetClient.jar
-cognos-axis.jar
-cognosClient.jar





As described in the "IBM Cognos 8 SDK Getting Started" documentation, in the section "The IBM Cognos 8 Java Toolkit" :
"an SDK applications needs only two axis jars: axis.jar and axisCognosClient.jar"

1. this axis.jar is not the original Apache axis 1.1 jar, but is a modified version as needed by IBM Cognos 8 SDK.
2. axisCognosClient.jar contains the IBM Cognos 8 SDK API; it calls the axis.jar

If the customer wants to use a higher version of axis for other application running together with IBM Cognos 8 SDK (for example axis 1.4), then a conflict will appear, as IBM Cognos 8 SDK cannot work with axis 1.4, but with axis 1.1.

To avoid this conflict, two other jars are provided in the lib directory:

1. cognos-axis.jar, which is identical to the provided axis.jar, but where all the packages have been modified from org.apache to com.cognos.org.apache

2. cognosClient.jar, identical to axisCognosClient.jar, but which uses com.cognos.org.apache instead of org.apache

Therefore, to use another version of axis, the following changes are needed, so that IBM Cognos SDK continues to use the axis 1.1:
1. In the CLASSPATH, replace axis.jar by the cognos-axis.jar
2. In the CLASSPATH, replace axisCognosClient.jar by cognosClient.jar
3. In the SDK code, add com.cognos. in front of org.apache in all the lines starting with import org.apache.axis.











Example

import com.cognos.org.apache.axis.client.Stub;


In the case when more than the above two axis.jar are used, sometimes the following error appears:

Exception in thread "main" java.lang.ClassCastException: com.cognos.developer.schemas.bibus._3.ContentManagerServiceStub incompatible with org.apache.axis.client.Stub

Note: The reason for having axisReportNetClient.jar is for previous IBM Cognos ReportNet SDK users
who may want to keep the jar file the same name as it is in Cognos ReportNet.
Otherwise axisReportNetClient.jar and axisCognosClient.jar are the same

Cognos Software Development Kit (SDK)

The Cognos Software Development Kit, also known as SDK, is great way to provide automated or customized reports to your clients. A Cognos developer can use several programming languages to interact with the Cognos SDK. For example, you could use the Java platform or even Microsoft's C# (c-sharp). I personally belong to a Microsoft shop so most my discussions will be based around C# examples.

The Cognos SDK states that the Cognos SDK uses a: "...collection of cross-platform Web services, libraries, and programming interfaces provided with the Cognos 8 Software Development Kit (SDK). As a developer, you can use the SDK to create and modify reports and queries, schedule and deploy reports and other objects, and administer Cognos 8 servers and security. You can integrate Cognos 8 with your other applications, regardless of the operating systems, platforms, and programming languages used to create them."

Hopefully, that will give you a quick glimpse into the Cognos SDK. In later posts we will discuss simple Cognos SDK examples and then move onto real world scenarios. Stay tuned for more.

Cognos Software Development Kit (SDK)

The Cognos Software Development Kit, also known as SDK, is great way to provide automated or customized reports to your clients. A Cognos developer can use several programming languages to interact with the Cognos SDK. For example, you could use the Java platform or even Microsoft's C# (c-sharp). I personally belong to a Microsoft shop so most my discussions will be based around C# examples.

The Cognos SDK states that the Cognos SDK uses a: "...collection of cross-platform Web services, libraries, and programming interfaces provided with the Cognos 8 Software Development Kit (SDK). As a developer, you can use the SDK to create and modify reports and queries, schedule and deploy reports and other objects, and administer Cognos 8 servers and security. You can integrate Cognos 8 with your other applications, regardless of the operating systems, platforms, and programming languages used to create them."

Hopefully, that will give you a quick glimpse into the Cognos SDK. In later posts we will discuss simple Cognos SDK examples and then move onto real world scenarios. Stay tuned for more.