Quantcast
Channel: SCN : Document List - Java SDK Application Development
Viewing all 39 articles
Browse latest View live

SAP BUSINESSOBJECTS BI 4.X - DEVELOPER SDK LIBRARY

$
0
0

Download and view developer guides, API reference material, sample code, and object model diagrams for Java, .NET, COM, and Flex APIs available in SAP BusinessObjects BI 4.x. Visit the samples page to access the sample applications, reports, and dashboards. For version 3.x and earlier of the SDK library, visit the SAP BusinessObjects BI 3.x Developer SDK Library page.

 

Note:

1. To view the developer guides, save and uncompress the entire .zip file to your local drive and then open it.

    Otherwise, if you open the zip files directly from the browser, you may see "The Address is not Valid" error.

2. If you are opening a .chm file, clear the Always ask before opening this file check box in the Open File dialog box.

 

Java SDK Developer Guides And API References

View developer guides below that contain key concepts and tasks with supporting sample code snippets. In each guide, go to the Start Here > What's New sections to learn about new features in the SDK. Also view and download API references that contain syntax, information, and examples for the classes, interfaces, and members of each SDK.

 

To view online Javadocs for our Java SDKs, visit: http://help.sap.com/javadocs.

Solution
Java SDKsGuideReference
SAP BusinessObjects Business Intelligence platform 4.0 (BI document access and administration)Business Intelligence platform Java SDKDeveloper Guide

API Reference(Javadocs)

SAP BusinessObjects Business Intelligence platform 4.0 (BI document access and administration)Web Services Consumer Java SDKDeveloper Guide

API Reference(Javadocs)

SAP BusinessObjects Business Intelligence platform 4.0 (semantic layer)Data Access Driver Java SDKDeveloper Guide

API Reference(Javadocs)

SAP BusinessObjects Business Intelligence platform 4.0 (semantic layer)

 

NOTE: The Semantic Layer SDK is now offering the functionality of the Connection SDK. Connection SDK documentation has been removed

Data Access Connection Java SDKDeveloper Guide

API Reference (Javadocs)

SAP BusinessObjects Business Intelligence platform 4.0 (semantic layer)Semantic Layer Java SDKDeveloper Guide

API Reference(Javadocs)

SAP BusinessObjects Web IntelligenceReport Engine Java SDK-

API Reference(Javadocs)

SAP BusinessObjects Web IntelligenceCustom Data Source Framework Java SDKDeveloper Guide

API Reference(Javadocs)

SAP Crystal Reports 2011Report Application Server Java SDKDeveloper Guide

API Reference(Javadocs)

SAP Crystal Reports 2011Viewers Java SDKDeveloper Guide

API Reference(Javadocs)

 

.NET SDK Developer Guides And API References

View developer guides below that contain key concepts and tasks with supporting sample code snippets. In each guide, go to the Start Here > What's New sections to learn about new features in the SDK.

 

Also view and download API references that contain syntax, information, and examples for the classes, interfaces, and members of each SDK.

Solution.NET SDKsGuideReference
SAP BusinessObjects BI Platform 4.0 Support Pack 2SAP BusinessObjects BI Platform .NET SDK.NET Runtime Deployment GuideAPI Reference
SAP BusinessObjects Business Intelligence platform 4.0SAP BusinessObjects Web Services SDKDeveloper Guide
SAP Crystal Reports for Visual Studio 2010Crystal Reports .NET SDK

Developer Guide

Installation Guide

API Reference
SAP Crystal Reports for Visual Studio 2010Report Application Server .NET SDKDeveloper GuideAPI Reference

 

COM SDK Developer Guides and API References

SolutionCOM SDKsGuideReference
SAP BusinessObjects 4.0 Universe design toolUniverse design tool SDKObject Model DiagramsAPI Reference

 

RESTful Web Services SDK Developer Guides and API References

SolutionSDKGuide or Reference
SAP Business Objects BI Platform 4.0 Support Pack 5BI PlatformDeveloper Guide
SAP Business Objects BI Platform 4.0 Feature Pack 3Crystal ReportsDeveloper Guide
SAP Business Objects BI Platform 4.0 Support Pack 5Web IntelligenceDeveloper Guide

 

Additional Guides And Resources

SolutionTitleTechnology
SAP BusinessObjects Business Intelligence platform 4.0Web Services Administrator’s GuideJava Web Services provider
SAP BusinessObjects Business Intelligence platform 4.0Viewing Documents Using OpenDocumentURL Parameters
SAP BusinessObjects Business Intelligence platform 4.0

Viewing Crystal Reports Using URL Reporting(legacy)

URL Parameters

BusinessObjects Enterprise Web Services SDK Java Crystal Report Viewer_Code Sample

$
0
0

Sample application that creates an HTML viewer (the CrystalReportViewer) for Crystal Reports documents using the BusinessObjects Java Consumers Web Services SDK.

View this Code Sample

Base Scripting Template for Crystal Reports

$
0
0

When using SAP BusinessObjects Enterprise, there are times where it is useful to perform an action on all objects of a particular type.  For example, if you want to delete all instances of a report, or you want to remap the universes for all webi reports.  For these types of tasks, a script can be very useful and significantly faster than making the changes manually.

 

The code below can be used as a template for looping through all crystal reports on an enterprise system and opening them using RAS to perform some kind of modification.  This code will work on a BOE XI 3.1 and a BI4 system.

 

Code Sample

<%@ page import = "com.crystaldecisions.sdk.exception.SDKException,
com.crystaldecisions.sdk.framework.*,
com.crystaldecisions.sdk.occa.infostore.*,
com.crystaldecisions.sdk.occa.report.*,
com.crystaldecisions.sdk.properties.*,
com.crystaldecisions.sdk.occa.report.application.*,
com.crystaldecisions.sdk.occa.managedreports.*,
com.crystaldecisions.sdk.occa.report.data.*,
java.util.*"
%>
<%
// User Credentials
String username = "Administrator";
String password = "myPassword";
String cmsname  = "myEnterpriseServer";
String authType = "secEnterprise";

IEnterpriseSession enterpriseSession = null;
IInfoStore infoStore;
IInfoObjects boInfoObjects;

// Log onto Enterprise
enterpriseSession = CrystalEnterprise.getSessionMgr().logon(username, password, cmsname, authType);
infoStore = (IInfoStore)enterpriseSession.getService("", "InfoStore");

// The SI_ID to start at when searching
int max_id = 0;

// Obtain the necessary RAS factory for opening reports.
IReportAppFactory reportAppFactory=(IReportAppFactory) enterpriseSession.getService("","RASReportService");

for(;;) {

// Loop through all objects
boInfoObjects = (IInfoObjects)infoStore.query("Select * FROM CI_INFOOBJECTS WHERE SI_KIND='CrystalReport' AND SI_ID > " + max_id + " ORDER BY SI_ID ASC");

// If there are no more objects then we're done.
if(boInfoObjects.size() == 0)
break;

for(Iterator boCount = boInfoObjects.iterator() ; boCount.hasNext() ; ) {
  IInfoObject boReport = (IInfoObject)boCount.next();
 
  // Open the report with RAS
  ReportClientDocument rcDocument=reportAppFactory.openDocument(boReport.getID(),0,Locale.ENGLISH); 

  // Here is where you would do all the needed work / modifications
  rcDocument.save();  // If you made any changes that need to be saved you would include this line.
  rcDocument.close();
  max_id = boObject.getID();
}
infoStore.commit(boInfoObjects);
}
out.println("Completed</br>");

%>

Base Scripting Template for InfoObjects

$
0
0

When using SAP BusinessObjects Enterprise, there are times where it is useful to perform an action on all objects of a particular type.  For example, if you want to delete all instances of a report, or you want to remap the universes for all webi reports.  For these types of tasks, a script can be very useful and significantly faster than making the changes manually.

 

The code below can be used as a template for looping through all infoobjects an enterprise system and opening them to perform some kind of modification.  This code will work on a BOE XI 3.1 and a BI4 system.

 

Code Sample

