46 IBM WebSphere Everyplace Access V5, Volume IV: Advanced Topics
7. Click OK. You should see two cases for a notification (Figure 1-33).
Figure 1-33 Cases for Stock Notification
Configuring the stock content adapter
To configure the stock content adapter:
1. Open the stock1.xml file, which contains the stock information. This file is
located in ins_home\samples\sm\stock, where ins_home is your Intelligent
Notification Services installation directory. In the sample installation, it is the
C:\Program Files\WebSphere\INS directory.
2. Look for the <nameval name=”timestamp”> element and change the value to
ten minutes before the current time that is used on that server.
<nameval name="timestamp" type="string">2004-10-11 10:20:03</nameval>
3. Look for the <nameval name="last"> element, which contains the last stock
price. You should set it to a value less than 50, because that is the condition
that was set in the stock subscription.
<nameval name="last" type="double">44</nameval>
4. Save and close the stock1.xml file.
Before we can simulate a stock feed using the content feed application, we have
to configure it by performing the following steps:
1. Open the contentfeed.bat file, which is located in the ins_home\bin directory,
where ins_home is your Intelligent Notification Services installation directory.
In the sample installation, it is the C:\Program Files\WebSphere\INS
directory.
2. In the Environment Setup section of this file, enter the appropriate ins_home
and was_home settings as shown in the following example:
rem -----------------------------------------------------------------
rem Environment setup
rem -----------------------------------------------------------------
set INS_HOME=C:\Program Files\WebSphere\INS
set WAS_HOME=C:\Program Files\WebSphere\AppServer
Chapter 1. Intelligent Notification Services 47
3. Look for the line starting with "%WAS_HOME%\bin\launchclient". Add the
property -CCBootstrapPort=port_number to the line.
The modified line should look like the following:
"%INS_HOME%\samples\sm\XMLContentPublisher.ear" -CCBootstrapPort=9814
-CCclasspath="%INS_HOME%\bin;%INS_HOME%\lib\insSmClient.jar" %1
"%INS_HOME%\samples\sm\%2"
The port_number is the bootstrap address of the Intelligent Notification
Services application server. To determine the port number:
a. Open the WebSphere Application Server Administrative Console by
clicking Start
Program IBM WebSphere Application Server
V5.0
Administrative Console.
b. Expand Application Servers
INSServer End Points
Bootstrap Address.
c. The port is the value in the Port field.
Running the stock application
To run the stock application:
1. In a command prompt, change the directory to ins_home\bin and simulate the
stock feed by executing the following command:
contentfeed stocks stock
2. Because of the security that was enabled during the installation, you should
see the window shown in Figure 1-34.
Figure 1-34 Enter security information
3. Enter your WebSphere Application Server administrative user ID and its
password. In the sample installation the user ID and password is wpsbind.
4. Log in to the WebSphere Everyplace Access Portal as Christian and go to
Intelligent Notification
Message Center.
5. You should see a new message from the STOCK application as shown in
Figure 1-35 on page 48.
48 IBM WebSphere Everyplace Access V5, Volume IV: Advanced Topics
Figure 1-35 Stock notification received
6. You can select the new message to see the details (as shown in Figure 1-36).
Figure 1-36 Stock notification details
7. Open the stock1.xml file to change the stock price.
8. Change the value to higher than 100, as shown in the following example:
<nameval name="last" type="double">120</nameval>
9. Change the time to the actual server time, as shown in the following example:
<nameval name="timestamp" type="string">2004-10-11 11:20:03</nameval>
10.Save and close the file.
11.Run the content feed application again, using this command:
contentfeed stocks stock
12.Enter your WebSphere Application Server administrative user ID and its
password in the security window.
Chapter 1. Intelligent Notification Services 49
13.Log in to the WebSphere Everyplace Access Portal as Christian and go to
Intelligent Notification
Message Center.
14.You should see a new message from the STOCK application as shown in
Figure 1-37.
15.If you open your e-mail client, you should see a stock message also.
Figure 1-37 Stock notification to e-mail account
16.If click the Messages Icon on your BlackBerry, you should see the message
(as shown in Figure 1-38 on page 50).

Get IBM WebSphere Everyplace Access V5 Handbook for Developers and Administrators Volume IV: Advanced Topics now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.