10 Using the .NET Smart Client

This chapter explains how to integrate an Inline Service with the .NET Smart Client, using the CrossSell Inline Service as an example.

The .NET Smart Client provides a very similar client to the Java API to make calls from your application. With the current implementation, the .NET Smart Client does not have some of the advanced features of the Java Smart Client, including session affinity management and default response handling.

For full information about the .NET Smart Client API, see the Decision Studio online help.

This chapter contains the following topics:

10.1 Before You Begin

You must perform the following tasks first before you can work with the .Net Smart Client:

  1. Install a Java Development Kit (JDK), with the JAVA_HOME environment variable set to its location. To obtain a JDK, go to the site:


    For more details about supported versions, see the documents referenced in Section 6.4, "System Requirements and Certification."

  2. Install the Oracle RTD files and deploy Oracle RTD to an application server. See Oracle Fusion Middleware Installation Guide for Oracle Business Intelligence for full information.

  3. The .NET Smart Client example works with the sample CrossSell Inline Service. Because of this, you must first populate the Oracle RTD Database with the CrossSell example data, then deploy the CrossSell Inline Service using Decision Studio. For details, see the section "Populating the CrossSell Example Data" in Oracle Fusion Middleware Administrator's Guide for Oracle Real-Time Decisions and Part III, "Decision Studio Reference" for information about deploying Inline Services.

  4. Start Real-Time Decision Server. For more information, see Oracle Fusion Middleware Administrator's Guide for Oracle Real-Time Decisions.

10.2 Integrating with an Inline Service Using the .NET Smart Client

In general, the following are the steps for integration:

  1. Create the Oracle RTD Smart Client within your application code.

  2. Create a request directed at an Inline Service and an Integration Point.

  3. Populate the request with arguments and session keys.

  4. Invoke the request using the Smart Client.

  5. If the request is invoked on an Advisor, examine the response.

  6. Close the Smart Client when finished.

The .NET Smart Client is located at RTD_HOME\client\Client Examples\Dot Net Client Example\sdclient.dll. This file should be co-located with your application in order to be accessible.

10.3 .NET Integration Example

You can find an example of a .NET integration client in RTD_HOME\client\Client Examples\Dot Net Client Example\DotNetSmartClientExample.sln. You can open this example in a .NET development tool such as Microsoft Visual C# 2010 Express, then run or debug the example.

In this example, Informant and Advisor Integration Points are invoked on the CrossSell Inline Service. See Section 6.2, "About the CrossSell Inline Service" to familiarize yourself with this Inline Service. In the example, the Integration Points are invoked and the return values from the Advisor are written to the console.

Follow these steps to run the example in Microsoft Visual Studio, after you have started the development tool:

  1. From the menu bar, select File > Open > Project.

  2. For File Name, select RTD_HOME\client\Client Examples\Dot NET Client Example\DotNetSmartClientExample.sln and click Open.

  3. If either the host or the port that Real-Time Decision Server is running on is different from the default localhost:9704, perform the following:

    • In the right-hand Solution Explorer window, double-click DotNetSmartClientExample.cs.

    • Locate the following line:

      SDClient client = new SDClient("http://localhost:9704","your name", "password");
    • Change localhost:9704 to match the host and port where Real-Time Decision Server is running.

    • Save and close the file.

  4. From the menu bar, select Debug > Start. In the Console window, the following text appears:

    Ring! Ring! New telephone call!
    Enter a customer ID between 1 and 1000:
  5. Place the cursor after the colon, then enter a customer ID (such as 5) and press Enter. The response appears similar to the following:

    Here are the deals we've got for you:
     1: ElectronicPayments
      Electronic payments eliminate the complications of handling checks.
    Enter the line number of the offer that catches your interest, or zero if none do:
  6. Place the cursor after the final colon, then enter 1 to select the offer. The server responds with a final message.

  7. The process repeats. Press Enter at the Customer ID prompt, without entering a number, to stop the program.