Business Intelligence – Oracle

Customizing OBI EE – SOAP API

Posted by Venkatakrishnan J on July 31, 2007

As I was writing my blog yesterday on using URL parameters as a customizing option, it made me think about the availability of open API’s for OBI EE. As luck would have it, I had some time yesterday to work on the API’s and this blog is a result of that. In this article, we would be seeing how to use SOAP API of OBI EE from JDeveloper.  One of the major advantages of OBI EE is that it opens itself for developers in the form of standard API’s. Almost all the functionality is exposed and it would enable customers to use these API’s within their application code sets and thereby enabling complete integration. Here, we would basically be seeing how to go about using the SawSession service and the HtmlViewService to view a simple report. The SawSession service helps is maintaining sessions & authentication. The HtmlViewService helps in actually extracting the layout of a report. The SOAP API works on the WSDL implementation within OBI EE. If you navigate to http://localhost:port/analytics/saw.dll?WSDL one can obtain the WSDL schema information.  

One can use the Mindreef SoapSCOPE evaluation copy to go through the WSDL.

                                  obiee_soap.jpg

                                  obiee2_soap.jpg

One can test each of the invoking methods using this. But the only major problem with this evaluation copy is that you cannot maintain session state. Hence it would be difficult to test all the methods available. Now lets look at the various services that are available. 

1.                  Security Service

2.                  Ibot Service

3.                  Web Catalog Service

4.                  Replication Service

5.                  Metadata Service

6.                  ReportEditing Service

7.                  HTMLView Service

8.                  XMLView Service

9.                  SAWSession Service 

Security Service:          This service helps in identifying the user priveleges. One can assign, revoke privileges using Security Services. 

Ibot Service:            As the name suggests, this is a service for invoking Ibots. 

Web Catalog Service:          This service is for managing the web catalog.

Replication Service:                  This service is used for replication. Export/Import of catalogs can be done using this. 

Metadata Service:          This is for managing the BI Server metadata. 

ReportEditing Service:          This service is used to merge arguments and Oracle BI Web Services data to create and return the results. 

HTMLView Service:                  This service is used to embed Oracle BI HTML results in third-party dynamic Web pages, such as Active Server Pages (ASP) or JavaServer Pages (JSP), and portal frameworks. The embed process merges Oracle BI Web Services content with the content of third-party Web pages. 

XMLView Service:                  This is used for retrieving the data from Oracle BI EE Server in the form of XML. 

SAWSession Service:          This is the service that would enable users to login, logout and maintain sessions. Now lets see how we can go about using these services from within Jdeveloper to create a sample custom report. 

1.       Open Jdeveloper and create a new application. (With no templates)

                                    obiee3.jpg 

2.       Create a new Package within the Applcation.

                                    obiee4.jpg

Use Web Service Proxy technology to create it.

                                    obiee5.jpg  

Invoke all the methods that you need. In our example, we will be including the SAWSession service, the HTMLView Service and the XMLView Service.  

3.       The next step is to create an object for SAWSession Service and invoke the logon method.           

For example,

soaptest.SAWSessionServiceSoapClient myPort = new soaptest.SAWSessionServiceSoapClient();                   

sessionID = myPort.logon(“Administrator”,”Administrator”);          

This would create a session. 

4.       Once a session is created, the next step is to create a pageID for that session. A page is nothing but an entire html page that might contain multiple reports. This uses the HTMLView Service.          

For example,

soaptest.HtmlViewServiceClient htmlClient = new soaptest.HtmlViewServiceClient();                   

pageID = htmlClient.startPage(newPage,sessionID); 

5.       After creating the pageID, create multiple report Ids that you would like to associate with  a pageID.          

For example,                   

htmlClient.addReportToPage(pageID, reportID, newreportRef, null, null, null, sessionID);                    

Here, newreportRef uses a Reference structure like this                    

ReportRef newreportRef = new ReportRef();           

newreportRef.reportPath = reportPath;                     

newreportRef.reportXml = reportXML;               

For specifying a report one would have to specify 2 values. One is the report path and the other is the report definition. Both can be obtained from the report definition properties.

 

 

                               obiee6.jpg

 

5. Once this done the next step is to generate html output for the report.          

For example,

htmlOutput = htmlClient.getHtmlForReport(pageID, reportID, sessionID); 

For future reference, I have uploaded the entire code here. One can use this for reference. This just shows the extensibility of OBI EE. Also, one can call BPEL processes from within BI EE to make educated business decisions. Mark Rittman has already blogged about that here. Interesting post considering the fact it is gaining more and more traction in the customer environments. I just had a customer who had this query and i was more than happy to direct them to Mark’s blog just to give them an idea and of course the documentation. The power of community is so good in this regard and it has helped me out a lot of times. If you want to know more about the open API’s they are available here. Just in case you want to do the same with BI Publisher they are available here. You might want to check out this blog by Vlamis and his team for giving out excellent articles on OLAP and DW in general. Also, if you are passionate about discoverer check out Michael Armstrong-Smith‘s blog.

About these ads

