|Oracle® Fusion Middleware Platform Developer's Guide for Oracle Real-Time Decisions
11g Release 1 (11.1.1)
Part Number E16630-01
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:
You must perform the following tasks first before you can work with the .Net Smart Client:
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."
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.
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.
Start Real-Time Decision Server. For more information, see Oracle Fusion Middleware Administrator's Guide for Oracle Real-Time Decisions.
In general, the following are the steps for integration:
Create the Oracle RTD Smart Client within your application code.
Create a request directed at an Inline Service and an Integration Point.
Populate the request with arguments and session keys.
Invoke the request using the Smart Client.
If the request is invoked on an Advisor, examine the response.
Close the Smart Client when finished.
The .NET Smart Client is located at
\client\Client Examples\Dot Net Client Example\sdclient.dll. This file should be co-located with your application in order to be accessible.
You can find an example of a .NET integration client in
\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:
From the menu bar, select File > Open > Project.
For File Name, select
\client\Client Examples\Dot NET Client Example\DotNetSmartClientExample.sln and click Open.
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");
localhost:9704 to match the host and port where Real-Time Decision Server is running.
Save and close the file.
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:
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:
Place the cursor after the final colon, then enter
1 to select the offer. The server responds with a final message.
The process repeats. Press Enter at the Customer ID prompt, without entering a number, to stop the program.