Siebel Analytics Web Administration Guide > Working with Data and Managing the Web Catalog Using Siebel Analytics Web SOAP API > Description of Siebel Analytics Web SOAP API Methods >

HtmlViewService


The HtmlViewService service embeds Siebel Analytics Web 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 Siebel Analytics Web content with the content of third-party Web pages.

HTML methods extract fragments of HTML code that can be inserted in third-party Web pages. Table 42 describes the HTML code excerpts and desired page locations.

Table 42. HTML Code Fragments and Page Locations for the HtmlViewService Service
HTML Code Fragment
Desired Page Location

Header

Should be inserted in the <HEAD> section of an HTML page. The code contains links to common JavaScript files and style sheets.

Report Objects

Can be inserted anywhere in the <BODY> section.

Common Body

Should be inserted in the <BODY> tag after all report links. The code contains hidden HTML elements that are used to implement drilldown links.

For each returned report object, the HTML code fragment contains a callback link that is followed automatically when the Web page is loaded by the browser. The code fragment does not contain the full user interface definition of the report. While the report is being constructed by Siebel Analytics Web, the user sees the Siebel Analytics Web "Searching..." image (the default image is a spinning arrow) embedded on the third-party Web page.

For smooth report transitioning, Siebel Analytics Web tracks the Analytics reports that have been added to a third-party Web page by maintaining information in an internal logical page object during the construction of the third-party Web page. The HtmlViewService service methods explicitly refer to the internal logical page by its ID.

About HtmlViewService Bridging and Callback URLs

To embed a report with active drilldown links, the HtmlViewService service allows the Web browser to issue callback requests from embedded reports to the Siebel Analytics Web server. Although it is possible to route requests directly to the Siebel Analytics Web server, in many cases it is preferable to route requests through the Web server that originally serviced the third-party page. Also, in situations where Siebel Analytics Web and the third-party Web server do not belong to the same Domain Name Service (DNS) domain, users may see JavaScript errors related to browser security constraints for cross-domain scripting.

To avoid these issues, use the setBridge() method to modify callback URLs to point to the third-party Web server. Be aware that a Web component executed by the third-party Web server to reroute requests to Siebel Analytics Web is not provided. This function would need to be fulfilled by the third-party application. For more information about the setBridge() method, see setBridge() Method.

Table 43 shows the supported methods for the HtmlViewService.

Table 43. HtmlViewService Methods
Method Name
Description

addReportToPage() Method

Adds results to an HTML page.

endPage() Method

Destroys a server page object and all data associated with it.

getCommonBodyHTML() Method

Gets HTML to include in the <BODY> section.

getHeadersHTML() Method

Gets HTML to include in the <HEAD> section.

getHTMLForReport() Method

Gets HTML to display a particular set of results.

setBridge() Method

Specifies a bridge URL to receive communications. Can be useful when the Siebel Analytics Web server and the user's Web server reside on different machines or when you want to modify the results in your application development environment.

startPage() Method

Creates a new page object and returns its ID.

addReportToPage() Method

The addReportToPage() method adds results to an HTML page.

Signature

void addReportToPage(String pageID, String reportID, ReportRef report, String reportViewName, ReportParams reportParams, ReportHTMLOptions options, String sessionID);

Arguments
Description

String pageID

A character string page ID returned by the startPage() method. For information about the startPage () method, see startPage() Method.

String reportID

A character string that identifies the report containing the results to add to the page. It should be used to reference this report in subsequent SOAP calls; for example, corresponding user interface elements generated by the Siebel Analytics Web server would reference the same ID.

ReportRef report

The report definition, supplied in the ReportRef structure.

For more information, see ReportRef Structure.

String reportViewName

The view to display. If this parameter is null, the report's default view is used. The view name should match the one used to identify the view in the report XML definition.

ReportParams reportParams

Optional. The filters or variables to apply to the report before execution, supplied in the ReportParams common structure.

For more information, see Description of Siebel Analytics Web SOAP API Methods.

ReportHTMLOptions options

Optional. The display options to apply to the report after execution, supplied in the ReportHTMLOptions structure. For more information, see ReportHTMLOptions Structure.

String sessionID

A character string that identifies the session ID. The session ID is usually returned by the logon call. If the SOAP client engine can handle HTTP cookies, you can omit the session ID or set it to null.

endPage() Method

The endPage() method destroys the Siebel Analytics Web server page object and all data associated with it.

Signature

