Oracle® WebCenter Wiki and Blog Server Installation, Configuration, and User's Guide
10 g Release 3 (
  Go To Table Of Contents
Go To Index


6 Integrating Oracle WebCenter Wiki and Blog Server

Oracle WebCenter Wiki and Blog Server includes features that enable you to incorporate wikis and blogs into an application or portal. This chapter explains how to integrate wiki and blog functionality into your applications at design time.

This chapter includes the following sections:

6.1 Adding Wiki or Blogs to Your Application or Portal

You can add wikis or blogs to your application by using the following methods:

  • Through the Web Clipping portlet or any portlet capable of consuming a URL

  • Through an iFrame, which you include in a page in your application

  • Through the use of a custom-built user interface that you can create using the provided Web Services


You can use Oracle Access Manager-based single sign-on to secure Oracle WebCenter Wiki and Blog Server. For information, see Chapter 4, "Configuring Single Sign-On."

The users you set up for your applications must match the user credentials on the Oracle WebCenter Wiki and Blog Server. Once a user is authenticated, if the user does not exist within the Oracle WebCenter Wiki and Blog Server, the user is created and a default role is assigned to the user.

6.1.1 Adding Wiki or Blogs by Using a Portlet

You can bring a wiki into your application through the Web Clipping portlet or any portlet capable of consuming a URL. For examples of portlets capable of consuming a URL, see the Oracle WebCenter Additional Services 10 g Release 3 ( page on OTN ( ).

Oracle WebCenter Framework includes a preconfigured Web Clipping portlet that you can register with your WebCenter application. You should also ensure that your application is secured, and that the login information of the users match that of the Oracle WebCenter Wiki and Blog Server.

Once you run your application to your browser, you can use the Web Clipping Studio to consume the desired URLs into your application. For information about the URL formats to use, see Section 6.2, "Wiki and Blog Server URL Endpoints and Query String Parameters."

You can also use a portlet to consume the URL. For more information about sample portlets that consume the URL, see the Oracle WebCenter Additional Services 10 g Release 3 ( page on OTN ( ).

6.1.3 Adding Wiki or Blogs by Using Sample Portlets

In your applications, you can add the sample portlets available on the Oracle Technology Network at the following URL:

On the Oracle WebCenter Additional Services 10 g Release 3 ( page, you can learn more about the sample portlets, as well as how to download and install them.

6.2 Wiki and Blog Server URL Endpoints and Query String Parameters

When you reach the point where you enter the wiki or blog source in the URL-consuming portlet or in the iFrame, use the formats provided in Table 6-1.

If you want to add a hyperlink that references a specific wiki page or a blog, on one of your application pages, use the URL formats provided in Table 6-2.

You can use wiki and blog query string parameters to define context (within the application context or external to it), and look and feel (page background colors and fonts). Query string parameters are bits of information you add to a URL to refine the behavior of the URL target. Table 6-3 lists and describes query string parameters you can use in custom WebCenter application wiki and blog URLs.

For more information about using these URLs and query string parameters in your application, see Section 6.1, "Adding Wiki or Blogs to Your Application or Portal."

Table 6-3 Query String Parameters to Use in Application Wiki and Blog URLs

Parameter Description


For information on how a wiki page looks on Oracle WebCenter Wiki and Blog Server when rendered in different inline modes, see Section 7.1, "What You Should Know About Wiki and Blog Modes."


Facilitates navigation to a specific blog, attributed either to a particular domain or user.


Facilitates navigation to a specific page in a specified domain. This variable follows the syntax: page= domain : wikiPageName .


Navigates to the start page within the specified domain. If the specified domain does not exist, it automatically creates a new domain with the name specified for the scope variable.

If the scope variable creates the domain on the fly, it also creates the home page (WelcomePage) and redirects the user to that page.


Dynamically applies the specified wiki theme to the requested page (the theme must already exist on both the wiki and blog server and the application server).

  • default applies the default theme specified on the server.

  • theme_name applies the specified wiki theme/CSS to the wiki page and all its children.

Oracle WebCenter Wiki and Blog Server provides seeded wiki themes, which you can include in your wiki and blog URLs. Use any one of the following (use the value in parenthesis in the session variable):

  • Deep Sea (deepsea)

  • Sand (sand)

  • WebCenter ( webcenter)

  • Wiki Default ( default)

  • Red ( red)

  • Blue ( blue)

  • Tech Gray ( tech_gray)

  • Bighorn ( bighorn)

  • Onyx ( onyx)

  • Flat Irons ( flatirons)

To ensure that your application chrome renders consistently, you may want to additionally place a copy of all seeded CSS files on your application server.


Allows you to specify an encoded URL to which a domain and page are appended when the wiki and blog server renders links to wiki pages. This applies only when inline=1.

This parameter is useful for integrating wiki pages into a portal when you want wiki links to navigate to a portal location with an embedded wiki page rather than directly to the page on the wiki and blog server.

All of these URL formats can take query string parameters to focus the result provided on the target page. Parameters, such as inline and theme, are session-level variables. Once the URL passes session-level variables to the target, the variable values continue to apply, even if you leave and return to the original target page. Also, session-level variables are applied even when the parameter is not included in subsequent URLs.

6.3 Oracle Wiki Server Web Services Interface

Once you have installed the wiki and blog server, you can access the Web Services end point by using the following URL:



In this URL, the host and port information refers to the computer where you installed your wiki and blog server.

Oracle WebCenter Wiki Web Services provide access to obtain information and content from wiki pages and domains. It also enables the creation, modification, and removal of wiki pages and domains. You can use Oracle JDeveloper to create a proxy for the Web Services from the WSDL definition, located here:


This section describes the Web Services interface. For information about the Web Services security, refer to Section 6.3.2, "Web Services Security".

6.3.1 Definition of the Interface

Some of the methods return information in JavaBeans. Table 6-4 shows the attributes of the DomainInfo and PageInfo beans. You can also use the getter methods of the described attributes, for example, long getCreated().

The Web Services methods include methods for accessing and performing actions on the domains and pages in the wiki, the blogs, and blog entries, as described in the following tables.

Table 6-6 P age-Related Methods

Return Type Method Description
getPageInfo (String domainName, String pageName, String key)

Returns information about the specified wiki page.

createPage (String domainName, String pageName, PageEditMode mode, PageType type, String key)

Creates a wiki page with the specified attributes.

This method supports different editing modes. These are editable by everyone, restricted to logged in users, restricted to members of the domain Foot 1  , and only admins are allowed to edit. Foot 2  The method also supports two page types: HTML and wiki markup.

deletePage (String domainName, String pageName, String key)

Deletes the specified wiki page.

getPlainPage (String domainName, String pageName, String key)

Returns the page content in the wiki markup format.

getRenderedPage (String domainName, String pageName, String key)

Returns the content rendered to HTML.

savePage (String domainName, String pageName, String content, String key)

The String content parameter takes text in the format that you specified in the type parameter while creating the wiki page.

Footnote 1 If the Wiki administrator has specified a list of members in Domains > Manage Members, "restricted to members of the domain" displays. The domain membership is otherwise open to all Wiki users.

Footnote 2 This option only displays if the currently authenticated user is an administrator of the Wiki.

The APIs: getAllDomainInfo(), getAllPageInfo(), search(), and getListOfBlogs() support pagination. These APIs support the notion of “block fetch,” where the clients can specify the maximum number and block of results that should be returned.

The getAllDomainInfo(), getAllPageInfo(), and getListOfBlogs() APIs support two parameters, maxResults and offset, from which the desired (maximum) number of results will be returned. However, the calling client must maintain the state of offset or the cursor. Clients should choose and provide a fixed value for maxResults in repeated calls to the API to get the correct result.

For example, setting maxResults = 10, and offset set to 1, the first call returns the first 10 rows (if present). Subsequent calls increment the offset parameter (being maintained at the client side) with maxResults fixed at 10. The subsequent calls return rows from 11-20, 21-30 and so on until it returns all rows.

A value of <= 0 for maxResults returns the full result set in one call, without pagination. Also, offset <= 0 will also return the full result set in one call (without pagination), starting from the first row.

The search() method supports the maxResults parameter, which you can use to restrict the number of rows returned.

6.3.2 Web Services Security

A ll Oracle Wiki Server Web Services methods are protected to prevent unauthorized access. Every method contains a String key parameter to ensure authorized access. This key is generated as a function of a user's name and a preconfigured passphrase. The passphrase is an arbitrary string that the administrator sets up in the Oracle WebCenter Wiki and Blog Server application after installation. As the wiki and blog server developer, you need to obtain this passphrase in order to use the Web Services interface to access the wiki. For information about passphrase, see Section 3.7, "Generating the Passphrase."


The passphrase is stored as cleartext in the web.xml file of the Oracle WebCenter Wiki and Blog Server. It is important to properly secure web.xml and to change the default passphrase upon installation of the server. It is also recommended that all remote Web Services calls be made over a Secure Sockets Layer (SSL) connection.

To create the key, use the following method:

String key = client.login(


In this method, the username refers to the name of the user on whose behalf the Web Services is making the call (for example, the user logged into your WebCenter application who is accessing the wiki by means of a portlet) and passphrase refers to the parameter key that you configured, as described in Section 3.7, "Generating the Passphrase".

6.3.3 Example Java program

The following code is an example of a Java program that accesses the Web Services interface. This program will list all the page names in the Training domain.

public class ListPages

In this example, because we have deployed the wiki to a server, using port 8888. We will hard code the Web Services end point to this URL. You can, however, parameterize the end point.

  private static final String endpoint =

Each Web Services method must authenticate the caller to the Web Services. Authentication consists of a user name and a preconfigured passphrase. In this example, we will hard code these values.

  private static final String username = "jsmith";
  private static final String passphrase = "passphrase";

We will also hard code the domain name in this example.

  private static final String domain = "Training";
  public static void main(String[] args) throws Exception

Next, we will create a client-side proxy to access the Web Services.

      WikiRemoteServiceClient client =
          new WikiRemoteServiceClient();

We then set the end point of the proxy to the actual location where we deployed the Web Services.


Each Web Services method must pass a security key to authenticate the user and call the method. We can generate this key by calling the login Web service using the user's name and the Web Services-configured passphrase.

       String key = client.login(username, passphrase);

Using the Web Services proxy, we fetch into an array the information about all the pages in the selected domain: If there is no such domain, the program will throw an exception. If the domain does not contain any pages, the program returns an empty array.

      PageInfo[] pages = client.getAllPageInfo(domain, key);
      System.out.println("Pages in " + domain + " domain:");

Throughout the pages array, print the name of each page using the getter method getName().

      for (int i = 0; i < pages.length; i++)
        System.out.println("  " + pages[i].getName());

If there is an exception, the program captures the error and prints it.

    catch (Exception e)
      System.out.println("Exception: " + e);