<%@ page import = "com.crystaldecisions.sdk.exception.SDKException,
com.crystaldecisions.sdk.framework.*,
com.crystaldecisions.sdk.occa.infostore.*,
com.crystaldecisions.sdk.occa.report.*,
com.crystaldecisions.sdk.properties.*,
java.util.*"
%>
<%
// User Credentials
String username = "Administrator";
String password = "myPassword";
String cmsname  = "myEnterpriseServer";
String authType = "secEnterprise";

IEnterpriseSession enterpriseSession = null;
IInfoStore infoStore;
IInfoObjects boInfoObjects;

// Log onto Enterprise
enterpriseSession = CrystalEnterprise.getSessionMgr().logon(username, password, cmsname, authType);
infoStore = (IInfoStore)enterpriseSession.getService("", "InfoStore");

// The SI_ID to start at when searching
int max_id = 0;

for(;;) {

// Loop through all objects
boInfoObjects = (IInfoObjects)infoStore.query("Select * FROM CI_INFOOBJECTS WHERE SI_ID > " + max_id + " ORDER BY SI_ID ASC");

// If there are no more objects then we're done.
if(boInfoObjects.size() == 0)
break;

for(Iterator boCount = boInfoObjects.iterator() ; boCount.hasNext() ; ) {
  IInfoObject boObject = (IInfoObject)boCount.next();

  // Here is where you would do all the needed work / modifications
  out.println("The objects is titled " + boObject.getTitle());

  max_id = boObject.getID();
}
infoStore.commit(boInfoObjects);
}
out.println("Completed</br>");

%>

SAP BusinessObjects BI 3.x and Lower - Developer SDK Library

$
0
0
Download and view developer guides, API reference material, sample code, and object model diagrams for Java, .NET, COM, and Flex APIs available in BusinessObjects Enterprise XI 3.1, Crystal Reports 2008, and SAP Dashboard Design (Xcelsius Engage) 2008. For version 4.x and later of the SDK library, visit the SAP BusinessObjects BI 4.x Developer SDK Library.

 

NOTE:

 

  1. To view the developer guides, save and uncompress the entire .zip file to your local drive and then open it. Otherwise, if you open the zip files directly
    from the browser, you may see "The Address is not Valid" error.
  2. If you are opening a .chm file, clear the Always ask before opening this file check box in the Open File dialog box.
  3. If you are saving a .chm file, right-click the file on your desktop, click Properties, and select Unblock. Next, ensure that the Read Only check box is cleared.

 

Getting Started

  • Choose Your SDK - Want to learn more about which BusinessObjects SDK suits your application development needs? View our SDK overview diagram, read Choosing the right SDK for the right task, and consult the SDK - Quick Reference Guide.
  • What's New - To see a summary of new features in each SDK, download the developer guides and view the Start Here > What's New sections.
  • Earlier SDK Library Versions - Visit the SAP Help Portal and click the Business Objects tab to access all product documentation for past and current releases, including user, administration, and developer help. Direct links to XI and XI Release 2 developer content can be found on this page.

Java SDK Developer Guides and API References

 

View developer guides below that contain key concepts and tasks with supporting sample code snippets. In each guide, go to the Start Here > What's New sections to learn about new features in the SDK. Also view and download API references that contain syntax, information, and examples for the classes, interfaces, and members of each SDK. For more information about the SDKs, consult the SDK - Quick Reference Guide.

Solution

Java SDKs

Guide

Reference

BusinessObjects Enterprise, BusinessObjects Edge, Crystal Reports Server

Software Development KitsQuick Reference Guide-
BusinessObjects Enterprise (Administration)BusinessObjects Enterprise Java SDK

DeveloperGuide

API

reference

JavaDocs

BusinessObjects Enterprise (Administration)BusinessObjects JSF Components

DeveloperGuide

API

reference

JavaDocs

SAP Crystal ReportsReport Application Server Java SDK

DeveloperGuide

API

reference

Java Docs

SAP Crystal Reports

Viewers Java SDK

DeveloperGuide

API

reference

Java Docs

Web IntelligenceReport Engine Java SDK

DeveloperGuide

API reference
Web Services ConsumerWeb Services Java Consumer SDK

DeveloperGuide

API

reference

Crystal ReportsCrystal Reports for Eclipse 2.0

DeveloperGuide

API

reference

Java Docs

BusinessObjects Enterprise XI 3.1 (Administration)Data Access Driver SDK Developer GuideDeveloper GuideAPI reference
Custom Data Source FrameworkCustom Data Source FrameworkDeveloper GuideAPI reference

.NET SDK Developer Guides and API References

 

Solution.NET SDKsGuideReference

BusinessObjects Enterprise, BusinessObjects Edge,

Crystal Reports Server

Software Development KitsQuick Reference Guide-
BusinessObjects Enterprise (Administration)BusinessObjects Enterprise .NET SDK

DeveloperGuide

API

reference

Crystal ReportsCrystal Reports .NET SDK

DeveloperGuide

API

reference

Crystal ReportsReport Application Server .NET SDK

DeveloperGuide

API

reference

Web IntelligenceReport Engine .NET SDK

DeveloperGuide

API

reference

Web Services ConsumerWeb Services .NET Consumer SDK

DeveloperGuide

API

reference


COM SDK Developer Guides and API References

 

SolutionCOM SDKsGuideReference
Desktop IntelligenceDesktop Intelligence COM SDK

DeveloperGuide

APIreference

Universe DesignerUniverse Designer COM SDK-API reference

SAP Dashboard Design (Xcelsius) SDK Resources

 

Download the  Component SDK SP3 and accompanying documentation   (link to SDK page)

 

Additional Guides and Resources

 

SolutionTitleTechnology
openDocument / Crystal Reports URL Reporting

Viewing Report and

Documents Using URLs

URL Parameters
Crystal Reports

Visual Studio Integration

Manager

.NET
BusinessObjects Enterprise (Administration)

BusinessObjects Enterprise

.NET Runtime Deployment

.NET
Web Services Consumer

Web Services

Administrator's Guide

Java/.NET
Business Process Services

Business Process BI

Services Guide

Web Services

Sample Application Code

 

Visit the SAP BusinessObjects Code and Samples page and download sample code projects to run in your BusinessObjects XI 3.1 and Crystal Reports 2008 development environments.
Solution or TopicTitle
BusinessObjects Enterprise, BusinessObjects Edge, and Crystal Reports Server

BusinessObjects Enterprise Java SDK

Sample Code

Crystal Reports

Report Application Server Java SDK Sample

Code

Crystal Reports

Viewers Java SDK Sample Code

Web Intelligence

Report Engine Java SDK Sample Code

Web Services

Web Services Java SDK Sample Code

Data Access

Data Access Driver Java Sample Code

BusinessObjects Enterprise, BusinessObjects Edge,

and Crystal Reports Server

BusinessObjects Enterprise .NET SDK

Sample Code

Crystal Reports

Crystal Reports .NET SDK Sample Code

Crystal Reports

Report Application Server .NET SDK Sample

Code

Web Services

Web Services .NET SDK Sample Code


Object Model Diagrams

 

Provides a visual representation of the classes, methods, and properties of the SDK.
 
SolutionTitle
BusinessObjects Enterprise (Administration)

BusinessObjects Enterprise JavaObject Model Diagram

Crystal Reports

Report Application Server JavaObject Model Diagram

Crystal Reports

Viewers Java Object ModelDiagrams

Web Intelligence

Report Engine Java Object ModelDiagram

Web Services Consumer

Web Services Java ConsumerObject Model Diagram

Crystal Reports

Crystal Reports .NET Object ModelDiagrams

Crystal Reports

Report Application Server .NETObject Model Diagram

Web Services Consumer

Web Services .NET ConsumerObject Model Diagram

Desktop Intelligence

Desktop Intelligence COM ObjectModel Diagram

Universe Designer

Universe Designer COM ObjectModel Diagram

Custom Data Source FrameworkCustom Data Source Framework Object Model Diagram


Previous Versions

 

Visit the SAP Help Portal and click the Business Objects tab to access all product documentation for past and current releases, including user, administration, and developer help. Looking for XI and XI R2 developer documentation?  Use the SAP Help Portal, or the quick links provided below.

Base Scripting Template for Webi Reports

$
0
0

