Java code to list the objects used in a Webi 4.0 document

The current public BO BI 4.0 SDK does not include any features that allows to list objects used in a Webi 4.0 document or access variables. But this is still possible.

UPDATE: Please consider 4.1 RESTful Web Services SDK Developer Guides and API References http://scn.sap.com/docs/DOC-27465. It might be more convenient than hacking internal SDKs.

The necessary libraries:

  • C:\Program Files (x86)\SAP BusinessObjects\Tomcat6\webapps\BOE\WEB-INF\eclipse\plugins\webpath.AnalyticalReporting\web\WEB-INF\lib\adv_ivcdzview.jar
  • C:\Program Files (x86)\SAP BusinessObjects\Tomcat6\webapps\BOE\WEB-INF\eclipse\plugins\webpath.AnalyticalReporting\web\WEB-INF\lib\webi_client_toolkit.jar
  • C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\java\lib\* (without subfolders)
Disclaimer: Use it on your own risk
import java.util.List;
import java.util.Locale;

import com.businessobjects.adv_ivcdzview.Utils;
import com.businessobjects.rebean.wi.model.engine.IDocumentInstance;
import com.businessobjects.rebean.wi.services.IDocumentInstanceManagementService;
import com.businessobjects.sdk.core.Core;
import com.businessobjects.sdk.core.context.IContext;
import com.crystaldecisions.sdk.exception.SDKException;
import com.crystaldecisions.sdk.framework.CrystalEnterprise;
import com.crystaldecisions.sdk.framework.IEnterpriseSession;
import com.crystaldecisions.sdk.framework.ISessionMgr;
import com.crystaldecisions.sdk.occa.infostore.IInfoObject;
import com.crystaldecisions.sdk.occa.infostore.IInfoObjects;
import com.crystaldecisions.sdk.occa.infostore.IInfoStore;
import com.sap.sl.dictionary.DictionaryExpression;
import com.sap.sl.dictionary.Variable;
import com.sap.webi.client.toolkit.Deployment;
import com.sap.webi.client.toolkit.LoginKey;
import com.sap.webi.client.toolkit.SessionContext;
import com.sap.webi.client.toolkit.reporting.ReportDictionaryHelper;

public class Program2 {
  public static void main(String[] args) throws Exception {

    IEnterpriseSession enterpriseSession = null;
    try {
      System.out.println("Connecting...");
      ISessionMgr sessionMgr = CrystalEnterprise.getSessionMgr();
      enterpriseSession = sessionMgr.logon(
          "Administrator", "", "localhost", "secEnterprise");

      // Do some magic
      String serializedSession = enterpriseSession.getSerializedSession();
      SessionContext sessionContext = Utils.getSessionContextManager()
          .matchSessionContext(Deployment.DHTML, serializedSession, true);
      Locale localLocale = Locale.getDefault();
      sessionContext.getLoginInfo().set(LoginKey.LOCALE, localLocale);
      sessionContext.logonWithSerializedSession();
      IContext context = sessionContext.getCoreContext();
      IDocumentInstanceManagementService documentInstanceManagementService =
          Core.getService(IDocumentInstanceManagementService.class);

      // Get the list of webi documents
      IInfoStore infoStore = (IInfoStore) enterpriseSession.getService("InfoStore");
      String query = "select SI_NAME, SI_ID from CI_INFOOBJECTS "
          + "where SI_KIND = 'Webi' and SI_INSTANCE=0";
      IInfoObjects infoObjects = (IInfoObjects) infoStore.query(query);

      for (Object object : infoObjects) {
        IInfoObject infoObject = (IInfoObject) object;
        if (getInfoObjectPathAndTitle(infoObject).startsWith("/")) {
          System.out.println("REPORT: " + infoObject.getTitle());

          IDocumentInstance doc = documentInstanceManagementService
              .openDocument(context, infoObject.getID());

          List list = ReportDictionaryHelper
              .getDictionaryObjectsFlatList(context, doc);
          if (list.size() > 0) {
            System.out.println("OBJECTS:");
            for (DictionaryExpression expr:list) {
              System.out.println(expr.getName());
            }
          }

          List vars = ReportDictionaryHelper.getDocumentVariables(context,doc);
          if (vars.size() > 0) {
            System.out.println("VARIABLES:");
            for (Variable var:vars) {
              System.out.println(var.getName());
            }
          }

          documentInstanceManagementService.closeDocument(context, doc);
          System.out.println();
        }
      }
    } catch (SDKException ex) {
      ex.printStackTrace();
    } finally {
      if (enterpriseSession != null)
        enterpriseSession.logoff();
    }
    System.out.println("Finished!");
  }

  public static String getInfoObjectPath(IInfoObject infoObject)
      throws SDKException
  {
    String path = "";
    while (infoObject.getParentID() != 0) {
      infoObject = infoObject.getParent();
      path = "/" + infoObject.getTitle() + path;
    }
    return path;
  }

  public static String getInfoObjectPathAndTitle(IInfoObject infoObject)
      throws SDKException
  {
    return getInfoObjectPath(infoObject) + "/" + infoObject.getTitle();
  }
}

