building java applications with businessobjects xi 3 xi provides 3 security plug-ins enterprise ldap...

36
COPYRIGHT © 2008, BUSINESS OBJECTS S.A. Building Java Applications with BusinessObjects XI 3.0 Robert Horne Product Manager Embedded BI and Developer Strategy

Upload: trinhthuy

Post on 17-Mar-2018

222 views

Category:

Documents


2 download

TRANSCRIPT

COPYRIGHT © 2008, BUSINESS OBJECTS S.A.

Building Java Applicationswith BusinessObjects XI 3.0Robert HorneProduct Manager Embedded BI andDeveloper Strategy

SLIDE 2 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

AGENDA

1. XI 3.0 Intelligence Platform2. Getting Started3. Logon and Single Sign On4. Working with Crystal Reports5. Working with Web Intelligence6. URL Reporting7. Program Objects8. Data Connectivity9. Q&A

SLIDE 3 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

BusinessObjects XI 3.0

The Business Intelligence Platform

SLIDE 4 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

The XI 3.0 Business IntelligencePlatform

SLIDE 5 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

XI 3.0 INTELLIGENCE PLATFORM

Although not released yet, the next versions of CrystalReports Server, and Business Objects Edge will be builton the same platform as BusinessObjects Enterprise XI3.0

Many of the concepts shown today are also true for anyversion of BusinessObjects XI, *Crystal Reports Server,and legacy versions of *Crystal Enterprise.

Specific implementation details will vary

* No access to Web Intelligence

SLIDE 6 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

BusinessObjects XI 3.0

Getting Started

SLIDE 7 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

WHAT CAN I DO WITH THIS SDK

Almost anything InfoView and the CMC can doView and Schedule ReportsAdminister ServersAdminister security, users, groups, rights, andpermissionsOrganize folders, reports, and ObjectsManage calendars, events, categories, and other systemobjects

SLIDE 8 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

Must have Resources

Developer Library ( All XI 3.0 Documentation)https://boc.sdn.sap.com/developer/librarySee Setting up your Development Environment

Sample Code Libraryhttps://boc.sdn.sap.com/codesamplesContains all the code samples from Business Objects

JAR Files\Program Files\Business Objects\common\4.0\java\lib and lib\externalhttps://boc.sdn.sap.com/node/7298 - Detailed list

web.xmlAdd a bunch of settings here.

Other settings needed when not installed to default directory

SLIDE 9 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

THE BASICS

Viewing Crystal Reports1. Logon to the CMS2. Get an InfoStore object

1. To get access to any object you need and InfoStore object3. Query the InfoStore for the report you want4. Create a reportsource object from the report document5. Pass the reportsource to the Viewers SDK

SLIDE 10 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

CODE WALK THROUGH

IEnterpriseSession enterpriseSession = CrystalEnterprise.getSessionMgr().logon( username,password, cmsname, authType);

IInfoStore infoStore = (IInfoStore)enterpriseSession.getService("", "InfoStore");

IInfoObjects oInfoObjects = (IInfoObjects)infoStore.query("SELECT TOP 1 * " +"FROM CI_INFOOBJECTS WHERE SI_PROGID = 'CrystalEnterprise.Report' AND SI_INSTANCE=0

AND SI_NAME='" + logonform.reportname[0] + "'" );

if (oInfoObjects.size() > 0) {//Retrieve the latest instance of the report

IInfoObject oInfoObject = (IInfoObject) oInfoObjects.get(0);

//Use the PS report factory to obtain a report source that will be processed on the Page Server.IReportSourceFactory factoryPS =

(IReportSourceFactory)enterpriseSession.getService("PSReportFactory");

Object reportSource = factoryPS.openReportSource((oInfoObject), Locale.ENGLISH);session.setAttribute("reportSource", reportSource);

//View the report in the standard DHTML viewer.response.sendRedirect("CrystalReportViewer.jsp");

SLIDE 11 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

BusinessObjects XI 3.0

Logon and Single Sign On (SSO)

SLIDE 12 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

LOGON

First thing you must do is logon to the serverBO XI provides 3 security plug-ins

EnterpriseLDAPWindows AD

*Single Sign On (SSO) is available with all three, plusone

Enterprise – Hack job where you by pass the InfoView logonpageLDAP – Use SiteMinder tokenWindows AD – Using Kerberos and Vintela LibrariesTrusted Authentication

* I use a liberal interpretation of SSO

SLIDE 13 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

SSO - CONCEPTS

For custom code SSO implementations you first need tofollow the setup for SSO found in the BusinessObjectsEnterprise XI 3.0 Administrators Guide.

You will find very specific setup steps for Java, LDAP,Win AD, CMC and configuration files. Do this first!

To help with trouble shooting ensure that InfoView SSOworks first before doing custom code trouble shooting.

SLIDE 14 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

SSO – BY PASS INFOVIEW

Use this code to create your own SSO to InfoView for unsupportedauthentication systems.

IEnterpriseSession enterpriseSession = CrystalEnterprise.getSessionMgr().logon("<yourusername>", "<your password>", "<your Central Management Server name>", "<yourauthentication type>");

String logonToken = enterpriseSession.getLogonTokenMgr().createLogonToken();

/* URL to the InfoView logon page - Ensure that the URL to the Java InfoView's logonpage is correct. */

String infoViewURL ="http://myServer:8080InfoViewApp/logon/start.do?ivsLogonToken=" + logonToken;

/* URL request */

response.sendRedirect(infoViewURL);

SLIDE 15 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

SSO – LDAP AND SITEMINDER

Retrieve SiteMinder token and place it in as theusernamePass a blank password

//Grab the SMS Session token from a cookie or request//See SiteMinder documentation for details

IEnterpriseSession enterpriseSession =CrystalEnterprise.getSessionMgr().logon(sms_session, "", "<your Central ManagementServer name>", “secLDAP");

SLIDE 16 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

SSO – WIN AD AND VINTELA

Ensure you have this configured correctly for InfoViewbefore attemptingRequires jcsi*.jar and credential.JAR

Found in InfoViewApp lib directory….import com.businessobjects.sdk.credential.CredExtractorimport com.wedgetail.idm.sso.Ssoimport com.wedgetail.idm.sso.AuthInfoimport org.ietf.jgss.GSSCredentialimport org.ietf.jgss.GSSManager….CredExtractor credex = new CredExtractor(request);GSSCredential delCreds = credex.GetCredential();GSSManager manager = credex.GetManager();IEnterpriseSession enterpriseSession = null;enterpriseSession = CrystalEnterprise.getSessionMgr().logon(delCreds, manager,

apsname, apsauthtype);

SLIDE 17 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

SSO – TRUSTED AUTHENTICATION

Enables Single Sign On with Java Application ServersDelegate Authentication to third party authenticationsolutionsBased on trust between a single java application and theBusinessObects ServerEnables the application to send user names withoutpasswordsSee Administrators Guide on how to setup trust betweenJava Server and CMS server

SLIDE 18 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

SSO – TRUSTED AUTHENTICATION

ITrustedPrincipal trustedPrincipal;ISessionMgr sessionMgr =

CrystalEnterprise.getSessionMgr();

trustedPrincipal = sessionMgr.createTrustedPrincipal(userName, cmsName, (String)sharedSecret);

//or

trustedPrincipal = sessionMgr.createTrustedPrincipal(userName, cmsName );

SLIDE 19 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

BusinessObjects XI 3.0

Working with Crystal Reports

SLIDE 20 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

OPTIONS AVAILABLE

Schedule ReportsEnterprise SDK

Viewing ReportsViewers SDK (Embedded viewer)URL Reporting

CrystalReportsOpenDocument

Create or Modify ReportsReport Application Server SDK

SLIDE 21 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

VIEWERS SDK

A series of Java objects that can be embedded in yourweb application which handle:

viewing,exporting,paging,drill downclient side printing.

You also need to deploy a set of html, js, and image filesin a folder called “crystalreportviewers”

Configure the web.xml to let the application know the location ofthe crystalreportviewers folder

SLIDE 22 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

VIEWERS SDK CODE

CrystalReportViewer viewer = new CrystalReportViewer();

viewer.setName("CrystalReportViewer");viewer.setOwnPage(true);viewer.setDisplayToolbar(false);viewer.setPrintMode(CrPrintMode.ACTIVEX);

Object reportSource = session.getAttribute("reportSource");viewer.setReportSource(reportSource);viewer.processHttpRequest(request, response,

getServletConfig().getServletContext(), null);

SLIDE 23 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

REPORT APPLICATION SERVER SDK

Used when wanting to modify reports at runtime beforeviewingCommon scenarios

Change database locationReplace existing data connection with a a runtime dataset(ResultSet) pushed from your applicationRemove or suppress a field depending on user rightsMake batch changes to a set of reportsCreate an online report creation or modification applicationExporting

Can be used to just view reports, but should only beused when a specific RAS workflow is needed

SLIDE 24 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

RAS CODE

//Log in to Enterprise and get the report to modifyReportClientDocument oReportClientDocument =

myGeneric.getClientDoc("ResultsetDatasourceReport");

// Pass the ResultSet to the reportString table_name =

oReportClientDocument.getDatabase().getTables().getTable(0).getName();

oReportClientDocument.getDatabaseController().setDataSource(this.getResultSet(), table_name, "Reports");

session.setAttribute("CrystalReportViewer.ReportSource",oReportClientDocument.getReportSource());

response.sendRedirect("CrystalReportViewer.jsp");

SLIDE 25 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

BusinessObjects XI 3.0

Working with Web Intelligence

SLIDE 26 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

REPORT ENGINE SDK

SDK used to view and modify both Web Intelligence andview Desktop Intelligence documents.No Viewer object model like Crystal Reports makesproviding a fully featured DHTML viewer more difficultFor everything but simple viewing scenarios its probablybest to either use:

URL ReportingInteractive Editor Integration Java Sample

Interactive Editor Integration SampleCan be used as a embedded DHTML viewer.Makes it much easier to embed a Viewer inside your applicationSame as the one found in InfoView for consistancey

SLIDE 27 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

WEB INTELLIGENCE EXTENSIONPOINTS

Labs project for extending the Java Applet viewerVery useful for adding custom functionality to the AppletViewerOn road map for full supportAlso works with the Web Intelligence Rich Client

Allows you to embed the rich client into custom application in aoffline disconnect mode

http://labs.businessobjects.com

SLIDE 28 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

BusinessObjects XI 3.0

URL Reporting

SLIDE 29 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

URL REPORTING

Provides an easy way to view reports and documentsTwo URL formats available

URL reporting for Crystal Reports (when you are only viewing CrystalReports)

Need to deploy CrystalReports.warURL reporting with openDocument( Crystal Reports, WebIntelligence,DesktopIntelligence, OLAP intelligence)

Need to deploy OpenDocument.war, CrystalReports.war,AnalyticalReporting.war, and PlatformServices.war

LimitationYou need to deploy a separate web application for the URL reportingviewerDoesn’t share the same application space as your custom application

For more information see the “Viewers Java SDK Guide” in theDeveloper Library

SLIDE 30 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

URL REPORTING EXAMPLE

//Obtain token so that user will not be challenged to enter logoncredentials

//Enterprise session. This token should not be released manually.String enterpriseToken =

enterpriseSession.getLogonTokenMgr().createLogonToken();

//Build openDocument.jsp URL reporting request.String URLrequest = "http://" + servername +":8080/OpenDocument/opendoc/openDocument.jsp?iDocID=" +docID + "&token=" + enterpriseToken;

//Launch URL request.response.sendRedirect(URLrequest);

SLIDE 31 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

BusinessObjects XI 3.0

Program Objects

SLIDE 32 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

PROGRAM OBJECTS

Allows you to create Java programs which use theEnterprise SDK or any Java library which can then betreated like any other object inside the XI 3.0 platform

Commonly used in building work flows in combinationwith events.

Can be run or scheduled using the Enterprise SDK

Example – A program that is used to run a batch ofreports when triggered by an enterprise event

Requires implementing a specific Interface

SLIDE 33 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

BusinessObjects XI 3.0

Custom Java Data Connectivity

SLIDE 34 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

CUSTOM JAVA DATA CONNECTIVITY

Crystal Reports – Java Bean ConnectivityCrystal Reports connectivity to any Java Class that has a publicmethod that returns a JDBC ResultSet

Universe Connections – Data Access DriverDevelopment Kit (DDK)

Available only in XI 3.0The DDK enables you to develop data access drivers that can beused with Business Objects applications and Connection Server.Connection Server manages requests for data between aBusiness Objects application and a database.A data access driver is an interface between Connection Serverand the database middleware.

SLIDE 35 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

PUBLICATION EXTENSIONS

Publications are a new feature to XI 3.0 that allows youto create multiple versions of the same report and sendthem to a list of recipients

Publication Extensions allow you to write Java code toimplement custom Publication Post-Processing andDynamic Recipients.

Out-of-the-box Publication Extensions allow you tomerge/password protect/table-of-content PDFdocuments output from Publications, but you can writeyour own

SLIDE 36 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

QUESTIONS

?