void endpage(String pageID, String sessionID);

Arguments
Description

String pageID

A character string that contains the name of the page.

String sessionID

A character string that identifies the session ID. The session ID is usually returned by the logon call. If the SOAP client engine can handle HTTP cookies, you can omit the session ID or set it to null.

getCommonBodyHTML() Method

The getCommonBodyHTML() method gets HTML to include in the <BODY> section.

Signature

String getCommonBodyHTML(String pageID, String sessionID);

Arguments
Description

String pageID

A character string page ID returned by the startPage() method. For information about the startPage () method, see startPage() Method

String sessionID

A character string that identifies the session ID. The session ID is usually returned by the logon call. If the SOAP client engine can handle HTTP cookies, you can omit the session ID or set it to null.

Returns

Returns a string containing the HTML to include in the <BODY> section.

getHeadersHTML() Method

The getHeadersHTML() method gets HTML to include in the <HEAD> section.

Signature

String getHeadersHTML(String pageID, String sessionID);

Arguments
Description

String pageID

A character string page ID returned by the startPage() method. For information about the startPage () method, see startPage() Method.

String sessionID

A character string that identifies the session ID. The session ID is usually returned by the logon call. If the SOAP client engine can handle HTTP cookies, you can omit the session ID or set it to null.

Returns

Returns a string containing the HTML to include in the <HEAD> section.

getHTMLForReport() Method

The getHTMLForReport() method gets an HTML excerpt to display the results for a particular report. Before issuing this call, use the addReportToPage method to add the results to an HTML page.

Signature

String getHTMLForReport(String pageID, String pageReportID, String sessionID);

Arguments
Description

String pageID

A character string page ID returned by the startPage() method. For information about the startPage () method, see startPage() Method.

String pageReportID

A character string ID returned by the addReportToPage() method.

For information about the addReportToPage method, see addReportToPage() Method.

String sessionID

A character string that identifies the session ID. The session ID is usually returned by the logon call. If the SOAP client engine can handle HTTP cookies, you can omit the session ID or set it to null.

Returns

Returns a string containing the HTML excerpt that displays the specified report.

setBridge() Method

The setBridge() method specifies a bridge URL to receive communications. Specifying a bridge URL can be useful when the Siebel Analytics Web server and the user's Web server reside on different machines, or when you want to modify the results in your application development environment.

After the setBridge() method is called, all requests from the client browser to the Siebel Analytics Web server are sent to the bridge URL, which then forwards requests to the Siebel Analytics Web server.

Signature

void setBridge(String bridgeURL, String sessionID);

Arguments
Description

String bridgeURL

The bridge URL.

String sessionID

A character string that contains the session ID. The session ID is usually returned by the logon call. If the SOAP client engine can handle HTTP cookies, you can omit the session ID or set it to null.

Usage

You are responsible to make sure that the client browser provides a handler to the bridge URL in the form of a Java servlet, an Active Server Pages (ASP) page, a Common Gateway Interface (CGI), an Internet Server application programming interface (ISAPI), or an equivalent application.

You must also perform the following tasks:

  • Decode the path of the requested Siebel Analytics Web resource in the RedirectURL argument of the request character string. For information about the RedirectURL argument, see How Callback URLs Are Replaced.
  • Forward all other request arguments, together with all headers and the request body, to the bridge URL.
  • Copy the response from the Siebel Analytics Web server to the response stream.
How Callback URLs Are Replaced

The new callback URL is based on the bridge URL, with the addition of a RedirectURL argument. The value of the RedirectURL argument should be the original value of the URL, encoded using standard URL encoding rules.

Internally, Siebel Analytics Web usually uses relative URLs for callback links. For example, if the original callback link is saw.dll?Go and the bridge URL is http://myserver/myapplication/sawbridge, the new callback URL is http://myserver/myapplication/sawbridge?RedirectURL=saw.dll%3fGo.

startPage() Method

The startPage() method creates a new page object and returns its ID.

Signature

String startPage(StartPageParams options, String sessionID);

Arguments
Description

StartPageParams options

The options to use when starting the page, supplied in the StartPageParams structure. For information about the StartPageParams structure, see StartPageParams Structure.

String sessionID

A character string that contains the session ID. The session ID is usually returned by the logon call. If the SOAP client engine can handle HTTP cookies, you can omit the session ID or set it to null.

Returns

Returns a string containing the SAW page ID.

Siebel Analytics Web Administration Guide