When using SAP BusinessObjects Enterprise, there are times where it is useful to perform an action on all objects of a particular type.  For example, if you want to delete all instances of a report, or you want to remap the universes for all webi reports.  For these types of tasks, a script can be very useful and significantly faster than making the changes manually.

 

The code below can be used as a template for looping through all webi reports on an enterprise system and opening them to perform some kind of modification.  This code will only work on a BOE XI 3.1 system.

 

 

Code Sample

<%@ page import = "com.crystaldecisions.sdk.exception.SDKException,
com.crystaldecisions.sdk.framework.*,
com.crystaldecisions.sdk.occa.infostore.*,
com.crystaldecisions.sdk.occa.report.*,
com.crystaldecisions.sdk.properties.*,
com.businessobjects.rebean.wi.*,
java.util.*"
%>
<%
// User Credentials
String username = "Administrator";
String password = "myPassword";
String cmsname  = "myEnterpriseServer";
String authType = "secEnterprise";

IEnterpriseSession enterpriseSession = null;
IInfoStore infoStore;
IInfoObjects boInfoObjects;

// Log onto Enterprise
enterpriseSession = CrystalEnterprise.getSessionMgr().logon(username, password, cmsname, authType);
infoStore = (IInfoStore)enterpriseSession.getService("", "InfoStore");

// The SI_ID to start at when searching
int max_id = 0;

for(;;) {

// Loop through all objects
boInfoObjects = (IInfoObjects)infoStore.query("Select * FROM CI_INFOOBJECTS WHERE SI_KIND='Webi' AND SI_ID > " + max_id + " ORDER BY SI_ID ASC");

// If there are no more objects then we're done.
if(boInfoObjects.size() == 0)
break;

for(Iterator boCount = boInfoObjects.iterator() ; boCount.hasNext() ; ) {
  IInfoObject boReport = (IInfoObject)boCount.next();

  ReportEngines boReportEngines = (ReportEngines) boEnterpriseSession.getService("ReportEngines");
  ReportEngine boReportEngine = (ReportEngine) boReportEngines.getService(ReportEngines.ReportEngineType.WI_REPORT_ENGINE);
  DocumentInstance boDocumentInstance = boReportEngine.openDocument(boReport.getID());

  // Here is where you would do all the needed work / modifications
 
  boDocumentInstance.save(); // If you made any changes that need to be saved you would include this line.
  boDocumentInstance.closeDocument();

  max_id = boObject.getID();
}
infoStore.commit(boInfoObjects);
}
out.println("Completed</br>");

%>

Developing and deploying a custom Java probe in BI Platform 4.0: Tutorial & Sample

$
0
0
In this SCN document I'll demonstrate how to develop your own custom Java probe and successfully register it with your SAP Business Intelligence Platform 4.0.  Included in this tutorial is a basic sample which you can use as a starting point for your own custom probe development.  The sample in this tutorial takes as input parameters a host name and port number of a web server.  Upon execution the probe will attempt to make a socket connection to the host on the specific port and if successful the probe will return a success (in the language of BI4 watches, this is represented as a value of 1).  If the socket connection fails, the probe will return a failure (a value of 0).

 

 

Considerations before you get started

 

 

  • For large productive landscapes it's recommended that you upgrade your BI Platform to SP4 Patch 12, SP6 Patch 1, or SP7.  Several corrections were made to improve stability and performance of the Monitoring Service (Adaptive Processing Server).  See note 1833881.
  • Create a dedicated Adaptive Processing Server to run your Monitoring Services.  Best practice is to run no more than two dedicated Monitoring Services (two APS instances) as they work in a Active/Passive cluster.  For details on creating a dedicated Adaptive Processing Server, refer to Best Practices for SAPBO BI 4.0 Adaptive Processing Servers
  • If you plan to keep historical details about the success or failure of your custom probe, you will need to enable the trending database.  For details, see the BI Platform 4.0 Administrator's Guide.

 

 

Health Probe, Diagnostic Probe, or Hybrid Probe

 


It is important to understand the different types of probes that can be created as they each have different requirements and serve a slightly different function.  Additionally, when you are ready to register your probe with BI Platform 4.0, you will need to define the type of probe so that the monitoring service will understand how to execute the probe.

 

  • A health probe generates metrics of data types such as integer, Boolean, or string.  An example of a health probe is the default CMS Logon/Logoff probe which checks that a user may successfully logon/logoff the Central Management Server. 
  • A diagnostic probe generates reports containing current system information.  An example of a diagnostic probes is the default Stop/Start server probe. This probe checks all the servers, records the state of each server, restarts the servers and collects information about servers again.
  • A hybrid probe functions as both a health probe and a diagnostic probe

 

The Web Server probe example in this tutorial will be defined as a health probe since it is not collecting any specific information.  Instead it is checking the availability of a Web Server listening port and returning success or failure.  In the included sample code, all the interfaces you will need to create a diagnostic or hybrid code is already imported (even though they are not all used).

 

 

Source code walk-through

 

 

In this section, I will break each piece of this example program into logical chunks and describe it's purpose.  You can download the complete source file which is attached to this document.  For reference purposes, download the BI Platform 4.0 Java API (Java Docs).

 

 

Step #1 -  Define your Java class as belonging to the package com.businessobjects.monitoring.probe.  Later, we will add our compiled class file to the existing package of BI 4.0 probes.

 

 

package com.businessobjects.monitoring.probe;

 

 

Step #2 -  Import the required SDK libraries for a BI 4.0 probe (and also the classes needed to test the Web Server port availability)

 

 

import java.util.Locale;
import java.util.Map;
import java.net.Socket;

import com.businessobjects.sdk.monitoring.plugin.desktop.probe.IProbeInfoObject;
import com.businessobjects.sdk.monitoring.probe.AbstractProbe;
import com.businessobjects.sdk.monitoring.probe.DiagnosticProbeResult;
import com.businessobjects.sdk.monitoring.probe.HealthProbeResult;
import com.businessobjects.sdk.monitoring.probe.IDiagnosticProbe;
import com.businessobjects.sdk.monitoring.probe.IDiagnosticProbeResult;
import com.businessobjects.sdk.monitoring.probe.IHealthProbe;
import com.businessobjects.sdk.monitoring.probe.IHealthProbeResult;
import com.businessobjects.sdk.monitoring.probe.common.ProbeLocHandler;
import com.businessobjects.sdk.monitoring.probe.common.ProbeLocKeys;
import com.crystaldecisions.sdk.exception.SDKException;
import com.crystaldecisions.sdk.exception.ServerExceptionCode;
import com.crystaldecisions.sdk.framework.IEnterpriseSession;
import com.crystaldecisions.sdk.occa.infostore.IInfoObjects;
import com.crystaldecisions.sdk.occa.infostore.IInfoStore;
import com.crystaldecisions.sdk.occa.infostore.internal.InfoStoreFactory;
import com.crystaldecisions.sdk.occa.security.internal.ISecuritySession;

 

 

Step #3 -  Your class must be a subclass of AbstractProbe and it must also implement the IHealthProbe interface so that it will inherit the required methods and objects needed for a probe

 

 

public class probeHTTP extends AbstractProbe implements IHealthProbe

{

 

 

Step #4 -  Initialize a new IProbeInfoObject and invoke the constructors of IProbeInfoObject.  You will need this object to get access to the input parameters later.

 

 

public IProbeInfoObject probeObject = null;

public probeHTTP(IProbeInfoObject probeInfoObject)
{
    super(probeInfoObject);
    probeObject = probeInfoObject;
}

 

Step #5 -  You must create an executeHealthProbe method which returns IHealthProbeResult for a health probe.  For a diagnostic probe, it must return IDiagnosticProbeResult.  Notice that when the probe is executed, the Enterprise session is passed in by the Probe Scheduling Service (Adaptive Job Server).  You can use this Enterprise session to access the CMS Infostore so that you can perform actions on the BI Platform (such as query the CMS repository for metrics, start servers, change settings, etc).

 

public IHealthProbeResult executeHealthProbe(IEnterpriseSession session)

{

    HealthProbeResult probeResult = new HealthProbeResult(getProbeInfoObject());

    Socket socket = null;

    boolean available = false;

 

 

Step #6 -  To parameterize your probe you need to create a new java.util.Map object. Call getInputParameters( ) to create a map of the probe parameters that have been selected by the administrator in the Central Management Console (see Step #4).  In this example, there are two parameters (Web Server Host Name, Port Number)

 

 

Map<String,Object> inputParams = null;

try

{
     inputParams = probeObject.getInputParameters();
}
catch(Exception e)
{
     System.err.println(e);
     e.printStackTrace();
}

String hostname = (String) inputParams.get("hostname");

String portnum = (String) inputParams.get("portnum");
int portnumint = Integer.parseInt(portnum);

 

 

Step #7 -  This example attempts to create a connection to the specified host and port number.  If it succeeds, our probe executes probeSucceeded( ).  If it fails, an exception is thrown and the probe executes probeFailed( ).  The probeResult specifies to the Probe Scheduling Service if the health probe itself was a success or failure.

 

 

try

{

                       //String, int

   socket = new Socket(hostname, portnumint);

   probeResult.probeSucceeded();

}

catch (Exception e)

{

   probeResult.probeFailed();

}

return probeResult;

 

 

 

Compile and register your probe

 

 

  1. Add the required jar files to your CLASSPATH.  I have attached my CLASSPATH to this document as an example (classpath.txt).  The BI 4.0 Java SDK libraries are located in the directory <BOBJ_HOME>\SAP BusinessObjects Enterprise XI 4.0\java\lib.
  2. Compile your Java class. 
  3. Identify each BI4 node in your landscape hosting a Monitoring Service (Adaptive Processing Server) and a Probe Scheduling Service (Adaptive Job
    Server)
  4. Stop the Monitoring Service (Adaptive Processing Server) and Probe Scheduling Service (Adaptive Job Server)
  5. Make a backup of procProbe.jar located in <BOBJHOME>:\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\java\lib.  Don't forget, this jar file may get overwritten by Support Pack or Patch updates.
  6. Open procProbe.jar with winRAR and browse to procProbe.jar\com\businessobjects\monitoring\probe
  7. Drag your compiled class file into winRAR in the location procProbe.jar\com\businessobjects\monitoring\probe then close winRAR
  8. Restart the Monitoring Service (Adaptive Processing Server) and Probe Scheduling Service (Adaptive Job Server)
  9. Repeat steps 5,6,7, and 8 for each node running the Monitoring Service and Probe Scheduling Service
  10. Register your custom probe as per the BI4 Java SDK Developer's Guide or via the Central Management Console > Monitoring Application.
  11. During registration, specify the class name including the package name as com.businessobjects.monitoring.probe.yourClassName.
  12. Configure the input parameters to match the name and data type as defined in the java.util.Map in your source code.
  13. For an example, refer to Image A


Image A

register.png

 

 

Schedule the custom probe

 

 

  1. In the Central Management Console browse to Monitoring > Probe tab and locate your new probe.
  2. Right click on the probe and choose properties then check your input parameters (Image B)
  3. Schedule the probe to Run Now and see the results (Image C and Image D)

 


Image B

input props.png

 

 

Image C

success.png

 

 

Image D

failure.png

Top 10 viewed SAP Notes for April 2013

$
0
0

Purpose

The purpose of this document is to provide a list of the top ten most viewed SAP Notes for Java SDK Application Development in the month of April 2013.

 

 

Overview

Below are the top 10 most viewed SAP Notes for Java SDK Application Development.

 

Note NumberNote Title
1798423Steps to Create / Deploy Web Application in Tomcat for BI 4.0 Java SDK?
1692234Enterprise authentication could not log you on. Please make sure your logon information is correct. (FWB 00008) in BI 4.0
1697412What is the new URL for using OpenDocument in BI 4.0?
1629660When will Business Objects support exporting to xlsx format?
1313184How to configure a WAR file that uses the Enterprise XI 3.0 or 3.1 Java SDK
1609528Web Intelligence document can't be viewed using OpenDocument URL reporting after applying SP3
1697453While viewing a webi report, application threads hang
1367065How to delete objects in a user's inbox in BOXI 3.1?
1385505How to prevent "java.net.SocketTimeoutException: Read timed out" when using BusinessObjects Enterprise Web Services
1406037How to schedule a SAP Authentication Role / Group update in Business Objects XI 3.1 using a java program object

 

Please note, in order to view the contents of the SAP Notes, you may need to be logged into the SAP Service Marketplace.

 

 

Related Content


Top 10 viewed SAP Notes for May 2013

$
0
0

Purpose

The purpose of this document is to provide a list of the top ten most viewed SAP Notes for Java SDK Application Development in the month of May 2013.

 

 

Overview

Below are the top 10 most viewed SAP Notes for Java SDK Application Development.

 

1692234Enterprise authentication could not log you on. Please make sure your logon information is correct. (FWB 00008) in BI 4.0
1406037How to schedule a SAP Authentication Role / Group update in Business Objects XI 3.1 using a java program object
1609528Web Intelligence document can't be viewed using OpenDocument URL reporting after applying SP3
1336483What Types of Logon Tokens Are Available Via the BusinessObjects Enterprise SDK?
1587993Receiving WIS 10901 error when using prompts
1798423Steps to Create / Deploy Web Application in Tomcat for BI 4.0 Java SDK?
1696060Error : "The plugin 13 does not exist in the CMS"
1527666JDBC Connection URL's while creating Crystal Reports based on JDBC Connectivity
1621021Which SDK Jars are required for BI 4.0 Java custom application?
1697453While viewing a webi report, application threads hang

 

Please note, in order to view the contents of most of these SAP Notes, you may need to be logged into the SAP Service Marketplace.

 

 

Related Content

Top 10 viewed SAP Notes for February 2013 (NA)Top 10 viewed SAP Notes for March 2013 (NA)Top 10 viewed SAP Notes for April 2013

Top 10 viewed SAP Notes for June 2013

$
0
0

Purpose

The purpose of this document is to provide a list of the top ten most viewed SAP Notes for Java SDK Application Development in the month of June 2013.

 

 

Overview

Below are the top 10 most viewed SAP Notes for Java SDK Application Development.

 

 

 

1449399How to update or add/remove placeholders in BusinessObjects Enterprise/Edge XI 3.X?
1623421"Unable to reconnect to CMS <servername>:6400. The session has been logged off or has expired.(FWM 01002)" when using OpenDocument to repeatedly open documents in the same IE browser within custom SDK portal
1834664How to kill session using Java SDK in BusinessObjects Business Intelligence platform 4.0
1834664How to kill session using Java SDK in BusinessObjects Business Intelligence platform 4.0
1385505How to prevent "java.net.SocketTimeoutException: Read timed out" when using BusinessObjects Enterprise Web Services
1692234Enterprise authentication could not log you on. Please make sure your logon information is correct. (FWB 00008) in BI 4.0
1798423Steps to Create / Deploy Web Application in Tomcat for BI 4.0 Java SDK ?
1671949Where can I find documentation on Opendocument in BI4?
1629660When will Business Objects support exporting to xlsx format?
1718400Opening crystal report based on universe or Crystal Report for Enterprise XI 4 using Business Intelligence platform Java SDK in BI 4.0 gives Error code:-2147217395 [JRC00005110] Error

 

Please note, in order to view the contents of most of these SAP Notes, you may need to be logged into the SAP Service Marketplace.

 

 

 

Related Content

Top 10 viewed SAP Notes for March 2013 (NA)Top 10 viewed SAP Notes for April 2013Top 10 viewed SAP Notes May 2013

Java program for adding a java program object to CMS using plateform SDK

$
0
0

public void addProgramObjectToCms(IEnterpriseSession enterpriseSession,

            String jarPath, int parentFolderId, String programName)

            throws SDKException {

       

      IInfoStore infoStore = (IInfoStore) enterpriseSession

                .getService("InfoStore");

        IPluginMgr pluginMgr = infoStore.getPluginMgr();

        IPluginInfo pluginInfo = pluginMgr

                .getPluginInfo("CrystalEnterprise.Program");

        IInfoObjects newInfoObjects = infoStore.newInfoObjectCollection();

        IInfoObject newProgram = newInfoObjects.add(pluginInfo);

 

//folder in which you want to add the program

        newProgram.properties().setProperty("SI_PARENTID", parentFolderId);

        newProgram.properties().setProperty("SI_NAME", programName);

        File programFile = new File(jarPath);

        newProgram.getFiles().addFile(programFile);

        IProgram program = (IProgram) newProgram;

        IJavaProgram javaProgram = (IJavaProgram) program.getProgramInterface();

        javaProgram.setUserName("administrator");

        javaProgram.setPassword("password");

      // Give main class

        javaProgram.setMainClass("com.JavaProgram");

     //add arguments

        javaProgram.setArgs("abc");

     //commit the changes

        infoStore.commit(newInfoObjects);

 

    }

Creating shortcut of inbox content using SAP Business Objects plateform SDK

$
0
0

public void createShortInboxContent(IEnterpriseSession enterpriseSession,

            int folderId) throws SDKException {

        IInfoStore infoStore = (IInfoStore) enterpriseSession

                .getService("InfoStore");

        IPluginMgr pluginMgr = infoStore.getPluginMgr();

        IInbox iInbox = infoStore.getMyInbox();

        IInfoObjects infoObjects = infoStore.query("SELECT * FROM CI_INFOOBJECTS WHERE SI_PARENTID = "

                + iInbox.getID());

        for (int i = 0; i < infoObjects.size(); i++) {

 

            IInfoObject infoObject = (IInfoObject) infoObjects.get(i);

            IPluginInfo pluginInfo = pluginMgr

                    .getPluginInfo("CrystalEnterprise.Shortcut");

            IInfoObjects infoObject1 = infoStore.newInfoObjectCollection();

            infoObject1.add(pluginInfo);

            IShortcut shortcut = (IShortcut) infoObject1.get(0);

            shortcut.setTargetID(infoObject.getID());

            shortcut.setTitle(infoObject.getTitle() + "_" + infoObject.getID());

            shortcut.properties().setProperty(CePropertyID.SI_PARENTID,

                    folderId);

            infoStore.commit(infoObject1);

 

 

   }

    }

Java Enterprise BE14 List Reports used in a Publication

$
0
0

This document provides a way to retrieve the details of documents included in a publication using Business Intelligence platform Java SDK. The sample code lists all the documents associated with a publication and display the output in a browser window.

 

Warning

The code given below can be very destructive if not used properly.  Please ensure that you have made a backup of your CMS database and your Input and Output FRS prior to running any code.

 

For more scripts and information on how to run these scripts refer to the blog avaiable here:

http://scn.sap.com/people/shawn.penner/blog/2013/06/04/scripts-and-samples

 

Below is the Java Server Pages (JSP) sample to retrieve details of documents (source document (s) + dynamic recipient document) included in a publication

 

Notes:

•You would need to change the userName, password, cmsName and publicationName to the values specific to your enterprise server in the provided sample code.

• I sample code is tested with BI 4.0 version of SAP BusinessObjects Platform.


<%@ page import="com.businessobjects.sdk.plugin.desktop.publication.*,             com.crystaldecisions.sdk.occa.infostore.*,            com.crystaldecisions.sdk.framework.*,             com.crystaldecisions.sdk.plugin.CeKind,          java.util.*"
%><%          // Retrieve the logon information (this was entered on the index.html page).    String userName = "username";    String password = "password";    String cmsName = "cmsname";    String authType = "secEnterprise";    // Retrieve the publication name that is to be updated with dynamic recipients from    // the specified Crystal Report.  Also retrieve the Crystal Report name that is being    // used as the source of the dynamic recipients (these were entered on the index.html page).    String publicationName = "publication Name";
%><%        ISessionMgr boSessionMgr = null;    IEnterpriseSession boEnterpriseSession = null;           // Initialize the Session Manager by getting it from the Crystal Enterprise class's          // getSessionMgr function.          boSessionMgr = CrystalEnterprise.getSessionMgr();          // Logon to the Session Manager to create a new BOE session.  Pass in the user name, password,          // the CMS name, and the authentication type.          boEnterpriseSession = boSessionMgr.logon(userName, password, cmsName, authType);
%><%          // Business Objects Declarations.    IInfoStore boInfoStore = null;    IInfoObjects boPublicationInfoObjects = null;    IInfoObject boPublicationInfoObject = null;    IPublicationEventHandlers boPublicationEventHandlers = null;    IPublicationEventHandler boPublicationEventHandler = null;    IPublicationEventHandlerInfo boPublicationEventHandlerInfo = null;

try 
{    
//Retrieve the InfoStore object.    
boInfoStore = (IInfoStore) boEnterpriseSession.getService("", "InfoStore");        
 // Retrieve the desired publication.    
boPublicationInfoObjects = boInfoStore.query("SELECT * FROM CI_INFOOBJECTS WHERE SI_KIND = '" + CeKind.PUBLICATION + "' AND SI_NAME = '" + publicationName + "' AND SI_INSTANCE = 0");    
boPublicationInfoObject = (IInfoObject) boPublicationInfoObjects.get(0);         
// Cast the publication infoObject to IPublication.    
IPublication boPublication = (IPublication)boPublicationInfoObject; 
out.println("<b>Publication Name: </b>" + boPublicationInfoObject.getTitle() +"<br><br>");  
Collection collection= boPublication.getDocuments();
Iterator iterator = collection.iterator();     
out.println("<b>SourceDocument Info </b><br><br>");      while (iterator.hasNext()){
Object data = iterator.next();
String data1=(String)data.toString();
IInfoObjects sourceobjects= (IInfoObjects)boInfoStore.query("SELECT * FROM CI_INFOOBJECTS WHERE SI_ID="+ data);
IInfoObject sourceobject=  (IInfoObject)sourceobjects.get(0);          out.println("<b> Report Name: </b>" + sourceobject.getTitle() + "<br>");          out.println("<b> Report CUID: </b>" + sourceobject.getCUID()+ "<br><br>");      }
boPublicationEventHandlers = boPublication.getPublicationEventHandlers();
boPublicationEventHandler = boPublicationEventHandlers.getPublicationEventHandler(CePropertyID.SI_ON_READ_RECIPIENTS);   // Trigger when publication reads the list of recipients   
out.println("<b>Dynamic Recipients Document Info </b><br><br>");
if(boPublicationEventHandler.size()==0 )
{
out.println("The publication " + boPublicationInfoObject.getTitle() + " has zero dynamic recipients" );
}
else
{
boPublicationEventHandlerInfo  = (IPublicationEventHandlerInfo)boPublicationEventHandler.get(0);
IInfoObjects dynamicdocinfos = boInfoStore.query("SELECT * FROM CI_INFOOBJECTS WHERE SI_ID="+boPublicationEventHandlerInfo.getDynamicDataDocumentID());
IInfoObject  dynamicdocinfo= (IInfoObject) dynamicdocinfos.get(0);
out.println("<b> Report Name: </b>" + dynamicdocinfo.getTitle() + "<br>");
out.println("<b> Report Kind: </b>" + dynamicdocinfo.getKind() + "<br>");
out.println("<b>Report CUID: </b>" + dynamicdocinfo.getCUID() + "<br><br>");  
} 
}catch (Exception ex) {                      out.println(ex);            } finally {                    // Ensure clean-up of the Enterprise session              if(boEnterpriseSession != null) {                  try {                      boEnterpriseSession.logoff();                  } catch(Exception e_ignore_in_cleanup) {}              }           }
%>

Top 10 viewed SAP KBAs for July 2013 (Java SDK Application Development)

$
0
0

Purpose

The purpose of this document is to provide a list of the top ten most viewed SAP Knowledge Base Articles for Top 10 viewed SAP KBAs for July 2013 (Java SDK Application Development) in the month of July 2013.

 

Overview

Below are the top 10 most viewed SAP KBAs for Migration.

 

KBA NumberKBA Title
1834664How to kill session using Java SDK in BusinessObjects Business Intelligence platform 4.0
1244342BusinessObjects Enterprise Web Services request times out after 20 minutes
1798423Steps to Create / Deploy Web Application in Tomcat for BI 4.0 Java SDK?
1385505How to prevent "java.net.SocketTimeoutException: Read timed out" when using BusinessObjects Enterprise Web Services
1384496How to Close OpenDocument Session
1336483What Types of Logon Tokens Are Available Via the BusinessObjects Enterprise SDK?
1486953How to log on BusinessObjects Enterprise via SiteMinder SSO with Windows AD or LDAP authentication in a custom web SDK application?
1837469Error : "Can not create temp file---- Error code:-2147215357 [CRSDK00000615]" while exporting a Crystal report using RAS Java SDK
1384988How to enable tracing on the Web Service Providers
1283380Automatically logged out when using token to SSO to InfoView with BusinessObjects Enterprise 3.0 Java SDK

 

Please note, in order to view the contents of the SAP KBAs, you will need to be logged into Service Marketplace.

 

 

Related Content

Top 10 viewed KBAs for April 2013Top 10 viewed KBAs for May 2013Top 10 viewed KBAs for June 2013

Top 10 viewed SAP KBAs for August 2013 (Java SDK Application Development)

$
0
0

Purpose

The purpose of this document is to provide a list of the top ten most viewed SAP Knowledge Base Articles for Top 10 viewed SAP KBAs for July 2013 (Java SDK Application Development) in the month of July 2013.

 

Overview

Below are the top 10 most viewed SAP KBAs for Migration.

 

KBA NumberKBA Title
1834664How to kill session using Java SDK in BusinessObjects Business Intelligence platform 4.0
1244342BusinessObjects Enterprise Web Services request times out after 20 minutes
1798423Steps to Create / Deploy Web Application in Tomcat for BI 4.0 Java SDK?
1897531How to automatically cleanup a user session when an opendocument window is closed
1313184How to configure a WAR file that uses the Enterprise XI 3.0 or 3.1 Java SDK
1896556Error: "Query script generation failed...", using RESTful SDK to schedule a report with a BEX variable and mandatory prompt
1692234Enterprise authentication could not log you on. Please make sure your logon information is correct. (FWB 00008) in BI 4.0
1542902Transport error: Communication failure (FWM 00001) when logging onto BusinessObjects Enterprise using .NET web application
1367065How to delete objects in a user's inbox in BOXI 3.1?
1623421Unable to reconnect to CMS :6400. The session has been logged off or has expired.(FWM 01002) when using OpenDocument to repeatedly open documents in the same IE browser within custom SDK portal

 

 

 

Please note, in order to view the contents of the SAP KBAs, you will need to be logged into Service Marketplace.

 

 

 

 

Related Content

 

Top 10 viewed KBAs for May 2013Top 10 viewed KBAs for June 2013Top 10 KBAs for July 2013

Java Enterprise BE14 Set Param Values In Publication

$
0
0

This document provides a way to set parameters in a crystal report included in a publication using Business Intelligence platform Java SDK. The sample code sets the parameter value for a crystal report and saves it back to publication.

Warning

The code given below can be very destructive if not used properly.  Please ensure that you have made a backup of your CMS database and your Input and Output FRS prior to running any code.

For more scripts and information on how to run these scripts refer to the blog avaiable here:

http://scn.sap.com/people/shawn.penner/blog/2013/06/04/scripts-and-samples

Below is the Java Server Pages (JSP) sample

 

Notes:

•You would need to change the userName, password, cmsName and publicationName and the report name to the values specific to your enterprise server in the provided sample code.

• The sample code is tested with BI 4.0 version of SAP BusinessObjects Platform.

 

 

<%
/*===================================================================
Creation Date - Oct 15, 2013
Description -   The sample application demonstrates how to assign a current      value to a report parameter in a publication
==================================================================*/
%><%@ page import="com.businessobjects.sdk.plugin.desktop.profile.*" %><%@ page import="com.businessobjects.sdk.plugin.desktop.publication.*" %><%@ page import="com.businessobjects.sdk.plugin.desktop.common.*" %><%@ page import="com.crystaldecisions.sdk.exception.SDKException" %><%@ page import="com.crystaldecisions.sdk.occa.infostore.*" %><%@ page import="com.crystaldecisions.sdk.framework.*" %><%@ page import="com.crystaldecisions.sdk.plugin.desktop.common.*" %><%@ page import="com.crystaldecisions.sdk.plugin.desktop.folder.*" %><%@ page import="com.crystaldecisions.sdk.plugin.desktop.report.*" %><%@ page import="com.crystaldecisions.sdk.plugin.desktop.user.*" %><%@ page import="com.crystaldecisions.sdk.plugin.desktop.usergroup.*" %><%@ page import="com.crystaldecisions.sdk.plugin.destination.managed.*" %><%@ page import="com.crystaldecisions.sdk.plugin.destination.smtp.*" %><%@ page import="com.crystaldecisions.sdk.plugin.CeProgID" %><%@ page import="com.crystaldecisions.sdk.plugin.CeKind" %><%@ page import="com.crystaldecisions.sdk.properties.*" %><%@ page import="com.crystaldecisions.sdk.occa.pluginmgr.*" %><%@ page import="java.util.*" %><%
 //Retrieve the logon information    String boUser ="username";    String boPassword = "password";    String boCmsName = "cmsname";    String boAuthType ="secEnterprise";        String publication_name = "publication_name";    String report_name ="report_name_in_publication";
%><%    // Logon and obtain an Enterprise Session    IEnterpriseSession boEnterpriseSession = null;    boEnterpriseSession = CrystalEnterprise.getSessionMgr().logon( boUser, boPassword, boCmsName, boAuthType);    session.setAttribute( "boEnterpriseSession", boEnterpriseSession);
%><%    IInfoStore boInfoStore=null;    IInfoObjects boInfoObjects=null;    IInfoObject boInfoObject=null;    IInfoObjects boInfoObjects2=null;    IInfoObject boInfoObject2=null;
 IPluginMgr pluginMgr = null; //Plugin Manager returned from InfoStore    IPluginInfo reportPlugin = null; //Report PluginInfo object    IInfoObjects newInfoObjects = null; //new collection created from InfoStore    IInfoObject newInfoObject = null;  try{     //Retrieve the InfoStore object     boInfoStore = (IInfoStore) boEnterpriseSession.getService("", "InfoStore");          // Retrieve the desired publication     boInfoObjects = boInfoStore.query("SELECT * FROM CI_INFOOBJECTS WHERE SI_KIND = '" + CeKind.PUBLICATION + "' AND SI_NAME = '" + publication_name + "' AND SI_INSTANCE=0");     boInfoObject = (IInfoObject)boInfoObjects.get(0);       IPublication boPublication = (IPublication)boInfoObject;    //Retrieve the requested report  (If you know the SI_ID of the report - you can skip this step which just gets the ID)  boInfoObjects2 = boInfoStore.query("Select SI_ID, SI_KIND, SI_PROCESSINFO FROM CI_INFOOBJECTS WHERE SI_NAME='" + report_name + "' AND SI_INSTANCE=0");  boInfoObject2 = (IInfoObject)boInfoObjects2.get(0);  int documentID = new Integer(boInfoObject2.getID());  String documentKind = boInfoObject2.getKind();    // Now create a blank crystal report object  // Note: Because publications store a custom processing info collection, while still pointing back at the original report, it is possible for the  // two to become de-synchronized.  As a result, it is preferable to re-import the original report when modifying properties.  However, if you want  // to just update in place - then you can use the code below.    //Retrieve the PluginManager and use it to retrieve Crystal Report plug-in.        pluginMgr = boInfoStore.getPluginMgr();        reportPlugin = pluginMgr.getPluginInfo("CrystalEnterprise.Report");        //Create a new, empty InfoObjects collection.        newInfoObjects = boInfoStore.newInfoObjectCollection();        //Add the plug-in to the collection.  This creates a new InfoObject that represents a new Report        newInfoObject = newInfoObjects.add(reportPlugin);  IReport crystalReport=(IReport)newInfoObject;      // Now retrieve any custom processing properties and add them into the infoobject  com.crystaldecisions.sdk.properties.IProperties processingProperties = boPublication.getDocumentProcessingInfo(documentID);  crystalReport.getProcessingInfo().properties().putAll(processingProperties);     // Now retrieve the processing info for the desired report.  //  // Note:  // If this object was a webi report, then we would cast it to an IWebiFormatInfo object, or IFullClientFormatInfo object for Deski  IReportProcessingInfo boProcessingInfo = (IReportProcessingInfo)crystalReport;     // Now retrieve the report parameters collection    List boParamList = (List)boProcessingInfo.getReportParameters();    // Now loop through the parameters and set values.  for (Iterator i = boParamList.iterator(); i.hasNext();)   {       IReportParameter boParam = (IReportParameter)i.next();   IReportParameterValues boCurrentValues = boParam.getCurrentValues();   boCurrentValues.clear();   IReportParameterSingleValue boSingleValue = boCurrentValues.addSingleValue();   boSingleValue.setValue("This is a parameter Value");  }       // Save everything back        boPublication.setDocumentProcessingInfo(documentID, documentKind, crystalReport.getProcessingInfo().properties());       // Save the publication  boPublication.save();     out.println("Publication Succesfully Modified");     } finally {     /*      * Ensure clean-up of the Enterprise session.      */     if(boEnterpriseSession != null) {         try {             boEnterpriseSession.logoff();         } catch(Exception e_ignore_in_cleanup) {}     }
 }
%>

Java Enterprise BE14 Get Web Intelligence Server Metrics

$
0
0

This document provides a way to get the web intelligence server metrics using Business Intelligence platform Java SDK.

 

For more scripts and information on how to run these scripts refer to the blog avaiable here:

http://scn.sap.com/people/shawn.penner/blog/2013/06/04/scripts-and-samples

Below is the Java Server Pages (JSP) sample

 

Notes:

•You would need to change the userName, password, cmsName  to the values specific to your enterprise server in the provided sample code.

• The sample code is tested with BI 4.0 version of SAP BusinessObjects Platform

 

<%@ page import="java.util.*" %><%@ page import="com.businessobjects.sdk.plugin.desktop.common.IMetric"%><%@ page import="com.businessobjects.sdk.plugin.desktop.common.IMetrics"%><%@ page import="com.crystaldecisions.sdk.framework.CrystalEnterprise"%><%@ page import="com.crystaldecisions.sdk.framework.IEnterpriseSession"%><%@ page import="com.crystaldecisions.sdk.framework.ISessionMgr"%><%@ page import="com.crystaldecisions.sdk.occa.infostore.IInfoObject"%><%@ page import="com.crystaldecisions.sdk.occa.infostore.IInfoObjects"%><%@ page import="com.crystaldecisions.sdk.occa.infostore.IInfoStore"%><%@ page import="com.crystaldecisions.sdk.plugin.desktop.server.*"%><html><head></head><body><table border="2" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1"><tr><th width="30%">Server Name</th><th width="40%">Metric Name</th><th width="30%">Metric Value</th><%   final String _userid = "administrator";  //use BO Enterprise User ID    final String _password = "Password1";         //fill in password   final String _cms = "localhost:6400";   final String _authentication = "secEnterprise";      IInfoStore boInfoStore = null;   IInfoObjects boInfoObjects = null;   IEnterpriseSession eSession = null;   IServer currentServer = null;    IServerMetrics webiAdmin = null; 
 try {  ISessionMgr mySessionMgr = CrystalEnterprise.getSessionMgr();  eSession = mySessionMgr.logon(_userid, _password, _cms,_authentication );       boInfoStore = (IInfoStore) eSession.getService("InfoStore");  boInfoObjects = boInfoStore.query("Select * From CI_SYSTEMOBJECTS Where SI_PROGID='CrystalEnterprise.Server' and  SI_NAME='BIPW08R2.WebIntelligenceProcessingServer'");  currentServer = (IServer) boInfoObjects.get(0);    out.println ("<tr><td>" + currentServer.getTitle()+"</td>");        webiAdmin = (IServerMetrics)currentServer.getMetrics();        IMetrics serverMetrics=(IMetrics)webiAdmin.getMetrics("WebiServerAdmin");        for(int j=0;j<serverMetrics.size();j++)        {        IMetric serverMetric=(IMetric)serverMetrics.get(j);        out.println ("<td>" + serverMetric.getName()+"</td>");        out.println ("<td>" + serverMetric.getValue()+"</td></tr>");  out.println ("<tr><td></td>");        }   }   catch (Exception e)   {  out.println(e);  }  finally  {  if(eSession != null)  eSession.logoff();  }
%></table></body></html>

Create and Publish Connection using the Semantic SDK

$
0
0

This is a sample created using the Semantic SDK for SAP BusinessObjects Business Intelligence platform 4.1  It demonstrates how to create a new connection from scratch and then publish it to Enterprise.  The sample will create a file SDKTestRelationalConn.cnx in the folder C:\temp and then publish it to Enterprise.

 

Notes:

  • It is not possible to modify a published connection directly.  It must first be saved locally, at which point you can edit it, and then re-publish it.
  • If you get the error "Could not find driver for MS SQL Server 2008\OLE DB Providers" or similar, it is because you are missing the java parameter:
    -Dbusinessobjects.connectivity.directory="C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\dataAccess\connectionServer"
  • The necessary jar files are all referenced from the jar file sl_sdk.jar which is located in the folder C:\Program Files (X86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\SL SDK\java.  The sl_sdk.jar file does not actually contain the SDK - it merely contains relative paths to all the necessary jar files.

 

Create and Publish Connection

import com.sap.ip.bi.util.BiConsole.out;
import com.sap.sl.sdk.authoring.cms.CmsResourceService;
import com.sap.sl.sdk.authoring.cms.internal.right.SessionRight;
import com.sap.sl.sdk.authoring.connection.Connection;
import com.sap.sl.sdk.authoring.connection.DatabaseConnection;
import com.sap.sl.sdk.authoring.connection.DatabaseConnection.AuthenticationMode;
import com.sap.sl.sdk.authoring.connection.ConnectionFactory;
import com.sap.sl.sdk.authoring.connection.ConnectionParameter;
import com.sap.sl.sdk.authoring.connection.ConnectionService;
import com.sap.sl.sdk.authoring.connection.RelationalConnection;
import com.sap.sl.sdk.authoring.local.LocalResourceService;
import com.sap.sl.sdk.framework.SlContext;
import com.sap.sl.sdk.framework.cms.CmsSessionService;
import com.businessobjects.framework.*;
import com.crystaldecisions.sdk.exception.SDKException;
import com.crystaldecisions.sdk.framework.CrystalEnterprise;
import com.crystaldecisions.sdk.framework.IEnterprisePrincipal;
import com.crystaldecisions.sdk.framework.IEnterpriseSession;
import com.crystaldecisions.sdk.framework.EnterpriseVersion;
import com.crystaldecisions.sdk.framework.ISessionMgr;
import com.crystaldecisions.sdk.framework.internal.SessionMgr;
import com.crystaldecisions.sdk.properties.IProperties;
import com.businessobjects.dsl.framework.session.SessionManager;

 

public class CreateConnection {

 

public static void main(String[] args) {
  IEnterpriseSession sess = null;
 
  try {
   sess = CrystalEnterprise.getSessionMgr().logon("Administrator","Password1", "localhost", "secEnterprise");
  
  out.println("logged on as: " );
  } catch (SDKException e) {
   // TODO Auto-generated catch block
   e.printStackTrace();
  }

 

  SlContext context;
  context = SlContext.create();
  context.getService(CmsSessionService.class).setSession(sess);
 
  CmsResourceService service = context.getService(CmsResourceService.class);

  String tempFolder = "c:\\temp\\";
 
  String userName = "guest"; // dbconnection.getParameter(DatabaseConnection.USER_NAME).getValue();
  String password = "MyPassword" ;
  String dbmsName = "MS SQL Server 2008" ; //dbconnection.getParameter(DatabaseConnection.DBMS).getValue();
  String ntwkName = "OLE DB Providers" ; //dbconnection.getParameter(DatabaseConnection.NETWORK_LAYER).getValue();
  String connName = "vanpgdbsql03.pgdev.sap.corp" ; //dbconnection.getParameter(DatabaseConnection.DATASOURCE).getValue();
  String dbName   = "Xtreme";
  String connectionName = "SDKTestRelationalConn";
   
  com.sap.sl.sdk.authoring.connection.ConnectionFactory connectionFactory;
 
  connectionFactory = context.getService(com.sap.sl.sdk.authoring.connection.ConnectionFactory.class);
 
  RelationalConnection connection = connectionFactory.createRelationalConnection(connectionName, dbmsName, ntwkName);
  connection.getParameter("DATASOURCE").setValue(connName);
  connection.getParameter("DATABASE").setValue(dbName);
  connection.getParameter("USER_NAME").setValue(userName);
  connection.getParameter("PASSWORD").setValue(password);
 
  com.sap.sl.sdk.authoring.local.LocalResourceService localResourceService = context.getService(com.sap.sl.sdk.authoring.local.LocalResourceService.class);
  localResourceService.save(connection, tempFolder + connectionName + ".cnx", true);
 
  service.publish(tempFolder  + connectionName + ".cnx", "/Connections" , true);
}

}

 

Extra Note: Sample was created by Dan Paulsen

How to get Web Intelligence Report Name, associated Universe and Path name from BO Java SDK 3.1

$
0
0

This document provides a way to retrieve the details of Web intelligence report to get information of Report name , Report Id and the associated Universe name and Path for the Webi report in BO server using Business Intelligence platform Java SDK. The sample code lists all the poperties associated with a Webi and display the output in a browser window.

 

Sample Code

<%@ page import= "com.businessobjects.rebean.wi.*" %>

<%@ page import="com.crystaldecisions.sdk.properties.*"%>

<%@ page import="com.crystaldecisions.sdk.framework.*"%>

<%@ page import="com.crystaldecisions.sdk.occa.infostore.*" %>

<%@ page import="com.crystaldecisions.sdk.plugin.desktop.folder.*" %>

<%@ page import="java.util.*" %>

 

<html>

  <head></head>

<body>

<table border="2" cellpadding="0"
style="border-collapse: collapse" bordercolor="#111111"
width="100%" id="AutoNumber1">

  <tr>

<th width="30%">Report Name</th>          

<th width="10%">Report Id</th>

<th width="20%">Universe Name</th>

<th width="40%">Folder Path</th>

 

</tr>

  <%

  try

  {

String CMS = "CMS Name";                                        

String UserID = "Username";                                     

  String Password = "Password";

String authType = "secEnterprise";

ISessionMgr sm = CrystalEnterprise.getSessionMgr();

IEnterpriseSession es = sm.logon(UserID, Password, CMS,"secEnterprise");

IInfoStore iStore = (IInfoStore)es.getService("","InfoStore");

ReportEngines repEngines = (ReportEngines)es.getService("ReportEngines");

ReportEngine repEngine =(ReportEngine)repEngines.getService(ReportEngines.ReportEngineType.WI_REPORT_ENGINE);

String sq = "select * from ci_infoobjects where si_kind='webi' and si_instance = 0";

IInfoObjects iObjects = iStore.query(sq);

IInfoObject iObject = null;

  for(int i=0;i<iObjects.size();i++)

  {

iObject  (IInfoObject)iObjects.get(i);

  out.print("<tr><td>"  iObject.getTitle() + "</td><td>" + iObject.getID() +"</td>");

  DocumentInstance iDoc = repEngine.openDocument(iObject.getID());

  DataProviders iProviders = wiDoc.getDataProviders();

  out.println("<td>"  wiProviders.getItem(0).getDataSource().getLongName() + </td>");

  wiDoc.closeDocument();

  IProperties rop = iObject.properties();

  IProperty etProp = prop.getProperty("SI_PARENTID");

  String olderID = getProp.toString();

  IInfoObjects older = iStore .query("select * from ci_infoobjects where i_id="+FolderID);

  IInfoObject folder=(IInfoObject)folder.get(0);   

if(ifolder.getKind().equals("Folder"))

     {

IFolder ifolder=(IFolder)ifolder;

  String inalFolderPath=""; 

  if(iifolder.getPath()!= ull)

  {

  String ath[]=iifolder.getPath();

   for(int i=0;fi<path.length;fi++)

   {

   finalFolderPath  path[fi] + "/" + finalFolderPath;

   }

   finalFolderPath  finalFolderPath + iifolder.getTitle();

  }

  else

{

  finalFolderPath=finalFolderPath+iifolder.getTitle();

  }

  out.println("<td>"  finalFolderPath + "</td></tr>");

  }

  }

  es.logoff();

}

catch(Exception e)

  {

          out.println(e);

  }                                 

                %>

Java Enterprise BE14 Get Central Management Server Metrics

$
0
0

This document provides a way to get the central management server metrics using Business Intelligence platform Java SDK.

 

For more scripts and information on how to run these scripts refer to the blog avaiable here:

http://scn.sap.com/people/shawn.penner/blog/2013/06/04/scripts-and-samples

Below is the Java Server Pages (JSP) sample

 

Note:

•You would need to change the userName, password, cmsName  to the values specific to your enterprise server in the provided sample code.

• The sample code is tested with BI 4.0 version of SAP BusinessObjects Platform

Get CMS Server Metrics

<%@ page import="java.util.*" %>
<%@ page import="com.businessobjects.sdk.plugin.desktop.common.IMetric"%>
<%@ page import="com.businessobjects.sdk.plugin.desktop.common.IMetrics"%>
<%@ page import="com.crystaldecisions.sdk.framework.CrystalEnterprise"%>
<%@ page import="com.crystaldecisions.sdk.framework.IEnterpriseSession"%>
<%@ page import="com.crystaldecisions.sdk.framework.ISessionMgr"%>
<%@ page import="com.crystaldecisions.sdk.occa.infostore.IInfoObject"%>
<%@ page import="com.crystaldecisions.sdk.occa.infostore.IInfoObjects"%>
<%@ page import="com.crystaldecisions.sdk.occa.infostore.IInfoStore"%>
<%@ page import="com.crystaldecisions.sdk.plugin.desktop.server.*"%>
<html>

<head></head>

<body>

<table border="1" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111" width="54%" id="AutoNumber1">

<tr>
<td width="71">Server Name</td>
<td width="71">Friendly Name</td>
<td width="71">Metric Name</td>
<td width="71">Metric Value</td></tr>

<%
  final String _userid = "AdminUser";  //use BO Enterprise User ID
  final String _password = "AdminPassword";         //fill in password
  final String _cms = "localhost:6400";
  final String _authentication = "secEnterprise";
 
 
 
   IInfoStore boInfoStore = null;
   IInfoObjects boInfoObjects = null;
    
  // SDKException failure = null;
   IEnterpriseSession eSession = null;
   IServer currentServer = null;
   IServerMetrics cmsAdmin = null;

  try {
   ISessionMgr mySessionMgr = CrystalEnterprise.getSessionMgr();
   eSession = mySessionMgr.logon(_userid, _password, _cms,_authentication );
  
     
  boInfoStore = (IInfoStore) eSession.getService("InfoStore");
  boInfoObjects = boInfoStore.query("Select * From CI_SYSTEMOBJECTS Where SI_PROGID='CrystalEnterprise.Server' and  SI_SERVER_DESCRIPTOR='APS'");
  currentServer = (IServer) boInfoObjects.get(0);
 
  out.println ("<tr><td>" + currentServer.getTitle()+"</td>");
        out.println ("<td>" + currentServer.getFriendlyName()+"</td>");
        cmsAdmin = (IServerMetrics)currentServer.getMetrics();
        IMetrics serverMetrics=(IMetrics)cmsAdmin.getMetrics("APSAdmin");
        for(int j=0;j<serverMetrics.size();j++)
        {
        IMetric serverMetric=(IMetric)serverMetrics.get(j);
        out.println ("<td>" + serverMetric.getName()+"</td>");
        out.println ("<td>" + serverMetric.getValue()+"</td></tr>");
  out.println ("<tr><td></td><td></td>");
        }
  } catch (Exception e) {
   
    out.println(e);
  
  }
  finally
  {
  if(eSession!=null)
  eSession.logoff();
  }
%>

Viewing all 39 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>