49 thoughts on “Java code to list the objects used in a Webi 4.0 document

  1. Boris

    Dmitry,

    your example shows how to get a list of objects in a webi report. For documentation and traceablity purposes it would be nice to get an expression which corresponds to any particular object used in the report. Is there any way to do this? For instance, if the object name was “Full Name” and its expression in teh universe was ” LAST_NAME||’, ‘||FIRST_NAME “, how can I get this information from the webi report itself. I assume there has to be a better solution than parsing the entire SQL.

    Boris

    Like

    Reply
      1. RAGHU

        Hi Dmytro,

        The following code with unvDoc will do the magic for Boris.

        The code will list only objects along with IDs as per his req. more to do is just have a vlookup of objectID of code output vs objectID from unvdoc tool excel to get sql part of the object…

        All the credit goes to Dmytro… I am learning SDK on following your Website..

        ………………………………………………………..

        import java.util.Collection;
        import java.util.List;
        import java.util.ArrayList;
        import java.util.Locale;
        import com.businessobjects.adv_ivcdzview.Utils;
        import com.businessobjects.rebean.wi.DataProviders;
        import com.businessobjects.rebean.wi.model.engine.IDocumentInstance;
        import com.businessobjects.rebean.wi.services.IDocumentInstanceManagementService;
        import com.businessobjects.sdk.core.Core;
        import com.businessobjects.sdk.core.context.IContext;
        import com.crystaldecisions.sdk.exception.SDKException;
        import com.crystaldecisions.sdk.framework.CrystalEnterprise;
        import com.crystaldecisions.sdk.framework.IEnterpriseSession;
        import com.crystaldecisions.sdk.framework.ISessionMgr;
        import com.crystaldecisions.sdk.occa.infostore.IInfoObject;
        import com.crystaldecisions.sdk.occa.infostore.IInfoObjects;
        import com.crystaldecisions.sdk.occa.infostore.IInfoStore;
        import com.sap.sl.dataprovider.DataProvider;
        import com.sap.sl.dictionary.*;
        import com.sap.webi.client.toolkit.Deployment;
        import com.sap.webi.client.toolkit.LoginKey;
        import com.sap.webi.client.toolkit.SessionContext;
        import com.sap.webi.client.toolkit.reporting.ReportDictionaryHelper;
        import com.sap.webi.client.toolkit.internal.repository.RepositoryAccessCommonImpl;
        import com.sap.webi.client.toolkit.repository.IRepositoryAccess;
        import com.sap.webi.client.toolkit.reporting.ObjectsDictionary;

        import edu.emory.mathcs.backport.java.util.Arrays;
        import edu.emory.mathcs.backport.java.util.Collections;

        public class ObjectsWithID {
        public static void main(String[] args) throws Exception {

        IEnterpriseSession enterpriseSession = null;
        try {
        ISessionMgr sessionMgr = CrystalEnterprise.getSessionMgr();
        enterpriseSession = sessionMgr.logon(
        “”, “”, “”, “secEnterprise”); // secEnterprise can be secLDAP …
        System.out.println(“REPORT NAME”+”###”+”Data Provider Name”+”###”+”Object Name”+”###”+”Qualification”+”###”+”ObjectID”);
        // Do some magic
        String serializedSession = enterpriseSession.getSerializedSession();
        SessionContext sessionContext = Utils.getSessionContextManager()
        .matchSessionContext(Deployment.DHTML, serializedSession, true);
        Locale localLocale = Locale.getDefault();
        sessionContext.getLoginInfo().set(LoginKey.LOCALE, localLocale);
        sessionContext.logonWithSerializedSession();
        IContext context = sessionContext.getCoreContext();
        IDocumentInstanceManagementService documentInstanceManagementService =
        Core.getService(IDocumentInstanceManagementService.class);
        // Get the list of webi documents
        IInfoStore infoStore = (IInfoStore) enterpriseSession.getService(“InfoStore”);
        String query = “select SI_NAME, SI_ID from CI_INFOOBJECTS ”
        + “where SI_KIND = ‘Webi’ and SI_INSTANCE=0 “; // optional and SI_PARENT_FOLDER in () and SI_ID=
        IInfoObjects infoObjects = (IInfoObjects) infoStore.query(query);
        for (Object object : infoObjects) {
        IInfoObject infoObject = (IInfoObject) object;
        if (getInfoObjectPathAndTitle(infoObject).startsWith(“/”)) {

        IDocumentInstance doc = documentInstanceManagementService
        .openDocument(context, infoObject.getID());

        List dataprovs = ReportDictionaryHelper.getDataProviders(context, doc);

        if (dataprovs.size() > 0) {
        for (DataProvider dataprov:dataprovs) {

        Collection list1 = ReportDictionaryHelper.getDictionaryObjectsFlatList(context, doc);

        for (DictionaryExpression dp :list1) {

        int position1;
        String hexobjectID;
        if(dp.getID().length()>3){
        if ((dp.getID().contains(“.”))) {
        position1 = dp.getID().indexOf(“.”);
        if(dp.getID().substring(0,position1).equals(dataprov.getID())){
        System.out.println(dp);
        hexobjectID =dp.getID().substring(dp.getID().indexOf(“.”)+3,dp.getID().length());
        System.out.println(hexobjectID);
        int objectid = Integer.parseInt(hexobjectID,16);
        System.out.println(“Hex value “+objectid);
        System.out.println(infoObject.getTitle()+”###”+dataprov.getName()+”###”+dp.getName()+”###”+objectid);
        }

        }
        }
        }

        }
        }

        documentInstanceManagementService.closeDocument(context, doc);

        }
        }
        } catch (SDKException ex) {
        ex.printStackTrace();
        } finally {
        if (enterpriseSession != null)
        enterpriseSession.logoff();
        }
        System.out.println(“Finished!”);
        }

        public static String getInfoObjectPath(IInfoObject infoObject)
        throws SDKException
        {
        String path = “”;
        while (infoObject.getParentID() != 0) {
        infoObject = infoObject.getParent();
        path = “/” + infoObject.getTitle() + path;
        }
        return path;
        }

        public static String getInfoObjectPathAndTitle(IInfoObject infoObject)
        throws SDKException
        {
        return getInfoObjectPath(infoObject) + “/” + infoObject.getTitle();
        }
        }

        Regards,
        Raghu

        Like

      2. RAGHU

        Please modify reqd lines following code. I am sorry i forgot to comment some lines

        //System.out.println(dp);
        hexobjectID =dp.getID().substring(dp.getID().indexOf(“.”)+3,dp.getID().length());
        //System.out.println(hexobjectID);
        int objectid = Integer.parseInt(hexobjectID,16);
        //System.out.println(“Hex value “+objectid);
        System.out.println(infoObject.getTitle()+”###”+dataprov.getName()+”###”+dp.getName()+”###”+objectid);

        Regards,
        Raghu

        Like

      3. Aditya

        Hi Dmytro,

        I am looking for a code where I can change the logo of one/bunch of reports with another logo that is saved on my local machine or the server.
        I’m working around withe following piece of code regarding the same:

        package org.bukhantsov;

        import java.util.ArrayList;

        import com.businessobjects.rebean.wi.DocumentInstance;
        import com.businessobjects.rebean.wi.FormulaExpression;
        import com.businessobjects.rebean.wi.ReportCell;
        import com.businessobjects.rebean.wi.ReportDictionary;
        import com.businessobjects.rebean.wi.ReportEngine;
        import com.businessobjects.rebean.wi.ReportEngines;
        import com.businessobjects.rebean.wi.ReportExpression;
        import com.businessobjects.rebean.wi.TreeNode;
        import com.crystaldecisions.sdk.exception.SDKException;
        import com.crystaldecisions.sdk.framework.CrystalEnterprise;
        import com.crystaldecisions.sdk.framework.IEnterpriseSession;
        import com.crystaldecisions.sdk.framework.ISessionMgr;
        import com.crystaldecisions.sdk.occa.infostore.IInfoObject;
        import com.crystaldecisions.sdk.occa.infostore.IInfoObjects;
        import com.crystaldecisions.sdk.occa.infostore.IInfoStore;

        public class Program {

        public static void main(String[] args) throws Exception {

        String userName = “Administrator”;
        String password = “”;
        String cms = “ukr-client01”;
        String auth = “secEnterprise”;

        IEnterpriseSession enterpriseSession = null;
        ReportEngines reportEngines = null;
        try {

        System.out.println(“Connecting…”);
        ISessionMgr sessionMgr = CrystalEnterprise.getSessionMgr();
        enterpriseSession = sessionMgr.logon(userName, password,
        cms, auth);
        reportEngines =
        (ReportEngines) enterpriseSession.getService(“ReportEngines”);
        ReportEngine wiRepEngine =
        (ReportEngine) reportEngines.getService(ReportEngines.ReportEngineType.WI_REPORT_ENGINE);
        IInfoStore infoStore = (IInfoStore) enterpriseSession.getService(“InfoStore”);

        String query = “select SI_NAME, SI_ID from CI_INFOOBJECTS ”
        + “where SI_KIND = ‘Webi’ and SI_INSTANCE=0”;
        IInfoObjects infoObjects = (IInfoObjects) infoStore.query(query);
        for (Object object : infoObjects) {
        IInfoObject infoObject = (IInfoObject) object;
        String path = getInfoObjectPathAndTitle(infoObject);
        if (path.startsWith(“/Business Performance Management/Reporting/AR Aging”)) {
        DocumentInstance widoc = wiRepEngine.openDocument(infoObject.getID());
        String doc = infoObject.getTitle();
        int cnt = replaceExpression(widoc, “=\”boimg://logo.bmp\””, “=\”boimg://logo.jpg\””);
        System.out.println(cnt + ” occurences were replaced in ” + path + “/” + doc);
        widoc.save();
        widoc.closeDocument();
        }
        }

        } catch (SDKException ex) {
        ex.printStackTrace();
        } finally {
        if (reportEngines != null)
        reportEngines.close();
        if (enterpriseSession != null)
        enterpriseSession.logoff();
        }
        System.out.println(“Finished!”);
        }

        private static int replaceExpression(DocumentInstance widoc, String from, String to) {
        ReportDictionary reportDictionary = widoc.getDictionary();
        ArrayList nodes = getListOfTreeNodes(widoc.getStructure(), false);
        int n = 0;
        for (TreeNode node : nodes) {
        if (node instanceof ReportCell) {
        ReportCell reportCell = (ReportCell)node;
        ReportExpression reportExpression = reportCell.getExpr();
        if (reportExpression instanceof FormulaExpression) {
        FormulaExpression formulaExpression = (FormulaExpression)reportExpression;
        if (formulaExpression.getValue().compareTo(from) == 0){
        FormulaExpression newFormulaExpression = reportDictionary.createFormula(to);
        reportCell.setExpr(newFormulaExpression);
        n += 1;
        }
        }
        }
        }
        widoc.applyFormat();
        return n;
        }

        public static ArrayList getListOfTreeNodes(TreeNode root, boolean onlyLeaves) {
        ArrayList nodes = new ArrayList();
        treeNodeTraversal(root, nodes, onlyLeaves);
        return nodes;
        }

        private static void treeNodeTraversal(TreeNode node, ArrayList nodes, boolean onlyLeaves) {
        if (!onlyLeaves || node.isLeaf()) {
        nodes.add(node);
        }
        for (int i = 0; i < node.getChildCount(); ++i) {
        treeNodeTraversal(node.getChildAt(i), nodes, onlyLeaves);
        }
        }

        public static String getInfoObjectPath(IInfoObject infoObject)
        throws SDKException {
        String path = "";
        while (infoObject.getParentID() != 0) {
        infoObject = infoObject.getParent();
        path = "/" + infoObject.getTitle() + path;
        }
        return path;
        }

        public static String getInfoObjectPathAndTitle(IInfoObject infoObject)
        throws SDKException {
        return getInfoObjectPath(infoObject) + "/" + infoObject.getTitle();
        }

        public static String getUniversesRoot(IInfoStore infoStore)
        throws SDKException {
        String query = "select * from CI_APPOBJECTS where SI_KIND = 'Folder' "
        +"and SI_OWNER='System Account' AND SI_NAME='Universes'";
        IInfoObjects objects = (IInfoObjects) infoStore.query(query);
        IInfoObject obj = (IInfoObject) objects.get(0);
        return getInfoObjectPathAndTitle(obj);
        }

        }

        Like

  2. Aaron

    Hi, Is it possible to capture the values selected in a global filter in a WebI document in BI4.0?
    We have a requirement to capture the filter values and pass on to SDK utility that will store these values in a db table for further processing.

    Also after the SDK utility has run, we need to pass the control back to the Launchpad so that users can continue in the same IE Infoview window that they had used to login.

    Is it possible to achieve using BI 4 SDK?
    Appreciate your response.

    Like

    Reply
    1. dmytro Post author

      Isn’t BO auditing sufficient for this? It is possible to track user prompt selection. I assume you can get the values from auditing database “for further processing”.

      Like

      Reply
  3. RAGHU

    Hi Dmytro,

    I am tryong to get variable formula and i am not getting it exactly what i want. It’s giving in some other language+english. i beilive its object cuid and function ids are coming into picture in this. If its plain english variable like a variable having raghu in it. then we are able to get it. But when there is objecrs or functions used in variables definition. then i am facing issue.

    Code addition done is

    System.out.println(var.getDefinition());

    Output is as follows

    VARIABLES:
    Var_Activity
    DIMENSION
    qDl$f301$f282$s$oL4$f301$lDelay$s$f524$s$f553$f456$lDelay$f457$s$f525$s$oLD$

    Please let me know if we can achieve the variable formulas using SDK.

    Regards,
    Raghu

    Like

    Reply
    1. RAGHU

      Hi Dmytro,
      I have modified the code to list the formula in varaiable and its working very fine.

      List vars = ReportDictionaryHelper.getDocumentVariables(context,doc);
      if (vars.size() > 0) {
      System.out.println(“\n VARIABLES:”);
      for (Variable var:vars) {
      System.out.println(var.getName());
      System.out.println(var.getQualification());
      //System.out.println(var.getDefinition());
      String objectvarformula = ReportDictionaryHelper.getVariableFormulaText(context, doc, var);
      System.out.println(objectvarformula);
      }
      }

      Regards,
      Raghu

      Like

      Reply
      1. Phani

        Hello Raghu,
        We are looking to get the list of objects used in a webI report in BI 4.0, the above code is what we are looking for, but I am not a java guy, can you please help me to implement this in our system, I would apppreciate if you could let me know the steps via email, my mail id is pphani119@yahoo.com

        Thanks in Advance
        – Phani

        Like

    2. Phani

      Hello Raghu,
      We are looking to get the list of objects used in a webI report in BI 4.0, the above code is what we are looking for, but I am not a java guy, can you please help me to implement this in our system, I would apppreciate if you could let me know the steps via email, my mail id is pphani119@yahoo.com

      Thanks in Advance
      – Phani

      Like

      Reply
  4. Deblin

    Is there any way i can do this in netbeans? I am very new to java and we have a requirement to get the list of columns of a report through JAVA SDK. For example if a report A has Column A and Column B then the output will give us :
    Column A
    Column B

    is there a java code that does this?

    Like

    Reply
  5. NewToBO

    Is there any code available for creating webi document in BI4.0.
    I tried to create with following code snippet, But dataProvider is not getting value from the document instance. So I am not able to create the document.Please help to resolve this issue

    IDocumentInstance doc = dimService.newDocument(context);
    Workspace workspace = diService.getWorkspace(context, doc);
    List listDataProvider = wsService.getDataProviders(workspace);
    for (DataProvider provider : listDataProvider) {
    dataSource = (DataSource) provider.getDataSourceHeader().getDataSourceInfo();
    System.out.println(“datasource::”+dataSource.getName());
    }
    dimService.closeDocument(context, doc);

    Like

    Reply
  6. wasy

    Is it possible to convert this code into an individual app (web or stand-alone) or in an application form and export the results in excel, just like universe documentor.

    would be wonderful and very very convenient for non-java guys.

    Like

    Reply
    1. dmytro Post author

      Well this code is primarily a hack. Soon SAP will release 4.1 with a public report sdk and it will be much easier to create the application.

      Like

      Reply
  7. Sandeep Chandran

    HI Dmytro,

    Is there any way to list which objects from universe are used in reports , without opening each and every report from BI laaunchpad. My question is specifc to BI 4.0 WEBI.

    Also, anyway to list the reports, where in a specific universe object is used.

    Thanks and Regards
    Sandeep Chandran

    Like

    Reply
    1. dmytro Post author

      pick all from …\java\lib

      If you are asking about adv_ivcdzview.jar, webi_client_toolkit.jar. I found reference to them in some jsp files.

      Like

      Reply
    1. dmytro Post author

      I assume yes, in 4.1

      Check this document:
      scn.sap.com/docs/DOC-27465
      -> RESTful Web Services SDK Developer Guides and API References
      -> SAP Business Objects BI Platform 4.1 Web Intelligence Developer Guide

      Like

      Reply
  8. SS

    Hi Dmtyro,

    Could you please tell me how I can change the universe of webi report using Java 4.1 SDK.

    I am able to set the data source of data provider using below code.
    IWebiDocDataProviders loObj = infoObject.getDocumentDataProviders();
    IWebiDocDataProvider loDP = loObj.item(i);
    loDP.setDataSourceID(lsNewCUID);

    but some how these changes are not reflecting in Webi Report.

    Do I need to save the data provider after changing the universe?

    Please let me know the correct code for it

    Like

    Reply
  9. Mark

    Hi Dmytro,

    Fantastic information- helping a lot.

    One question- is there any documentation on ReportDictionaryHelper? I think it is going to help me solve some things, but I can’t find anything (Javadocs, etc) on it- when I search, its basically only your blog that comes up.

    Thanks,

    Like

    Reply
    1. dmytro Post author

      Hi Mark
      This post is about some internal sdk, so I do not think there is any documentation online.
      In 4.1 there is RESTful API for Webi, it will probably be much more convenient.

      Like

      Reply
      1. Mark

        Hmm, alright. Have you done any examples of using RESTful API for WEBI? I’ve looked through your stuff, and haven’t seen any so far.

        Thanks,

        Mark

        Like

  10. brian

    thanks for the example! I have this working, but am seeing that the following line isn’t closing my webi session as expected:

    documentInstanceManagementService.closeDocument(context, doc);

    my webi sessions steadily increase as I iterate through webi documents, and ultimately I consume all available causing errors to be thrown.

    Any ideas as to why this isn’t closing the webi session that is invoked?

    Like

    Reply
  11. Saradhi

    Hi dmytro,

    Your blog is very helpful.
    I have a requirement to add a new function (e.g: A financial function like IRR available in Excel) in Webi so that users can use this new function as all other functions like sum,Year,ToDate etc in Webi while developing reports. can we achieve this using the JAVA sdk by simply deploying the JAR files into server. Your response is very much appreciated as we have users seriously looking for this feature in Webi.
    Thank you very much.

    Like

    Reply
  12. Dave

    Hi, I’m getting the following error with your code after invoking openDocument

    [2014-04-02 15:23:08,268] [ERROR] [com.crystaldecisions.enterprise.ocaframework.FailoverLogonService] logonWithToken(): Failed to relogon, aps=boe4cms01:6400,token=395039JDcRslb56VEd26ES3RQ07Fq395038JL5IiWD3ccgQ9UVABvK41zL, errorCode=10521
    com.crystaldecisions.enterprise.ocaframework.idl.OCA.oca_abuse: IDL:img.seagatesoftware.com/OCA/oca_abuse:3.2
    at com.crystaldecisions.enterprise.ocaframework.idl.OCA.oca_abuseHelper.read(oca_abuseHelper.java:106)
    at com.crystaldecisions.enterprise.ocaframework.idl.OCA.OCAs._LogonEx6Stub.LogonWithTokenEx5(_LogonEx6Stub.java:488)
    at com.crystaldecisions.enterprise.ocaframework.FailoverLogonService.logonWithToken(FailoverLogonService.java:232)
    at com.crystaldecisions.enterprise.ocaframework.ManagedSession.reconnectCMS(ManagedSession.java:771)
    at com.crystaldecisions.enterprise.ocaframework.ManagedSession.validateServer(ManagedSession.java:756)
    at com.crystaldecisions.enterprise.ocaframework.ManagedSession.validateStatelessService(ManagedSession.java:574)
    at com.crystaldecisions.enterprise.ocaframework.ManagedSession.newService(ManagedSession.java:983)
    at com.crystaldecisions.enterprise.ocaframework.ManagedSession.get(ManagedSession.java:278)
    at com.crystaldecisions.enterprise.ocaframework.ManagedSessions.get(ManagedSessions.java:299)
    at com.crystaldecisions.enterprise.ocaframework.ServiceMgr.getManagedService_aroundBody4(ServiceMgr.java:520)
    at com.crystaldecisions.enterprise.ocaframework.ServiceMgr.getManagedService(ServiceMgr.java:1)
    at com.businessobjects.corba.generic.container.proxy.internal.remote.WorkSessionProxyBuilder$WorkSessionStubHelper.getService(Unknown Source)
    at com.crystaldecisions.enterprise.ocaframework.ManagedService.validate(ManagedService.java:771)
    at com.crystaldecisions.enterprise.ocaframework.ManagedSession.validateStatelessService(ManagedSession.java:611)
    at com.crystaldecisions.enterprise.ocaframework.ManagedSession.newService(ManagedSession.java:983)
    at com.crystaldecisions.enterprise.ocaframework.ManagedSession.get(ManagedSession.java:256)
    at com.crystaldecisions.enterprise.ocaframework.ManagedSessions.get(ManagedSessions.java:299)
    at com.crystaldecisions.enterprise.ocaframework.ServiceMgr.getManagedService_aroundBody4(ServiceMgr.java:520)
    at com.crystaldecisions.enterprise.ocaframework.ServiceMgr.getManagedService_aroundBody5$advice(ServiceMgr.java:512)
    at com.crystaldecisions.enterprise.ocaframework.ServiceMgr.getManagedService(ServiceMgr.java:1)
    at com.businessobjects.corba.generic.container.proxy.internal.remote.WorkSessionProxyBuilder.findManagedService(Unknown Source)
    at com.businessobjects.corba.generic.container.proxy.internal.remote.WorkSessionProxyBuilder.connect(Unknown Source)
    at com.businessobjects.corba.generic.container.proxy.internal.remote.WorkEntityFactory.getWorkSessionProxy(Unknown Source)
    at com.businessobjects.corba.generic.container.proxy.internal.remote.RemoteGenericContainerProxy.getSessionProxy(Unknown Source)
    at com.businessobjects.corba.generic.container.proxy.internal.remote.RemoteGenericContainerProxy.getSessionProxy(Unknown Source)
    at com.businessobjects.corba.generic.container.proxy.internal.remote.RemoteGenericContainerProxy.getSessionProxy(Unknown Source)
    at com.businessobjects.corba.generic.container.proxy.internal.remote.RemoteGenericContainerProxy.getEntityProxy(Unknown Source)
    at com.businessobjects.sdk.core.server.internal.corba.AbstractServerConnector.init(AbstractServerConnector.java:86)
    at com.businessobjects.rebean.wi.newserver.WebiServerConnector.init(WebiServerConnector.java:79)
    at com.businessobjects.sdk.core.server.internal.corba.CorbaServerContext.init(CorbaServerContext.java:65)
    at com.businessobjects.sdk.core.server.internal.corba.CorbaServerImpl.createServerContext(CorbaServerImpl.java:53)
    at com.businessobjects.sdk.core.server.internal.AbstractServer.init(AbstractServer.java:69)
    at com.businessobjects.sdk.core.server.internal.InstanceServer.init(InstanceServer.java:73)
    at com.businessobjects.sdk.core.server.internal.InstanceServerServiceImpl.createServer(InstanceServerServiceImpl.java:90)
    at com.businessobjects.rebean.wi.impl.services.DocumentInstanceManagementServiceImpl.createServerCallerReader(DocumentInstanceManagementServiceImpl.java:764)
    at com.businessobjects.rebean.wi.impl.services.DocumentInstanceManagementServiceImpl.openDocument(DocumentInstanceManagementServiceImpl.java:157)
    at com.businessobjects.rebean.wi.impl.services.DocumentInstanceManagementServiceImpl.openDocument(DocumentInstanceManagementServiceImpl.java:80)
    at com.businessobjects.rebean.wi.internal.WIReportEngine.openDocument(WIReportEngine.java:429)
    at com.businessobjects.rebean.wi.internal.WIReportEngine.openDocument(WIReportEngine.java:438)
    at com.weishu.platform.datasource.bo4.services.impl.BOE4AccessServiceImpl.toMetadata(BOE4AccessServiceImpl.java:132)
    at com.weishu.platform.datasource.bo4.services.impl.BOE4AccessServiceImpl.toMetadatas(BOE4AccessServiceImpl.java:78)
    at com.weishu.platform.datasource.bo4.services.impl.BOE4AccessServiceImpl.listMetadata(BOE4AccessServiceImpl.java:70)
    at com.weishu.platform.datasource.bo4.BOE4Accesser.listMetadatas(BOE4Accesser.java:101)
    at com.weishu.platform.datasource.bo4.BOE4Accesser.doTestListDocument(BOE4Accesser.java:180)
    at com.weishu.platform.datasource.bo4.BOE4Accesser.main(BOE4Accesser.java:212)
    [2014-04-02 15:23:12,771] [ERROR] [com.crystaldecisions.enterprise.ocaframework.FailoverLogonService] logonWithToken(): Failed to relogon, aps=boe4cms01:6400,token=395039JDcRslb56VEd26ES3RQ07Fq395038JL5IiWD3ccgQ9UVABvK41zL, errorCode=10521
    com.crystaldecisions.enterprise.ocaframework.idl.OCA.oca_abuse: IDL:img.seagatesoftware.com/OCA/oca_abuse:3.2
    at com.crystaldecisions.enterprise.ocaframework.idl.OCA.oca_abuseHelper.read(oca_abuseHelper.java:106)
    at com.crystaldecisions.enterprise.ocaframework.idl.OCA.OCAs._LogonEx6Stub.LogonWithTokenEx5(_LogonEx6Stub.java:488)
    at com.crystaldecisions.enterprise.ocaframework.FailoverLogonService.logonWithToken(FailoverLogonService.java:232)
    at com.crystaldecisions.enterprise.ocaframework.ManagedSession.reconnectCMS(ManagedSession.java:771)
    at com.crystaldecisions.enterprise.ocaframework.ManagedSession.validateServer(ManagedSession.java:756)
    at com.crystaldecisions.enterprise.ocaframework.ManagedSession.validateStatelessService(ManagedSession.java:574)
    at com.crystaldecisions.enterprise.ocaframework.ManagedSession.newService(ManagedSession.java:983)
    at com.crystaldecisions.enterprise.ocaframework.ManagedSession.get(ManagedSession.java:278)
    at com.crystaldecisions.enterprise.ocaframework.ManagedSessions.get(ManagedSessions.java:299)
    at com.crystaldecisions.enterprise.ocaframework.ServiceMgr.getManagedService_aroundBody4(ServiceMgr.java:520)
    at com.crystaldecisions.enterprise.ocaframework.ServiceMgr.getManagedService(ServiceMgr.java:1)
    at com.businessobjects.corba.generic.container.proxy.internal.remote.WorkSessionProxyBuilder$WorkSessionStubHelper.getService(Unknown Source)
    at com.crystaldecisions.enterprise.ocaframework.ManagedService.validate(ManagedService.java:771)
    at com.crystaldecisions.enterprise.ocaframework.ManagedSession.validateStatelessService(ManagedSession.java:611)
    at com.crystaldecisions.enterprise.ocaframework.ManagedSession.newService(ManagedSession.java:983)
    at com.crystaldecisions.enterprise.ocaframework.ManagedSession.get(ManagedSession.java:256)
    at com.crystaldecisions.enterprise.ocaframework.ManagedSessions.get(ManagedSessions.java:299)
    at com.crystaldecisions.enterprise.ocaframework.ServiceMgr.getManagedService_aroundBody4(ServiceMgr.java:520)
    at com.crystaldecisions.enterprise.ocaframework.ServiceMgr.getManagedService_aroundBody5$advice(ServiceMgr.java:512)
    at com.crystaldecisions.enterprise.ocaframework.ServiceMgr.getManagedService(ServiceMgr.java:1)
    at com.businessobjects.corba.generic.container.proxy.internal.remote.WorkSessionProxyBuilder.findManagedService(Unknown Source)
    at com.businessobjects.corba.generic.container.proxy.internal.remote.WorkSessionProxyBuilder.connect(Unknown Source)
    at com.businessobjects.corba.generic.container.proxy.internal.remote.WorkEntityFactory.getWorkSessionProxy(Unknown Source)
    at com.businessobjects.corba.generic.container.proxy.internal.remote.RemoteGenericContainerProxy.getSessionProxy(Unknown Source)
    at com.businessobjects.corba.generic.container.proxy.internal.remote.RemoteGenericContainerProxy.getSessionProxy(Unknown Source)
    at com.businessobjects.corba.generic.container.proxy.internal.remote.RemoteGenericContainerProxy.getSessionProxy(Unknown Source)
    at com.businessobjects.corba.generic.container.proxy.internal.remote.RemoteGenericContainerProxy.getEntityProxy(Unknown Source)
    at com.businessobjects.sdk.core.server.internal.corba.AbstractServerConnector.init(AbstractServerConnector.java:86)
    at com.businessobjects.rebean.wi.newserver.WebiServerConnector.init(WebiServerConnector.java:79)
    at com.businessobjects.sdk.core.server.internal.corba.CorbaServerContext.init(CorbaServerContext.java:65)
    at com.businessobjects.sdk.core.server.internal.corba.CorbaServerImpl.createServerContext(CorbaServerImpl.java:53)
    at com.businessobjects.sdk.core.server.internal.AbstractServer.init(AbstractServer.java:69)
    at com.businessobjects.sdk.core.server.internal.InstanceServer.init(InstanceServer.java:73)
    at com.businessobjects.sdk.core.server.internal.InstanceServerServiceImpl.createServer(InstanceServerServiceImpl.java:90)
    at com.businessobjects.rebean.wi.impl.services.DocumentInstanceManagementServiceImpl.createServerCallerReader(DocumentInstanceManagementServiceImpl.java:764)
    at com.businessobjects.rebean.wi.impl.services.DocumentInstanceManagementServiceImpl.openDocument(DocumentInstanceManagementServiceImpl.java:157)
    at com.businessobjects.rebean.wi.impl.services.DocumentInstanceManagementServiceImpl.openDocument(DocumentInstanceManagementServiceImpl.java:80)
    at com.businessobjects.rebean.wi.internal.WIReportEngine.openDocument(WIReportEngine.java:429)
    at com.businessobjects.rebean.wi.internal.WIReportEngine.openDocument(WIReportEngine.java:438)
    at com.weishu.platform.datasource.bo4.services.impl.BOE4AccessServiceImpl.toMetadata(BOE4AccessServiceImpl.java:132)
    at com.weishu.platform.datasource.bo4.services.impl.BOE4AccessServiceImpl.toMetadatas(BOE4AccessServiceImpl.java:78)
    at com.weishu.platform.datasource.bo4.services.impl.BOE4AccessServiceImpl.listMetadata(BOE4AccessServiceImpl.java:70)
    at com.weishu.platform.datasource.bo4.BOE4Accesser.listMetadatas(BOE4Accesser.java:101)
    at com.weishu.platform.datasource.bo4.BOE4Accesser.doTestListDocument(BOE4Accesser.java:180)
    at com.weishu.platform.datasource.bo4.BOE4Accesser.main(BOE4Accesser.java:212)

    Like

    Reply
  13. Prathima

    Hi dmytro,

    Is it possible to extract the metadata of a webi report from the BOBJ server 4.1 like header and footer details ,query, data providers, table and chart details using SDK. I have another doubt that is it possible to extract or save crystal report .rpt files from BOBJ server 3.1 to local as .rpt file itself.

    Like

    Reply
  14. Maciej

    Hi,

    Where did you found adv_ivcdzview.jar? I have BO Client Tools 4.0 but I cannot find that one 😦

    Many thanks

    Like

    Reply
    1. dmytro Post author

      It is on the server in the folder C:\Program Files (x86)\SAP BusinessObjects\Tomcat6\webapps\BOE\WEB-INF\eclipse\plugins\webpath.AnalyticalReporting\web\WEB-INF\lib\

      Like

      Reply
  15. Pavan

    Out of many sites I visited, your site is very helpful dmytro. Thanks for helping us.
    I have a quick doubt, Im trying to reschedule a report using BO SDK
    I have written code in many ways but nothing worked 😦
    Below is the sample code:

    What is happening here is, report is getting scheduled but it is not sending mail/attachment unlike the original schedule instance.
    Below are the details of the rescheduled instance

    Title: SDK_TEST
    Document Type: Web Intelligence Report
    Status Success
    Destination: Default
    Owner: ****
    Creation Time: 5/15/2014 1:53 AM
    Start Time: 5/15/2014 1:53 AM
    End Time: 5/15/2014 1:53 AM
    Duration: 3 sec
    Server Used: mdwnew.AdaptiveJobServer
    PID: 27131966
    Parent Object Path: **********
    Remote Instance in Federated Cluster: No
    Expiry: 5/15/2024 1:53 AM
    Formats: Web Intelligence

    Now my doubt is can we reschedule the report directly or we need to get all the scheduling info like from/to/events etc and then apply them for the new schedule? I think it will be a tedious job as it could be SMTP or FTP or inbox or anything.

    Like

    Reply
  16. Pavan

    I think the snippet got removed

    Can you please tell me where am going wrong, or if you have code alredy that would be very much helpful Dmytro

    Like

    Reply
  17. Mohit

    Subject : Need to fetch Universe Name
    Hi Dmytro,

    I have migrated my BO reporting code from XR2 to XI4 and now using RestFul SDK 4 APIs to fetch the reports.

    Problem in below Code:

    ReportEngine repEng;
    DocumentInstance wiDoc = repEng.openDocument (si_id);
    Properties p = checkProperties
    (wiDoc.getProperties());
    queryList = new ArrayList();

    int providerCount =
    wiDoc.getDataProviders().getCount();

    DataProvider oDataProvider = null;
    for (int m = 0; m < providerCount; m++) {
    oDataProvider =
    wiDoc.getDataProviders().getItem(m);
    queryName = oDataProvider.getName ();
    logger.debug("queryName=" +
    queryName);
    logger.debug("dataprovider:" +
    oDataProvider.toString());
    logger.debug("datasource:" +
    oDataProvider.getDataSource().toString());
    universeName =
    oDataProvider.getDataSource().getLongName();
    queryData = new QueryData
    (queryName, universeName);
    queryList.add(queryData);
    }
    On SDK 2 above code works fine but If I use the above code with RestFul SDK 4 then I get below error.

    com.businessobjects.sdk.core.exception.common.NotImplementedException: This feature is not implemented. (Error: RWI 00013)
    at com.businessobjects.sdk.core.exception.ExceptionBuilder.make(
    ExceptionBuilder.java:152)
    at com.businessobjects.sdk.core.exception.ExceptionBuilder.make(
    ExceptionBuilder.java:123)
    at com.businessobjects.rebean.wi.internal.ds.WIDataSource.getLongName
    (WIDataSource.java:82)
    at com.newedgeusa.rboh.tool.BOBroker.getBoObjectReportsXI4(
    BOBroker.java:481)
    at com.newedgeusa.rboh.tool.BoObjectReportsXI4.doWork(
    BoObjectReportsXI4.java:18)
    at com.newedgeusa.rboh.tool.Main.start(Main.java:67)
    at com.newedgeusa.rboh.tool.Main.main(Main.java:29)

    Question: How can I fetch universe name using RestFul API, when I make request and get the XML result it does not return me UNIVERSE NAME.

    Please help me out, really urgent.

    Thanks,
    Mohit

    Like

    Reply
    1. Rakhy

      Hi Mohit,

      Any luck in fetching the universe name? I am trying to read data from a webi report, even I am getting This feature is not implemented. (Error: RWI 00013) exception. Looks like it is not implemented in XI 4.1 version! Please do let me know if you have any suggestions.

      Regards,
      Rakhy.

      Like

      Reply
  18. arun

    Hello, Your SDK are very useful, currently am working with Java SDK BI 4.1. I have Authendication problem though secWnAD for the below code.
    ISessionMgr sessionMgr = CrystalEnterprise.getSessionMgr();
    enterpriseSession = sessionMgr.logon(“arajan”,”July2014″, “pidwbob001”, “secWinAD”);
    Error:

    Caused by: java.io.IOException: Unable to locate a login configuration
    at com.sun.security.auth.login.ConfigFile.init(Unknown Source)

    when i tried the same through VBA I am not getting any error for authendication.

    Kindly help me.

    Like

    Reply

Leave a Reply to jessica Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s