63 Responses to “Customizing OBI EE – SOAP API”

  1. Alexander said

    Hi, thanx for useful blogging.
    Looks that you’re more experiensed in OBI than me, i got a Q to ask: I’m trying to use SOAP API to embed OBI report to another webapp’s page (via HTMLViewService as you described). Everithing is OK, but all interactive report’s elements (such as drill down links, piviot table paging, etc..) are corrupted. My guess, this happend becoz authentication session (SAWSession logon) didn’t passed from server to client side, so any request from web browser to bridge looks like:
    appserver.com:80 192.168.221.5 – – [26/Jul/2007:16:40:53 +0500] “POST /bridge?RedirectURL=saw.dll%3fNoAuthGo HTTP/1.1″ 400 – 0 “http://appserver:8080/oracbiee/report1.php” “Mozilla/5.0 (X11; U; Linux i686; ru; rv:1.8.1.5) Gecko/20070713 Firefox/2.0.0.5″ “- – -” “- -”
    I totaly stuck with it. Do you have any suggestions?

  2. Venkatakrishnan J said

    Hi Alexander. Thanks for your comments. Can you try extracting the logical sql query part by using the generateReportSQL method of the reportEditng service? If you are able to get the sql back, then i believe its not an issue with session maintanence. But if you are not able to get back the sql, can you try using the keepAlive method of SAWSession service. This way we can ensure that the session does not get timed out.

    • rew said

      Venkatakrishnan ,

      1) The technique (classes generation) works fine in JDeveloper 10.1.3.4 (not in Jdev 11g)
      2) Why do we need to do all those steps if OBIEE already has all needed classes (except Clients wrappers) just in few OracleBI subfolders
      3) Why do I need setBridge if my java standalone application is on the same server with OBIEE (per documentation it is “helpful” but not mandatory)
      4) I have read BI docs THREE times. I could not get HTML service to work.

      Eventually : Could you please just copy single line of code for setBridge method parameters (FIRST one) as you would run BI server on http://localhost:9704/analytics (complete installation) on Windows XP. I run OC4J over there. If there is something specific to the environment like (Linux/Windows/OC4J/Oracle APP Server 10g/Weblogic/Tomcat) PLEASE PLEASE PLEASE explain every component of the URL (setBridge method parameters (FIRST one))

      Appreciate your help beforehand.

      P.S. Remember…. our businesses depend on how clear and complete are YOUR explanations !!!!!!!!!!!! )))))))))))))))))))))))

  3. Alexander said

    I can invoke almost any method of OBI SOAP API via SOAP client deployed on my appserver without errors. But what happend when user (who even doesen’t know about OBI existence) got my custom webpage with OBI report embedded and then clicks on drill down link? I think it’s simple HTTP POST (log entry from prev. message) request from *browser*. But how can that Javascript engine on client side (which generates that HTTP POST) should obtain auth session identity from my SOAP client which is olny already authenticated?
    P.S. keepAlive() didn’t help either :(

  4. Venkatakrishnan J said

    Apologies for the delay. Was out on a week long vacation. Can you let me know whether the issue is only with the drill paths or are they for the entire report. I mean, can you render your report completely without having the drill downs at all?

  5. Alexander said

    Hello again. Yes a can render any report and it looks well. Drills and paging buttons also presents but not works properly (whole report just collapses when user clicks on it) . :(

  6. Richard said

    Very nice blog.
    Iam trying to get my hands wet on OBI integration with a Web service
    and facing bottlenecks.
    Iam able to retreive the BodyHtml and HeaderHTML string from the Soap API call
    but when i put these together on HTML page a blank page is displayed.

    I tried stripping the IFRAME src from getHtmlForReport() method and run it in a browser still nothing ..
    SRC=”http://XXXX/analytics/saw.dll?HtmlSoapGetReport&NQID=r63m6q0o29k1p0po36e1b7qnfu7qadvq2s3krvizOr07UFe9W00&SearchID=1r81h804oeq6ht01f1q7edg7de&ReportID=m%3aportlet%7er%3aDev”

    If i do a view source i can see the rport Data embedded with the meta data.
    Any help is appreciated.

  7. Alexander said

    Oh It’s kinda forum! :)..
    2Richard: do you have bridge script properly configured?

  8. Richard said

    Alexander. Thanks for the response.
    I am novice to Oracel BI :)
    In my setup the Web application and OBI are running on a different machines.

    Iam trying to run the IFRAME URL generated by the Soap call to HTMLOutput web method.
    So iam running the following URL directly in the browser .. http://XXXX/analytics/saw.dll?HtmlSoapGetReport&NQID=r63m6q0o29k1p0po36e1b7qnfu7qadvq2s3krvizOr07UFe9W00&SearchID=1r81h804oeq6ht01f1q7edg7de&ReportID=m%3apoSSS”
    iam getting the complete data on the page ( checked through ‘View Source’ on browser.) but the data is not displayed on screen. :(

    I think my next step would be to setup the Bridge using Stebridge to view the content within my web App right?
    I might be totally off on this.

  9. Venkatakrishnan J said

    @Richard – Alexander is right. You need to set up the bridge since you have the BI Web Service and the calling web server on different machines.
    @Alexander – Can you check the ReportHTMLOptions Structure? You have a structure called ReportHTMLLinksMode that can set the drill links.

  10. Dev Vinod said

    Iam trying to integrate a BI report onto my cust application running on two different servers.
    Iam getting access denied error when the Client HTML’s IFrame’s document object is being accessed
    by the Javascript located at the OBI server.
    On further checking i found IE 4 and above does not allow cross site scripting.
    http://support.microsoft.com/kb/167796

    I ran the same HTML file in Netscape . It works there.
    From all the posts out here i feel everyone is running on Mozilla ..Has ayone run this IE?

  11. Dev Vinod said

    Alexander,
    Could you tell me how i should be setting up the bridge scripts?

    Any inputs is appreciated.
    Have already spent a lot of time to figure this out :(

    Thanks

  12. Venkatakrishnan J said

    I believe it is documented in detail in the web services guide. Is there any step from which you are not able to move forward? Or can you let me know what is the issue that you are facing?

  13. daniel said

    Hi.
    It’s a very interesting post. Do you think the Answers tooltip functionality (displaying descriptions set on the Presentation layer) can be duplicated or made available in Dashboards using SOAP calls?

  14. majendi said

    Venkat

    Have you ever tried to get APEX to call an OBIEE web service?

    Adrian

  15. Venkatakrishnan J said

    Yes Adrian. I have tried that before. We cannot use OBI EE SOAP APIs directly within APEX since OBI EE SOAP APIs has multiple SOAP bindings. It will give you an error. BI Publisher APIs will work just fine since it has only one SOAP binding but not OBI EE.

    Venkat

  16. Tina said

    Hi,Venkatakrishnan
    I encounter the same problem as Richard’s.
    I have set the bridge using htmlClient.setBridge(“http://myserver:9704/analytics/sawbridge”,sessionID);
    Problem still exist.
    Even when i re-deploy my apps on the same server as BI Presentation Server,problem the same.
    I am wondering that,even cannot we visit sawbridge thru http://myserver:9704/analytics/sawbridge,how can the setBridge work?

    Regards,
    Tina

  17. Sandeep Singhal said

    I have the same problem as Tina. My code is giving an access denied error when I integrate the HTML received from oracle SOAP APIs. Anyone knows a workaround ?

    – Sandeep

  18. phatfield said

    Hello,

    I was wondering where you add the code to set session variable values for the report you are embedding in another application. I am doing something similar to what you describe but I need to also set some values for some pre-created Session Variables within the BI Server RPD. I need those values updated by each user and I have checked that feature on in the variable definition. I don’t want to look up the value in a database so I have disabled the initialization block associated with that Variable and want the user session to update the variable value from another Java application that will maintain the session. What does that syntax look like to set the variable value and where do I put it? Thanks for any guidance on this.

  19. Sudhir said

    Hi,Venkatakrishnan

    Very useful blog. I am trying to use XMLViewService.getResults api. I was successful in getting a report result in xml format without providing any filter/ params. However, when I tried to use ReportParams it fails. I get either failed to generate xml or Assertion failure. Any suggestions, like the format of the params I should use.

    Thanks
    Sudhir

    • Brandt said

      Did anyone ever get an answer to this (regarding using the ReportParams object)? There is NO documentation anywhere that describes how to construct filter expressions for the ReportParam object.

      I’ve made this work using the variables portion of the object, but that isn’t a viable solution as it appears to be incompatible when the same column “is prompted” or is even using a specific filter.

      Suggestions, examples, anything would be welcome. Thanks!

      Brandt

      • Bruce said

        Here is the syntax for a filterExpression. Holy, Gamole, how were we ever supposed to figure that out from the documentation!!! Fortunately, my company has a Metalink account and I found a doc on the syntax.

        $filterExpression = ” .
        ‘ Channels.”Channel Type”‘ .
        ‘ display’ .
        ”;

      • Bruce said

        Trying again as the filterExpression is an XML string and got eaten.

        
          $filterExpression = '' .
                              ' Channels."Channel Type"' .
                              ' display' .
                              '';
        
        
      • Bruce said

        $filterExpression = ‘<sawx:expr xsi:type=”sawx:list” op=”beginsWith” ‘ .
        ‘ xmlns:saw=”com.siebel.analytics.web/report/v1″ ‘ .
        ‘ xmlns:sawx=”com.siebel.analytics.web/expression/v1″ ‘ .
        ‘ xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” ‘ .
        ‘ xmlns:xsd=”http://www.w3.org/2001/XMLSchema”>’ .
        ‘ <sawx:expr xsi:type=”sawx:sqlExpression”>Channels.”Channel Type”&lt/sawx:expr&gt’ .
        ‘ &ltsawx:expr xsi:type=”xsd:string”>display&lt/sawx:expr&gt’ .
        ‘&lt/sawx:expr&gt';

    • siva said

      Hi Sudir,

      I am desperatly looking for sample code to use XMLViewService api and its methods. Can you please provide some sample code which get the query results.

      Thanks
      siva

  20. Angelo Gonzalez said

    Hi,Venkatakrishnan

    How can i make the bridge script properly and configured it?

    Thank you

    PD: PD: Please help me with this i found your blog and i think that is very helpful

    Regards,
    Angelo

  21. Rajan said

    Hi Sudhir:

    Could you please share the code for XMLViewService.getResults API?I am getting an error.

    Venkatakrishnan/ All: As per your example, I am getting the mypage1.htm with a IFRAME but it is EMPTY.

    Any suggestions ?

  22. Riz said

    Venkat,

    Once OBIEE (10.1.3.2.0) has been deployed using advanced option (using Oracle HTTP Server 10.1.3.1.0) is it possible to stop the HTTP Server and still make use of Web Services?

    Thanks,

    Riz

  23. Saj said

    Can you help in passing parameters to filter out data from an Answers request.
    Ex:

    arr(0) = “Customers.’Country Region’=Americas”
    rp.filterExpressions = arr

    The webservice fails on calling getResults function.
    Thanks in Advance

  24. sam said

    Hi,
    am using LR to run these APIs. In addReportToPage API what should i pass to reportid ? Which API gives reportid?
    I got pageid and sessionid from startPage and logon().
    When i hit the SAW url the reportid is a dynamic values which is set by server.

    Thanks

  25. sam said

    Hey am able to move forward from reportid issue. i just gave a reportname and its fine.
    But in LR am not able to add the report definition which i got it from BI.The report definition is xml and in LR the place where am adding it is not getting reflected there.

  26. Qiu said

    I am trying to embed BI report in the web application of our webserver. I call web service api getHtmlForReport to get the html content in a ifram. However, the most of resource links (javascript and css) are prefixed with “Missing_”, for example Missing “Missing_browserdom.js”. The following is begining part of html return back from the service proxy. Could you give me some suggestion to get the resource links returned correctly? Thanks.
    ===============

    function sawFixupPrefix(sPrefix,s) { return sPrefix.replace(‘__xyz__’,s); }
    function sawCommandToURLImpl(s, bFull) { var sPrefix=”http://10.139.135.135:9704/analytics/saw.dll?__xyz__&_scid=32eZ660i7DM”;
    if (bFull && sPrefix.indexOf(‘http’) > 0) return document.location.href.substring(0, document.location.href.indexOf(‘sPrefix’)) + sawFixupPrefix(sPrefix,s);
    else return sawFixupPrefix(sPrefix,s); }
    function restrictLength(field, maxlimit) { if (field.value.length > maxlimit) { field.value = field.value.substring(0, maxlimit); } }
    var sawEmptyHtm = “http://10.139.135.135:9704/analytics/res/empty.htm”;
    var g_LocaleInfo = {sDateSeparator:”/”,sTimeSeparator:”:”,sDecimalPoint:”.”,sThousandsSeparator:”,”,sAM:”AM”,sPM:”PM”,b24:false,sDateOrder:”mdy”,nYearPadding:4,nMonthPadding:2,nDayPadding:2,nHourPadding:2,sListSeparator:”,”};

  27. Qiu said

    By adding useragent setting, I can get rid of “Missing_” prefix problem in url. I added my bridge servelet on our server side to convert all rewriten URL for resource and servlet to url connection with “get” request method. By now, I am able to see embeded BI report in our web application. However, when I try to drill into any report, I get “Access Prohibited” page from BI. When I look into the url send over to the BI server from my bridge for dill-in action, I noticed there is “NoAuthGo” part in url(see following). I am wondering what I should do to reslove this problem.

    http://10.139.135.135:9704/analytics/saw.dll?NoAuthGo&_scid=4YMfDATmUA8&P1=0&Action=drill&ContainerID=m:portlet~r:myreport&GenerateForDiv=myreport&P0=0&P2=CENTRAL REGION&ViewName=&StateAction=&ViewState=9r60r9n8rk0h2vsds14jgasvgm&icharset=utf-8&ViewID=m:portlet~r:myreport~v:compoundView!1~v:staticchart!1&NQID=h2h507iej8djt1k93n35oua93uglolrgorh0vh2zOr07UFe9W00&P3=&PivotAllPages=notallpages

  28. shaun said

    Has anyone been able to figure out how to implement bridge page that is so “CLEARLY” documented in the Webservice guide and according to:

    “Venkatakrishnan J Says: August 28, 2007 at 12:12 pm. I believe it is documented in detail in the web services guide”

    I hate stupid ppl that make comments to refer to “documentation”. We’re all here because the documentation has failed miserably!

    -shaun

  29. Ranjai said

    Hi,
    A lot of the services are using the ReportParams structure. The ReportParams has an array of filteredexpressions. Does anybody know what is the format for filterexpressions?

    • Brandt said

      Repeating what I asked above…has anyone answered this question yet?

      Does anybody have ANY examples using filterexpressions?

      Thanks.

      • Bruce said

        $filterExpression = ‘<sawx:expr xsi:type=”sawx:list” op=”beginsWith” ‘ .
        ‘ xmlns:saw=”com.siebel.analytics.web/report/v1″ ‘ .
        ‘ xmlns:sawx=”com.siebel.analytics.web/expression/v1″ ‘ .
        ‘ xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” ‘ .
        ‘ xmlns:xsd=”http://www.w3.org/2001/XMLSchema”>’ .
        ‘ <sawx:expr xsi:type=”sawx:sqlExpression”>Channels.”Channel Type”</sawx:expr>’ .
        ‘ <sawx:expr xsi:type=”xsd:string”>display</sawx:expr>’ .
        ‘</sawx:expr>';

      • Bruce said

        The documentation now makes sense :)

        From http://download.oracle.com/docs/cd/E12096_01/books/AnyWebServ/AnyWebServ_Structures20.html#wp1019667.

        1 Obtains XML representations of the report and each filter expression.

        2 For each expression element, locates the child node of the type sqlExpression (the type is determined by the value of the xsi:type attribute), and references its inner text.

        3 In the report XML, locates all nodes that also have a child node of type sqlExpression where the inner text matches that located in the preceding step.

        4 Replaces all nodes found in Step 3 with the expression from Step 2.

      • Bruce said

        The other way to find out about filter expression is to create a request in Answers that contains a filter. Then go to the Advanced tab and view the Request XML. You will see a section entitled saw:filter.

        <saw:filter subjectArea=”Clickstream”>
        <sawx:expr xsi:type=”sawx:comparison” op=”equal”>
        <sawx:expr xsi:type=”sawx:sqlExpression”>Makes.Make</sawx:expr>
        <sawx:expr xsi:type=”xsd:string”> buick</sawx:expr></sawx:expr></saw:filter>

      • Bruce said

        I successfully wrote a PHP web service client and traced the SOAP message that it was sending along. From this I learned that the filterExpression is an XML Twig that needs to be wrapped in a CDATA tag to keep it from being parsed. So take the example from 9:48 and wrap it in a CDATA tag and all should be well.

  30. Qiu said

    We did impletment a bridge on our own.(really no good documentation to reference) You need call setBridge first to pass in your own sevlet URI to BI server. Then the BI server will rewrite all the URL return back from the BI Server. However, for some reason, we only get it work in IE but not in Firefox(only get text back but not graphic). Hope you can help me to get this code to work in Firefox as well. Besides, does anyone know if it is possiable to use getHtmlForReport againest Dashboard page or see BI alert through web service anyway. For the question for filter xml. please see the bottom my post for an example. We got it to work as well. Basically, you need to look at the advanced tab in BI answear to figure out the detail for each type of filter operator.
    private void redirect(HttpServletRequest request,
    HttpServletResponse response)
    {
    String relatedtUrl = request.getParameter(“RedirectURL”);
    StringBuffer url =
    new StringBuffer(“http://…..:9704/analytics/” +
    relatedtUrl);

    Map parameterMap = request.getParameterMap();
    for (Iterator iterator = parameterMap.keySet().iterator();
    iterator.hasNext(); )
    {
    String parameterName = (String) iterator.next();
    String[] parameterValues =
    (String[]) parameterMap.get(parameterName);
    if (parameterValues != null && parameterValues.length > 0)
    {
    if (parameterName.equals(“RedirectURL”))
    continue;
    for (int i = 0; i < parameterValues.length; i++)
    {
    url.append(“&”);
    url.append(parameterName);
    url.append(“=”);
    String value = “”;
    try
    {
    value = URLEncoder.encode(parameterValues[i], “UTF-8″);
    }
    catch (UnsupportedEncodingException e)
    {
    e.printStackTrace();
    }
    url.append(value);
    }
    }
    }

    try
    {
    URL urlconn = new URL(url.toString());
    URLConnection httpConnection = urlconn.openConnection();
    ((HttpURLConnection) httpConnection).setRequestMethod(“GET”);
    httpConnection.setDoOutput(true);
    httpConnection.setDoInput(true); //Only if you expect to read a response…
    httpConnection.setUseCaches(false); //Highly recommended…
    httpConnection.setRequestProperty(“Content-Type”, “binary/data”);
    httpConnection.setRequestProperty(“User-Agent”,
    request.getHeader(“USER-AGENT”));
    InputStream in = httpConnection.getInputStream();
    ServletOutputStream out = response.getOutputStream();
    byte buffer1[] = new byte[1024 * 128];
    int k = 0;
    while ((k = in.read(buffer1)) != -1)
    {
    out.write(buffer1, 0, k);
    }
    in.close();
    out.close();
    ((HttpURLConnection) httpConnection).disconnect();
    }
    catch (Exception e)
    {
    e.printStackTrace();
    }
    ======
    Products.\”Supplier Code\”1300

    • venkat said

      Qiu ,

      We are facing similar issue when we tried to display a report on the web page.We are getting blank page (in Firefox and IE) but when we checked in firefox we are seeing data (in the html body) in the firebug.Could please suggest what might be wrong?

      Venkat

  31. Qiu said

    It looks I can not post xml without using htmlencoder first in this fourm. So send a email to me at qiuzhong@hotmail.com, if you need a sample xml piece for filter.

  32. Sanjay said

    We are trying to pull OBIEE web analytics report using htmlService. We are trying to analyze OBIEE out of box portlet. The problem we are facing is related to authentication. OBIEE is configured with LDAP and its provides basic auth challenge when you access any OBIEE report. Wanted to know if somebody has overcome this issue. I am able to pull report in the portlet with OBIEE login not when its configured with LDAP.

  33. Qiu said

    I am able to get web service to work againest OBIEE 10.1.3.3.3(basic security)without authernitcation error, but fail to get it complete work for OBIEE 10.1.3.4.(basic security) I am getting “Authentication error” exception for second web service call after successfully login through web service. Is it the same prolem that you are facing?

  34. Ataulla said

    We want to get the raw data from OBI and construct the html ourself. So we need to know the information about which columns can be drilled down, and then how to retrive the drill down data .

    We found we can leverages XmlViewService to get the xml data, however, it looks like the data doesn’t tell which column can be drilled down, and we are also stuck with how we can get the drill down xml data through XmlViewService …

    Is there a service that we can leverage to achieve what we want?

  35. [...] 2. Standard SOAP APIs. Entire BI EE is available to end users in the form of standard WSDL web services. One can call individual reports as well as dashboards using these standard WSDL’s. Check my blog entry here for an example http://oraclebizint.wordpress.com/2007/07/31/customizing-obi-ee-soap-api/ [...]

  36. Rohit said

    We have tried to get the HTMLViewService to work by following this example running into an issue. I successfully retrieve the HTML in order to display my report in a frame:


    The issue is that the resulting HTML returned is showing a blank page. The HTML source returned has several encoded tags like the following:

    DIV ID="divEncodedBody" style="display:none">
    & lt ;table class="ViewTable & quot; border=0 cellspacing=0 & gt ;
    & lt ; tr & gt ;

    Any help would be greatly appreciated.

  37. rew said

    Venkatakrishnan ,

    1) The technique (classes generation) works fine in JDeveloper 10.1.3.4 (not in Jdev 11g)
    2) Why do we need to do all those steps if OBIEE already has all needed classes (except Clients wrappers) just in few OracleBI subfolders
    3) Why do I need setBridge if my java standalone application is on the same server with OBIEE (per documentation it is “helpful” but not mandatory)
    4) I have read BI docs THREE times. I could not get HTML service to work.

    Eventually : Could you please just copy single line of code for setBridge method parameters (FIRST one) as you would run BI server on http://localhost:9704/analytics (complete installation) on Windows XP. I run OC4J over there. If there is something specific to the environment like (Linux/Windows/OC4J/Oracle APP Server 10g/Weblogic/Tocat) PLEASE PLEASE PLEASE explain every component of the URL (setBridge method parameters (FIRST one))

    Appreciate your help beforehand.

    P.S. Remember…. our businesses depend on how clear and complete are YOUR explanations !!!!!!!!!!!! )))))))))))))))))))))))

  38. frant said

    Hi,

    I’m trying to use SOAP API to create User/Group Account by using SecurityServiceSoap createAccount() method. And it does not work for me.
    I wander if somebody has the same problem.

    • rew said

      Hi,

      Have you solved the problem ?

      If yes, could you share the solution.

    • rew said

      I have solved it:

      SAWSessionServiceLocator ssl = new SAWSessionServiceLocator();
      SecurityServiceLocator sl = new SecurityServiceLocator();

      Account a1= new Account (“test111″,1);
      SAWSessionServiceSoap sss = ssl.getSAWSessionServiceSoap(new URL(“http://” + host + “/analytics/saw.dll?SoapImpl=nQSessionService”));

      String session_id = sss.logon(“super”, “password”);

      SecurityServiceSoap q1= sl.getSecurityServiceSoap(new URL(“http://” + host + “/analytics/saw.dll?SoapImpl=securityService”));
      q1.createAccount(a1,session_id);

      sss.logoff(session_id);

  39. Luca said

    Hi,

    I created a jsr168 portlet to get all report in catalog and a jsr168 portlet to view selected report from catalog. All work but, when i try to sort a column or try to filter report through combobox (for example demo report ‘Multi-Metrics Top Ns’) i receive this error:

    No Columns
    The request cannot be performed because it contains no columns.

    Have you idea how to solve this problem?

    Thanks in advance
    Luca

  40. Mani said

    Hi Venkat,

    I have followed the link http://oraclebizint.wordpress.com/2007/07/31/customizing-obi-ee-soap-api/ and managed to get the OBIEE Report on my webpage successfully without any Bridge Servlet(As my web application (Oracle Web Center Application) and obiee are in the same machine). This would be good, as far we are working on Development Environment. But for my production environment, we will be having the both instance(Web Center and OBIEE) in different machine. At that time, guess the Bridge Servlet is needed. I have the bridge servlet too, i tested the application using Bridge Servlet, I am able to get the report on my web page, when i am trying to access the links from report, i am getting (Java Script – Access Denied, Object not found, etc…)

    For your information, please find my application source.
    (My Jsp Page Content)
    try
    {
    SAWSessionServiceSoapClient myPort = new SAWSessionServiceSoapClient();
    HtmlViewServiceClient htmlClient = new HtmlViewServiceClient();

    StartPageParams newPage = new StartPageParams();
    ReportRef newreportRef = new ReportRef();
    ReportParams newreportParams = new ReportParams();
    ReportHTMLOptions newreportHTMLOptions = new ReportHTMLOptions();
    //newPage.dontUseHttpCookies = false;
    newPage.setDontUseHttpCookies(false);
    newPage.setIdsPrefix(“1″);
    //newPage.idsPrefix = “1”;

    String sessionID = new String();
    String pageID = new String();
    String reportID = new String();
    String htmlOutput = new String();
    int startIndex;
    int endIndex;
    String url = new String();

    ReportRef reportref = new ReportRef();
    reportref.setReportPath(“/shared/WebCenterTest/AwardTypeInfo”);
    StartPageParams startpageparams = new StartPageParams();
    startpageparams.setDontUseHttpCookies(false);

    SAWLocale sawlocale = new SAWLocale();
    sawlocale.setLanguage(request.getLocale().getLanguage());
    sawlocale.setCountry(request.getLocale().getCountry());
    SAWSessionParameters sessionparams = new SAWSessionParameters();
    sessionparams.setUserAgent(request.getHeader(“User-Agent”));
    sessionparams.setLocale(sawlocale);
    sessionparams.setAsyncLogon(false);

    ReportHTMLOptions htmlOptions=new ReportHTMLOptions();
    htmlOptions.setEnableDelayLoading(true);
    htmlOptions.setLinkMode(ReportHTMLLinksMode._InPlace);
    //htmlOptions.setLinkMode(ReportHTMLLinksMode._SamePage);

    //sessionID = myPort.logon(“Administrator”,”adminb1ee”);
    AuthResult result = myPort.logonex(“Administrator”,”Administrator”,sessionparams);
    String [] str1={sessionID};
    myPort.keepAlive(str1);
    sessionID = result.getSessionID();
    reportID = “Report1″; // this is user generated ID
    pageID = htmlClient.startPage(null, sessionID);

    // This method will set the path to the servlet which will act like a bridge to retrieve all the OBIEE resources like the javascript, CSS and the report.
    htmlClient.setBridge(request.getContextPath() + “/BridgeServlet”, sessionID);
    htmlClient.addReportToPage(pageID, reportID, reportref, null, null, htmlOptions, sessionID);

    //htmlClient.endPage(pageID,sessionID);

    //htmlClient.setMaintainSession(true);
    // For Page Header and Report
    String reportHtml = “”;
    reportHtml = htmlClient.getHeadersHtml(pageID,sessionID);
    reportHtml = reportHtml + htmlClient.getHtmlForReport(pageID,reportID,sessionID);
    reportHtml = reportHtml + htmlClient.getCommonBodyHtml(pageID,sessionID);

    out.println( reportHtml );
    }
    catch (Exception ex)
    {
    ex.printStackTrace();
    }

    ——————————–
    (My Bridge Servlet Content)

    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    {
    String relatedtUrl = request.getParameter(“RedirectURL”);
    //StringBuffer url = new StringBuffer(“http://host:port/analytics/” + relatedtUrl);
    StringBuffer url = new StringBuffer(relatedtUrl);

    Map parameterMap = request.getParameterMap();
    for (Iterator iterator = parameterMap.keySet().iterator(); iterator.hasNext(); )
    {
    String parameterName = (String) iterator.next();
    String[] parameterValues = (String[]) parameterMap.get(parameterName);
    if (parameterValues != null && parameterValues.length > 0)
    {
    if (parameterName.equals(“RedirectURL”))
    {
    continue;
    }

    for (int i = 0; i < parameterValues.length; i++)
    {
    url.append("&");
    url.append(parameterName);
    url.append("=");
    String value = "";
    try
    {
    value = URLEncoder.encode(parameterValues[i], "UTF-8");
    //value = URLDecoder.decode(parameterValues[i], "UTF-8");
    }
    catch (UnsupportedEncodingException e)
    {
    e.printStackTrace();
    }
    url.append(value);
    }
    }
    }

    try
    {
    URL urlconn = new URL(url.toString());
    URLConnection httpConnection = (URLConnection)urlconn.openConnection();
    ((HttpURLConnection) httpConnection).setRequestMethod("GET");
    httpConnection.setDoOutput(true);
    httpConnection.setDoInput(true); //Only if you expect to read a response…
    httpConnection.setUseCaches(false); //Highly recommended…
    httpConnection.setRequestProperty("Content-Type", "binary/data");
    httpConnection.setRequestProperty("User-Agent", request.getHeader("USER-AGENT"));
    InputStream in = (InputStream) httpConnection.getInputStream();
    ServletOutputStream out = response.getOutputStream();
    byte buffer1[] = new byte[1024 * 128];
    int k = 0;
    while ((k = in.read(buffer1)) != -1)
    {
    out.write(buffer1, 0, k);
    }
    in.close();
    out.close();
    ((HttpURLConnection) httpConnection).disconnect();
    }
    catch (Exception e)
    {
    e.printStackTrace();
    }
    }

    Could you please help me to get out of this, as i have been working for this issue since from long time.

    Regards
    Mani R

  41. Michael said

    Hi,
    I have the following problem:
    when I use the method “generateReportSQL” I receive the correct SQL of my Report.

    But in the Browser the report is not shown. It just says “Searching… To cancel, click here” (the same message that shows up in Answers, when your report is loading).
    But in the Browser this message is there forever, and in Answers the same report shows up within one second.

    Does anyone have an idea where the problem could be?

    Regards
    Michael

  42. Giovanni said

    Hi,

    first of all I want to congratulate for the blog; In these years I have always found interesting and helpful stuff.

    I have read this post about OBIEE and I would like to ask a simple question.

    I would like to know if it’s possible to browse the OBIEE catalogue, using the OBIEE webservices or some JAVA API.

    I show you a simple user flow that I would like to implement:

    1) OBIEE User log into my application (I guess I can use the webservice; I have already tried and it works)
    2) My application get all the dashboard, pages and reports that can be accessed by the user (I miss how to do it) and show them in some way (maybe a tree view or other kind of GUI).
    3) The user choose tha dashboard he wants to access, then the page and the report (this is something that will be managed by the GUI, once I will be able to get the information at the point 2).
    4) I can browse the report getting title, description, chart, result table…. (everything that is shown by the report) and provide to the user a way to choose what he wants to see (for example the chart, probably in png format with a proper setting of the instanceconfig.xml).

    So what I would like to do it’s just to provide another way to access the dashboard, but I really do not know how to find an API that allows me to do this.

    If someone can redirect me to some kind of documentation/tutorial could be great!

    Thanks a lot,

    Giovanni

    • Giovanni said

      Hi,

      at the end I was able to complete the step 2, but I am facing some problems when I try to get the HTML report.

      I think that I have missed the setBridge method bu I haven’t really understood what this method allows me to do.

      Anyhow, my issue is the following:
      once I build the html page I can see the gif image (the clock) loading, but nothing happens.

      I have used the following code:

      //Get Locale
      SAWLocale sawlocale = new SAWLocale();
      sawlocale.setLanguage(Locale.getDefault().getLanguage());
      sawlocale.setCountry(Locale.getDefault().getCountry());

      //Set session parameters
      SAWSessionParameters sessionParameters = new SAWSessionParameters();
      sessionParameters.setUserAgent( “Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB6; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648)” );
      sessionParameters.setLocale( sawlocale );
      sessionParameters.setAsyncLogon( false );

      //login
      SAWSessionServiceSoapClient myPort = new SAWSessionServiceSoapClient();
      myPort.setMaintainSession(true);
      String sessionID = myPort.logonex(“xxx”,”xxx”,sessionParameters).getSessionID();

      //Get report xml definition
      WebCatalogServiceSoapClient catalogClient = new WebCatalogServiceSoapClient();
      String xmlrep = catalogClient.readObject(“”,true,sessionID).getCatalogObject();

      //Set page params
      StartPageParams pgp = new StartPageParams();
      pgp.setDontUseHttpCookies(true);
      pgp.setIdsPrefix(“Pg”);

      //Set report
      ReportRef rr = new ReportRef ();
      rr.setReportPath(“”);
      rr.setReportXml(xmlrep);

      //create page
      HtmlViewServiceClient htmlClient = new HtmlViewServiceClient();
      String pageID = htmlClient.startPage(pgp,sessionID);
      htmlClient.addReportToPage(pageID,”report1″,rr,null,null, null,sessionID);

      //create html from page
      String header = htmlClient.getHeadersHtml(pageID,sessionID);
      String report = htmlClient.getHtmlForReport(pageID, “report1″,sessionID);
      String body = htmlClient.getCommonBodyHtml(pageID,sessionID);
      String html = “”+header+””+body+report+””;

      //Print out the code
      System.out.println(html);

      If I put the resulting html code in a .html file, I get no javascript or css errors, but the report does not load.

      Any suggestion?

      Thanks a lot,

      Giovanni

      • Giovanni said

        Just a correction: the instruction before the print out is the following (replacing the square brakets with the less than and great than)…
        String html = “[html][head]“+header+”[/head][body]“+body+report+”[/body][/html]“;

  43. praveen said

    How can i access access Control list from security service? Please provide code for reading acl’s and how to set privileges for those acl’s? Thanks in advance

  44. John Lee said

    Hai to all,
    Iam new to Oracle BI, Iam working on java and web services.
    1)My goal is i want to access the ACL of Oracle BI and set the permissions for those Access Control List(ACL).
    For this iam using wsdl file provided by OBI server from URL http://XX.XX.XX.XX:9704/analytics/saw.dll?wsdl. I created client stubs for accessing services using Apache AXIS, I had written a client program by using those generated stubs, here the problem is iam successfully logged on the server by using client by SAWSessionService.
    But i want to access the Access control list by using securityService(method ACL getGlobalPrivilegesACL),Please suggest me how to get and set the privileges and permissions for that logged user, if there is any java code please provide as early as possible.
    Thanks in advance for all,
    Regards,
    John Lee

  45. Josh said

    I figured out the ReportParams structure… you have to pass XML to the filter expression structure. Here is my C# code:

    string[] filter = new string[1];
    filter[0] = String.Format(@”Project.””Project Name””My Project”);

    ReportParams reportParams = new ReportParams();
    reportParams.filterExpressions = filter;

    — then you just have to pass reportParams into your HTMLViewService or XMLViewService method

Leave a 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 )

Google+ photo

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

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

Join 158 other followers

%d bloggers like this: