Plugin-Service Development Studio4.1Tutorial

232
Service Development Studio (SDS) 4.1 Tutorial

Transcript of Plugin-Service Development Studio4.1Tutorial

Page 1: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1Tutorial

Page 2: Plugin-Service Development Studio4.1Tutorial

Copyright

© Copyright Ericsson AB 2009. All rights reserved.

Disclaimer

No part of this document may be reproduced in any form without the writtenpermission of the copyright owner.

The contents of this document are subject to revision without notice due tocontinued progress in methodology, design and manufacturing. Ericsson shallhave no liability for any error or damage of any kind resulting from the useof this document.

Trademark List

Ericsson is the trademark or registered trademark ofTelefonaktiebolaget LM Ericsson.

Java is a trademark of Sun Microsystems, Inc.

Nokia is a trademark of Nokia Corporation.

Sailfin are a trademarks of Sun Microsystems, Inc.

Sony Ericsson is a trademark of Sony Ericsson Mobile CommunicationsAB.

Symbian OS is a trademark of Symbian, Ltd.

UIQ is a trademark of UIQ Technology AB

Windows Windows is a registered trademark of MicrosoftCorporation in the United States and other countries.

All other trademarks are the property of their respectiveowners.

1553-APR 901 753/3 Uen H 2009-02-13

Page 3: Plugin-Service Development Studio4.1Tutorial

Contents

Contents

1 Overview 1

1.1 SDS Tutorial - What is Covered 1

1.2 How this Guide is Organized 2

1.3 Conventions Used in this Guide 3

1.4 Comments about the Documentation 4

2 Prerequisites 5

2.1 Assumptions 5

2.2 Starting SDS 6

3 Creating Your First SIP Servlet and Client 9

3.1 “Hello, World!” SIP Servlet 9

3.2 “Hello, World!” Client Application 74

4 Guess Client / Server Application 103

4.1 Overview of the Projects 103

4.2 Creating the Projects 104

4.3 Understanding the Code 108

4.4 Starting the Execution Environment 110

4.5 Configuring the CSCF 114

4.6 Setting the Default Runtime Server 122

4.7 Deploying the GuessServlet 123

4.8 Installing the GuessClient in Windows 124

4.9 Checking the Execution Environment 127

4.10 Configuring ICP 128

4.11 Playing the Guess Game in Windows 132

4.12 Testing Guess in the Test Agent 134

4.13 Troubleshooting 153

4.14 Running GuessClient in the Symbian Emulator 154

5 IJCU Client 175

5.1 About IJCU 175

5.2 Prerequisites 175

5.3 Checking the Execution Environment 175

5.4 Wireless Toolkit Configuration 178

1553-APR 901 753/3 Uen H 2009-02-13

Page 4: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

5.5 Understanding the Code 180

5.6 Starting Visual Traffic Flow 181

5.7 Starting the Application 182

5.8 Registering the User 186

5.9 Sending a Message 187

5.10 Exiting 189

6 Back-to-Back User Agent (B2BUA) 191

6.1 Prerequisites 191

6.2 Provisioning 192

6.3 Starting the Execution Environment 194

6.4 Deploying the B2BUA Servlet 195

6.5 A Short Overview of the Route Parameters 195

6.6 Using the B2BUA Servlet 196

6.7 ATF Script 201

7 Troubleshooting 209

7.1 Setting JDK 1.6 as the Default JRE 209

7.2 Restarting the ICP Windows Service 215

8 Other Sample Applications 217

8.1 Importing the Code Samples 220

Glossary 225

Reference List 227

1553-APR 901 753/3 Uen H 2009-02-13

Page 5: Plugin-Service Development Studio4.1Tutorial

Overview

1 Overview

This document provides a tutorial for developing Session Initiation Protocol(SIP) servlets and client applications with the Ericsson Service DevelopmentStudio (SDS) 4.1.

1.1 SDS Tutorial - What is Covered

This tutorial shows you how to create SIP applications using the SDS designenvironment and provision and deploy them in the execution environment andthe Symbian Emulator. The tutorial also covers using the Test Agent andAutomatic Testing Framework testing tools provided by SDS.

• “Hello, World!” Servlet — Your first SIP application will familiarize youwith the SDS development environment. You will use the SDS wizards todevelop a very simple SIP servlet that sends a “Hello, World!” messagetriggered by a user message request. You will learn how to start theexecution environment, deploy your application to the SIP Container, anduse both the Test Agent and the Automated Testing Framework (ATF) totest the servlet.

• “Hello, World!” Client — Your next application is a very simple clientapplication to familiarize you with the tools in the IMS Client Platform (ICP).You will develop a client application that triggers the “Hello, World!” Servlet.

• “Guess” Servlet and Client — This client/server application is morecomplex. Building on what you learned in the previous exercises, you willdevelop, deploy, and test a game where the goal is for the user (client) toguess a number picked by the server. To save you some typing, you willimport sample code for these projects. This code can be reused for otherapplications you may wish to model on it. By the end of this tutorial, youwill be able to test this application in the Test Agent, in Windows, and inthe Symbian Emulator.

• IJCU Client — This simple application demonstrates IJCU capabilities ondevices. This example also showcases Virtual Trace Flow. This tool isused to view SIP signalling between devices.

11553-APR 901 753/3 Uen H 2009-02-13

Page 6: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

1.2 How this Guide is Organized

This SDS 4.1 Tutorial is organized into the following sections:

Table 1 Guide Organisation

Section Description

Overview An introduction to this tutorial.

Prerequisites What you need before you can follow this tutorial.

Creating Your First SIPServlet and Client

These first two exercises demonstrate the basicsof creating an SDS project and developinga simple SIP servlet application and clientapplication with ICP capabilities to trigger theservlet you created in the first exercise.

“Guess” Client / ServerApplication

This exercise is more ambitious and builds onwhat you learned from the first applications.You will install and run the application in bothWindows and in the Symbian Emulator.

IJCU Client This exercise uses a sample application todemonstrate IJCU capabilities and how touse Visual Traffic Flow to study SIP signallingbetween client and server.

Troubleshooting General troubleshooting that is not related to aparticular exercise.

Other SampleApplications

Sample applications that demonstrate how youcan use various interfaces and functions, or touse as the starting point for your own applications.

Glossary Acronyms used in this document.

Reference List Related documents.

2 1553-APR 901 753/3 Uen H 2009-02-13

Page 7: Plugin-Service Development Studio4.1Tutorial

Overview

1.3 Conventions Used in this Guide

The following typographic conventions are used in this guide:

Table 2 Typographic Conventions

Convention Description Example

Code Examples Code examples stat char* months[]=\{”Jan”,”Feb”}

(1)

CommandVariables

Command variables,the values of whichyou must supply.

<home_directory>

Document andFile Names

References todocument titlesor sections in adocument and filenames.

For more information, referto the System AdministratorGuide.Check the local runlog files(xxx.runlog and xxa.runlog) in the/var/log/xxx directory.

GUI Objects GUI objects, suchas menus, fields,and buttons, dialogboxes, and options.

On the File menu, click Exit.

KeyCombinations

Key combinations. Press Ctrl+X to delete theselected value.(2)

OutputInformation

Text displayed by thesystem

System awaiting input

Parameter/ConfigurationValues

Parameter values(numbers, true/false,yes/no, and so on)

To use this feature, the parametermust be set to true.

SystemElements

Command andparameter names,program names,path names, URLs,and directory names

The files are located inE:\Test.The files are located inetc/opt/ericsson/bin. (3)

User Input A command thatyou must enter ina Command LineInterface (CLI)exactly as written.

cd $HOME

(1) The back slash (\) is used to show where long lines are split.(2) The plus sign (+) indicates that you must press the keys simultaneously.(3) The use of the forward slash (/) is for Unix systems, PC systems use the backslash (\).

31553-APR 901 753/3 Uen H 2009-02-13

Page 8: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

1.4 Comments about the Documentation

Ericsson encourages you to provide feedback, comments or suggestions sothat we can improve the documentation to better meet your needs.

With your comments provide:• Document title• Document number• Page number

Send your comments to [email protected].

4 1553-APR 901 753/3 Uen H 2009-02-13

Page 9: Plugin-Service Development Studio4.1Tutorial

Prerequisites

2 Prerequisites

Before using SDS and running this tutorial:

• SDS must be installed and properly configured on your workstation.

Refer to the Service Development Studio (SDS) 4.1 Installation Instructions,1531-APR 901 753/2.

• The Sample Code component must be selected during SDS installation, orthe sample code provided for these exercises will not be available.

If the Sample Code component was not installed, you must reinstall SDSto obtain them.

2.1 Assumptions

For the purpose of this tutorial, it is assumed that SDS is being used for the firsttime. Some instructions and configurations (such as the setting of preferencesor defaults) do not need to be performed a second time if you have previouslyused SDS and done them. Those cases are noted.

It is assumed that the reader is familiar and comfortable with:• Programming with Java 1.6• Eclipse 3.x• Session Initiation Protocol (SIP)

Note: Clients developed with SDS 4.1 and using ICP 4.1 will eventually needto be updated to fully comply with the final JSR 281 IMS Services APIspecification (Reference [21]).

51553-APR 901 753/3 Uen H 2009-02-13

Page 10: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

2.2 Starting SDS

1. To start SDS, on your desktop click Start > Programs > SDS 4.1 > SDS.

The SDS splash screen is displayed while SDS loads. This could takea minute or two.

Figure 1 SDS Splash Screen

The Workspace Launcher screen appears, prompting you to choose yourworkspace for this session.

Figure 2 SDS Workspace Launcher

2. Enter the path to the workspace and click OK. If the path does not alreadyexist, it is created.

6 1553-APR 901 753/3 Uen H 2009-02-13

Page 11: Plugin-Service Development Studio4.1Tutorial

Prerequisites

Note: Check Use this as the default and do not ask again if you do notwish to be prompted with this screen every time you start SDS.However, if your IP is subject to changes due to your DHCP serveror because you relocate the computer on which SDS is installed,selecting this option will cause an error when you launch SDS. Thisis because the IP of the simulator is not the same as when SDSwas installed.

If you know your IP will change periodically due to relocationof the machine with SDS to other networks, consider creatinga workspace for each IP. Refer to the SDS 4.1 InstallationInstructions (Reference [2]) for more information.

If this is the first time you are opening SDS, you will see a Welcome screen.

Figure 3 SDS Welcome Screen

3. Click the X on the Welcome tab to dismiss this screen.

The SDS workbench opens on your desktop.

71553-APR 901 753/3 Uen H 2009-02-13

Page 12: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 4 Eclipse Workbench• If this is the first time you are launching SDS, the workbench is blank.• If you have previously used SDS, you will see the perspective, views, and

project(s) that you had opened in the workbench the last time you shutdown SDS.

• If you are not familiar with the SDS workbench, you can access the onlinehelp from the Help > Help Contents menu and select Workbench UserGuide to learn more about the SDS workbench.

8 1553-APR 901 753/3 Uen H 2009-02-13

Page 13: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

3 Creating Your First SIP Servlet and Client

This first application demonstrates the basics of creating an application. Thegoal of the application is to send a “Hello, World!” message when triggered.

3.1 “Hello, World!” SIP Servlet

The steps to creating a SIP application are outlined below:

1. Creating a Dynamic SIP/Web Project

2. Creating the SIP Servlet

3. Coding

4. Starting the Execution Environment

5. Provisioning the CSCF

6. Setting the Default Runtime Server

7. Deploying a Project on Sailfin

8. Testing Your Application

9. Automated Tests

10. Troubleshooting

11. Next Steps

91553-APR 901 753/3 Uen H 2009-02-13

Page 14: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

3.1.1 Creating a Dynamic SIP/Web Project

To create the HelloWorldServlet, use the New Dynamic SIP/Web Projectwizard.

1. In SDS, click the SIP Application icon on the tool bar.

The New Dynamic SIP/Web Project wizard is launched.

Figure 5 Dynamic SIP/Web Project Window

2. Make the following changes:

Note: Options not required for this tutorial are ignored. Refer to theService Development Studio 4.1 Developer's Guide (Reference[3]) for further information.

• In the Project name field, enter HelloWorldServlet

In the Project contents section, the Use Default check mark is on so thatyour project uses the default location indicated.

The Target Runtime field contains Sailfin v1. If you do not find it,Sailfin or its adapter was not installed. See the Service Development

10 1553-APR 901 753/3 Uen H 2009-02-13

Page 15: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

Studio 4.1 Installation Instructions (Reference [2]) for information on how toperform Sailfin installation.

The SIP Servlet API version is set to 1.1.

The Configuration field is contains Default Configuration forSailfin v1. This is the configuration that you need for a dynamicSIP/Web application.

Figure 6 SIP Application Wizard – SIP Application Build Information

3. Click Finish, leaving all defaults.

The project is created and is displayed in the Package Viewer. You canexpand the it by clicking the Expand icon.

111553-APR 901 753/3 Uen H 2009-02-13

Page 16: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 7 Package Explorer Window - HelloWorld Project

3.1.2 Creating the SIP Servlet

The New SIP Servlet wizard helps you to create new servlets by generatingpart of the deployment descriptor and a simple skeleton for the class.

1. Click the SIP Servlet icon on the tool bar.

The New SIP Servlet wizard window is displayed.

12 1553-APR 901 753/3 Uen H 2009-02-13

Page 17: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

Figure 8 New SIP Servlet Wizard

2. In the SIP Servlet Definition screen, complete the fields in the Servletclass section as follows:

Note: Options not required for this tutorial are ignored. Refer to theService Development Studio 4.1 Developer's Guide (Reference[3]) for further information.

• Project: Select HelloWorldServlet from the drop-down list. OnlyDynamic SIP/Web Projects are displayed in this list.

• Folder: Leave as \HelloWorldServlet\src.• Package: Type com.ericsson as the name of the package for the

class.• Class name: Type HelloWorldServlet as the name of the class.• Superclass: Leave as javax.servlet.sip.SipServlet.

Figure 9 New SIP Servlet Wizard – SIP Servlet Definition

131553-APR 901 753/3 Uen H 2009-02-13

Page 18: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

3. Click Next.

The SIP Servlet Methods and Resources page is displayed.

Note: You can select the SIP methods to implement and that will bydefault trigger invocation of the servlet. Each method selected hereautomatically adds a mapping rule for the servlet. These mappingrules can be edited afterwards.

Figure 10 SIP Servlet Methods and Resources

4. For our simple example, we only need a Message method and a SIPFactory resource.

• Select doMessage(SipServletRequest) from the Methods signatureslist.

• Select SIP Factory from the Resource name list.

5. Click Finish.

A skeleton for your class is generated in the SDS code editor.

14 1553-APR 901 753/3 Uen H 2009-02-13

Page 19: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

Figure 11 HelloWorldServlet Class Skeleton

Note: You may notice warnings in the Problems view. Warnings will beresolved in the next section.

3.1.3 Coding

The goal of this service is to send a message saying “Hello, World!” to allusers who send the service a MESSAGE message. We now have to add thecode to do this.

151553-APR 901 753/3 Uen H 2009-02-13

Page 20: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Note: If you are following this Tutorial from a hard copy, you can access anonline HTML version of it so you can copy/paste the code.

• From the SDS menu, select SDS > Documentation > SDSDocumentation Library. The library is launched in a web browser.

• Click the Operation & Maintenance folder in the navigation frameon the left. The O&M documents for SDS are listed in the rightframe.

• Click Service Development Studio (SDS) 4.1 Tutorial . Thetutorial replaces the list of documents.

• Scroll to the Table of Contents and click the 3.1 "Hello, World!"SIP Servlet link to go to this section.

• Click on the Step 3 on page 9 link to go to this section.

1. In the SDS code editor, locate the block of generated code for thedoMessage() method (see ).

Figure 12 doMessage Method

2. In the line:

protected void doMessage(SipServletRequestsipServletRequest)

replace sipServletRequest with req

so the line looks like this:

protected void doMessage(SipServletRequest req)

16 1553-APR 901 753/3 Uen H 2009-02-13

Page 21: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

3. Delete the //TODO comment. We will now write the code to trigger, create,and send the message “Hello, World!”

A MESSAGE to sip:[email protected] triggers the servlet.We need to add code for the servlet to know when it should run.

4. On a new line, type or copy the code below into the code editor (commentoptional).

Note: The back slash (\) is used to show where long lines are split.Remove them for the code to function.

// This servlet is triggered by a MESSAGE to// sip:[email protected]. Ignore the request if// URI is not sip:[email protected] (!"sip:[email protected]"\

.equals(req.getRequestURI().toString())) {return;

}

The above code ignores the request if the MESSAGE URI is notsip:[email protected].

If the MESSAGE URI is to sip:[email protected], the servletmust send a SIP 200 OK message in response to acknowledge requestwas received.

5. On a new line, type or copy the code below into the code editor (commentoptional).

// Send 200 OK to acknowledge request was received.req.createResponse(200).send();

The above code sends a SIP 200 OK message.

Now the servlet should create the SIP MESSAGE, specifying the expectedSIP headers.

6. On a new line, type or copy the code below into the code editor (commentoptional).

Note: The back slash (\) is used to show where long lines are split.

// Create a greeting MESSAGE to send back to the user.SipServletRequest messageRequest = sipFactory\

.createRequest(req.getApplicationSession(), "MESSAGE",\req.getTo(), req.getFrom());

messageRequest.pushRoute(sipFactory\.createSipURI(null, "127.0.0.1:5082"));

messageRequest.addHeader("Accept-Contact", req\

171553-APR 901 753/3 Uen H 2009-02-13

Page 22: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

.getHeader("Accept-Contact"));messageRequest.addHeader("User-Agent", req.getHeader\("User-Agent"));

The above code creates the MESSAGE with its required headers.

Now we need to provide the MESSAGE content.

7. On a new line, type or copy the code below into the code editor (commentoptional).

// Set the message content.messageRequest.setContent("Hello, World!", "text/plain");

The above code sets the message content to "Hello, World!".

Next we need to specify a P-Asserted-Identity header. The CSCFprocesses only asserted requests. When a request is sent without aP-Asserted-Identity header, it is rejected with a 403 Forbidden.

8. On a new line, type or copy the code below into the code editor (commentoptional).

Note: The back slash (\) is used to show where long lines are split.

// S-CSCF processes only asserted requests. When a request is// sent without a P-Asserted-Identity header, it is rejected// with a 403 Forbidden. This header asserts that the request// comes from a trusted domain.messageRequest.addHeader("p-asserted-identity",\"sip:[email protected]");

The above code asserts that the request comes from a trusted domain.

Finally, we need to send the message.

9. On a new line, type or copy the code below into the code editor (commentoptional).

// Send the requestmessageRequest.send();

10. Press Ctrl+Shift+F (formatting) to realign the indentations.

Your finished code should look like this:

18 1553-APR 901 753/3 Uen H 2009-02-13

Page 23: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

protected void doMessage(SipServletRequest req) throws ServletException,IOException {

// This servlet is triggered by a MESSAGE to sip:[email protected].// Ignore the request if URI is not sip:[email protected] (!"sip:[email protected]".equals(req.getRequestURI().toString())) {return;

}

// Send 200 OK to acknowledge request was received.req.createResponse(200).send();

// Create a greeting MESSAGE to send back to the user.SipServletRequest messageRequest = sipFactory.createRequest(req.getApplicationSession(),\

"MESSAGE", req.getTo(), req.getFrom());messageRequest.pushRoute(sipFactory.createSipURI(null, "127.0.0.1:5082"));messageRequest.addHeader("Accept-Contact", req.getHeader("Accept-Contact"));messageRequest.addHeader("User-Agent", req.getHeader("User-Agent"));

// Set the message content.messageRequest.setContent("Hello, World!", "text/plain");

// S-CSCF processes only asserted requests. When a request is sent// without a P-Asserted-Identity header, it is rejected with a// 403 Forbidden. This header asserts that the request comes from a// trusted domain.messageRequest.addHeader("p-asserted-identity", "sip:[email protected]");

// Send the requestmessageRequest.send();

}

Example 1 HelloWorldServlet Code

11. Press Ctrl+S to save.

Note: You will get warning messages in the Problem view regardingclasspath entries, but you can safely ignore them.

3.1.4 Starting the Execution Environment

Now we need to start the CSCF, DNS, and the SIP container in order to editthe provisioning data.

1. From the SDS menu, select SDS > Server > CSCF > Start CSCF.

You will see a progress dialog followed by a wait cursor.

The Console view displays the CSCF logging.

Figure 13 CSCF Console

2. From the SDS menu, select SDS > Server > DNS > Start DNS.

191553-APR 901 753/3 Uen H 2009-02-13

Page 24: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

You will see a progress dialog followed by a wait cursor.

The Console view displays the DNS logging.

Figure 14 DNS Console

Note: You can switch between the CSCF console and the DNS console logsby dropping down the Display Selected Console list on the view'stoolbar and selecting one from the list of open consoles.

Figure 15 Switch Between Open Consoles

We can now proceed with the provisioning.

3.1.5 Provisioning the CSCF

SDS provides a Call Session Control Function (CSCF) simulation. TheCSCF manages the traffic between clients and the SIP containers. In a realenvironment, it is possible to have many SIP containers. Each container wouldbe triggered using different rules defined in the CSCF.

Our example application is simple: every MESSAGE request goes to our oneand only application server. To make things even simpler, we can configure theCSCF to accept all MESSAGE requests without validating the credentials.

3.1.5.1 Accessing the Provisioning Perspective

1. From the SDS menu, select SDS > Server > Provisioning.

This launches the CSCF Provisioning perspective.

20 1553-APR 901 753/3 Uen H 2009-02-13

Page 25: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

Figure 16 CSCF Provisioning – DNS

The Provisioning perspective has three tabs, DNS, HSS, and Registrar. Onyour first access of this view, you will see the DNS configuration tab. If youhave opened the Provisioning perspective before, it will open to display thelast tab you were in.

3.1.5.2 DNS Configuration

The DNS tab is used to define the virtual domains for the CSCF Initial FilterCriteria (iFC). By giving each application server a domain name, you can sendall requests to another application server simply by changing the IP addressfor that domain name.

SDS comes preconfigured with Domain Name Server (DNS) settings for IMSMessaging (IMS-M), Presence and Group List Management (PGM), andPush-to-Talk over Cellular (PoC). For our example we are going to create adomain called sip:mydomain.com. All relevant SIP messages will be sentto this host.

211553-APR 901 753/3 Uen H 2009-02-13

Page 26: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

1. Select the DNS tab of the Provisioning perspective if it is not alreadydisplayed.

2. Under the DNS tab, select the SIP/SIPS Keys tab if it is not alreadydisplayed.

3. Click Add at the right of the list.

A new row is added to the table. The fields are populated with defaultvalues.

Figure 17 DNS Provisioning – Add a New DNS Record

4. Make the following changes:

• In the URI section, change Host to mydomain.com

• In the DNS Record section, note that the IP Address field automaticallypicks up the IP of the local machine. Change it to the IP address in theSIP container's preferences (by default this is 127.0.0.1).

• Leave everything else.

5. Click Save.

3.1.5.3 HSS Configuration

Home Subscriber Server (HSS) configuration involves configuring the InitialFilter Criteria (iFC) and Service Point Triggers (SPT), the Service Profile, theUser Profile, and the Public Service Identity (PSI) Profile (not used for thistutorial).

22 1553-APR 901 753/3 Uen H 2009-02-13

Page 27: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

Initial Filter Criteria

1. Select the HSS tab.

2. Select the Initial Filter Criteria tab if it is not already displayed.

An iFC can be described as an entry point to an application server. The iFCcan have one or many triggers. Triggers are part of a group.

3. Select the Definition tab if it is not displayed by default. SDS comespreconfigured for IMS-M, PGM, and PoC. We will now add an iFC for ourHelloWorldServlet.

Figure 18 Provisioning HSS Tab

4. Click Add at the bottom of the list.

This creates a new Initial Filter Criteria named ifc1 and populates severalof the fields in the tab with default values.

231553-APR 901 753/3 Uen H 2009-02-13

Page 28: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 19 Add a New iFC

5. Make the following changes:

• Initial filter Criteria section, change Name to HelloMessage. Thename of ifckey1 in the list changes to this name simultaneously.

• Application Server section, change Server Address tosip:mydomain.com.

• Leave everything else.

24 1553-APR 901 753/3 Uen H 2009-02-13

Page 29: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

Figure 20 “HelloMessage” iFC

6. Click Save.

Service Point Trigger

To create the Service Point Trigger:

1. Make sure that the HelloMessage iFC is selected under the Definition tab.

2. Select the Service Point Trigger tab under Initial Filter Criteria.

251553-APR 901 753/3 Uen H 2009-02-13

Page 30: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 21 Provisioning HSS Service Point Trigger tab

3. Click Add at the bottom of the list.

This populates several of the fields in the tab with default values.

26 1553-APR 901 753/3 Uen H 2009-02-13

Page 31: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

Figure 22 Add a New Service Point Trigger

4. Change the Name field to HelloSipMessage. The name of SPT_1 in thelist changes to this name simultaneously.

5. Make the following changes in the Trigger Definition section:

• In the Trigger Type field, select SIP Method from the drop-down list.Your selection in this drop-down list causes a Method field to appearbelow.

• In the Method field, select MESSAGE from the drop-down list.• Leave everything else.

271553-APR 901 753/3 Uen H 2009-02-13

Page 32: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 23 “HelloSipMessage” SPT

You have now created the first Service Point Trigger. You must create asecond one.

6. Click Add at the bottom of the list.

This populates several of the fields in the tab with default values.

7. Change the Name field to HelloSipRequestUri. The name of SPT_1in the list changes to this name simultaneously.

8. Make the following changes in the Trigger Definition section:

• In the Trigger Type field, select Request URI from the drop-downlist. Your selection in this drop-down list causes a Value field to appearbelow.

• In the Value field, select sip:[email protected] from thedrop-down list.

• Leave everything else.

28 1553-APR 901 753/3 Uen H 2009-02-13

Page 33: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

Figure 24 Trigger Definition

9. Click Save.

The initial Filter Criteria is created. It has one SPT that is triggeredwhen a MESSAGE request arrives. When this happens, the messagereceived is forwarded to the application server sip:mydomain.com forprocessing. The second SPT is triggered by a Request URI with [email protected].

Service Profile

The next step is to create a Service Profile. The service profile is assigned to aparticular user. It may consist of many iFCs. For example, when a messagearrives at the CSCF from a user, the CSCF looks for the user's service profile (ifany) and invokes application servers based on this profile.

1. Select the Service Profile tab under HSS. SDS comes preconfigured forIMS-M, PGM, and PoC. We add a service profile for our servlet:

291553-APR 901 753/3 Uen H 2009-02-13

Page 34: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 25 Provisioning HSS Service Profile

2. Click Add.

This creates a new service profile named profile 1.

3. Make the following changes in the Service Profile section:

• In the Service Profile section, change Name to TutorialProfile.The name of profile 1 in the list changes to this namesimultaneously.

• In the Initial Filter Criteria Combination section, select theHelloMessage check box.

30 1553-APR 901 753/3 Uen H 2009-02-13

Page 35: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

Figure 26 Add TutorialProfile

4. Click Save.

User Profile

Before the application server can be triggered, the user must be provisioned inthe HSS. The User Profile allows you to do this. SDS comes preconfigured withusers Alice and Bob. We will create and provision a new user named Coco.

1. Select the User Profile tab under HSS.

311553-APR 901 753/3 Uen H 2009-02-13

Page 36: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 27 Provisioning HSS User Profile

2. Click Add.

A new user profile row appears and mandatory fields are filled with defaultvalues.

32 1553-APR 901 753/3 Uen H 2009-02-13

Page 37: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

Figure 28 Add a New User Profile

3. Make the following changes to the following fields.

• In the Public User ID field type sip:[email protected]

• In the Private User ID field type [email protected]

• In the Password field type coco

• In the Service Profile field select TutorialProfile from thedrop-down list.

• Leave everything else blank.

Note: The other options are not required for the purpose of thistutorial. Refer to the Service Development Studio 4.1Developer's Guide (Reference [3]) for further information.

331553-APR 901 753/3 Uen H 2009-02-13

Page 38: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 29 Provisioning HSS – User Profile

4. Click Save.

PSI Profile

A Public Service Identity (PSI) is used to identify groups and services. For thepurpose of this tutorial, we do not need to provision one.

34 1553-APR 901 753/3 Uen H 2009-02-13

Page 39: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

3.1.6 Setting the Default Runtime Server

You are now ready to deploy and test your application. If you have createdthis application using the wizard, you have already set it to run on the Sailfinapplication server. Go directly to Section 3.1.7 on page 36.

However, if you have imported the code from the samples included with SDS,you must now set the applications default runtime server.

To set the default server of the application to Sailfin do the following:

1. Switch to the Java EE perspective by clicking the >> arrow at the top rightof the SDS window and selecting Java EE.

Figure 30 Switch to Java EE Perspective

2. In Package Explorer, select the project and right-click it.

3. In the context menu, select Properties.

The Properties window for the project is displayed.

4. In the Navigation Tree, select Server

351553-APR 901 753/3 Uen H 2009-02-13

Page 40: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 31 Project Properties Window - Server

5. Select Sailfin v1.

6. Click Apply.

7. Close the Properties window by clicking OK.

3.1.7 Deploying a Project on Sailfin

To deploy and start the application on the Sailfin server, do the following:

1. In SDS, select the project and right-click it.

2. In the context menu, select Run As > Run on Server.

A progress bar appears at the bottom of the SDS window showing theSailFin server being started.

Figure 32 SailFin Server Progress Bar

The Console also displays the details of the starting process.

36 1553-APR 901 753/3 Uen H 2009-02-13

Page 41: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

After a minute, the servlet is deployed and Sailfin is started. In the serverview, you can see the Sailfin v1 server, its state (Started) and status(Synchronized).

The Internal Web Browser window is also displayed, but there is no content todisplay.

Figure 33 Java EE Perspective - HelloWorld Project Deployed

You can check the status of the HelloWorld application in Servers.

3. In Servers, expand Sailfin v1 by clicking the Expand icon.

The deployed HelloWorld is shown with Status Synchronized.

371553-APR 901 753/3 Uen H 2009-02-13

Page 42: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 34 Servers View - Sailfin Server and Application

3.1.8 Testing Your Application

SDS provides a Test Agent tool to test your services.

Conditions

Before you can use the Test Agent, the following conditions must be met:• The CSCF and DNS server are started. See Section 3.1.4 on page 19.• Your provisioning is complete. See Section 3.1.5 on page 20.• Your application is set to run on the Sailfin server. See Section 3.1.6 on

page 35.• You application is deployed. See Section 3.1.7 on page 36.

Start Test Agent

1. From the SDS menu, select SDS > Client > Start Test Agent.

The SDS Test Agent window is displayed.

38 1553-APR 901 753/3 Uen H 2009-02-13

Page 43: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

Figure 35 SDS Test Agent Window

Note: You can start as many Test Agents as you need to simulate manyusers.

The default port to receive messages is 6060 and it is increased if this port isalready occupied. Messages are sent on port 5081 (the default CSCF port)on the local machine.

Note: When responding to the server with 200 OK messages you have 32seconds, or the session will time out.

Scenario

Here is the scenario for testing our application:

• Coco sends a REGISTER request to the server so that messages arerouted correctly back to this user.

• The expected result is that the server responds with a 200 OK.

391553-APR 901 753/3 Uen H 2009-02-13

Page 44: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

• Coco sends a MESSAGE request to sip:[email protected] totrigger the HelloWorldServlet.

• The expected result is that the server sends back a 200 OK.

• Then the server sends Coco the “Hello, World!” message.

• Coco responds with a 200 OK.

Register Coco

The first request is a REGISTER. Registration is required so that messagesaddressed to this particular user are routed to the correct contact.

1. Click the New Request button below the Message Creation field.

The New Initial Request screen is displayed.

The default Request method is REGISTER and the default Name andURI are for user Alice.

Note: This step is necessary every time the Test Agent is started, even ifthe user was previously registered from another instance of TestAgent or from another application.

40 1553-APR 901 753/3 Uen H 2009-02-13

Page 45: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

Figure 36 New Initial Request

2. Change all occurrences of Alice to Coco in the Request section andclick OK.

The New Initial Request screen is dismissed and the generated messagefor the REGISTER request is displayed in the Message Creation editor.

The Send Message button below the Message Creation is activated.

3. Click the Send Message button.

The REGISTER message is sent and displayed in the Message History onthe right side of the window.

The response is SIP/2.0 200 OK.

411553-APR 901 753/3 Uen H 2009-02-13

Page 46: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 37 SDS Test Agent — Coco Sent REGISTER Message

At this point, you can see the REGISTER message logged in the CSCFConsole view of the SDS workbench.

Figure 38 CSCF Console Showing Coco's Registration

Send MESSAGE Message

4. Click the New Request button again.

The New Initial Request screen is displayed.

42 1553-APR 901 753/3 Uen H 2009-02-13

Page 47: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

• In the Request section, select MESSAGE from the Method drop-down listand change the URI field to sip:[email protected]

• In the To section, change Name to greetings and URI tosip:[email protected].

• Leave everything else.

5. Click OK.

The New Initial Request screen is dismissed and the generated messagefor the MESSAGE request is displayed in the Message Creation editor.

6. Click the Send Message button.

The MESSAGE message is sent and displayed in the Message History onthe right side of the window.

The response is SIP/2.0 200 OK and the Message History displays ourservlet's message: Hello, World!.

431553-APR 901 753/3 Uen H 2009-02-13

Page 48: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 39 Message Successfully Triggers “Hello, World!” Servlet

Send 200 OK Message

Now we send a 200 OK to notify the server that the “Hello, World!” messagewas received.

7. Click the 200 OK button to the right of the Message History.

A SIP/2.0 200 OK message is generated and displayed in the MessageCreation editor.

8. Click the Send Message button.

The Servlet receives the SIP/2.0 200 OK message and it is displayed inthe history in green.

44 1553-APR 901 753/3 Uen H 2009-02-13

Page 49: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

3.1.8.1 Deregistering Coco

Once you are finished performing your tests, deregister user Coco. In the nextsection you will use the Automated Testing Framework (ATF) and user Cocowill interfere with the test user agent of the same name.

1. Click on New Request.

2. Fill in the following fields in the Request section:

• In the Method drop-down, select REGISTER.

• In the URI field, type sip:ericsson.com

• In the To section, change the Name field to coco, and the URI fieldto sip:[email protected].

3. In the Header section, click Add. A new row is created in the table.

• In the Name column, select Expires.

• In the Value column, type 0.

Figure 40 Deregister Request

451553-APR 901 753/3 Uen H 2009-02-13

Page 50: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

4. Click OK. The window is dismissed.

5. Click Send Message.

The message is sent. You should receive a 200 OK message.

3.1.9 Automated Tests

SDS also provides a tool called Automated Testing Framework (ATF), whichyou can use to create, edit, and run scripted test cases to automate thetesting of applications you develop. You define your user agent(s), (optionally)variables, and the steps for each test case you wish to run. ATF lets youtest your servlets in various ways, and you can quickly see the effect of anychanges you might make.

3.1.9.1 Starting the Automated Testing Framework

To start the ATF:

1. From the SDS menu, select SDS > Server > Automated TestingFramework.

The Automated Testing Framework window is displayed.

Figure 41 Automated Testing Framework

3.1.9.2 Creating an ATF Script

Creating an ATF script entails:

46 1553-APR 901 753/3 Uen H 2009-02-13

Page 51: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

1 Creating the script. The file is stored in .xml format.2 Defining your user agent(s).3 Defining your variable(s).4 Defining your test case(s) and steps.5 Selecting the test cases to run in a test suite.

3.1.9.3 Creating your ATF Script

ATF will create your scripts in the directory indicated in the Script Locationfield. You could either use one folder to save all your ATF scripts, or youcould save your ATF script in your workspace together with the project that ittests. The choice is yours. In our example, we created an ATF folder on theC: drive for easy navigation.

1. Click the Browse button and navigate to or create the directory where youwant to store your ATF script file, for example, C:\ATF

Figure 42 Select a Folder Containing ATF Scripts

2. Click OK to select the path and close the window.

3. Click the Add button to add a new script.

471553-APR 901 753/3 Uen H 2009-02-13

Page 52: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 43 Add Script

• The Reload and Remove buttons become available on the tool bar.• A script structure is created below, on the left.• A Script Edition field is displayed on the right.

The Automated Testing Framework window for this step looks like this:

Figure 44 Adding a New Script

4. Enter a name for the script, for example, HelloWorldATFTest.xml

• The Save button becomes available on the tool bar.• The name of the script in on the left changes to * HelloWorldATFTest.

xml. The * asterisk indicates that the script has changed and needsto be saved.

5. Click the Save icon.

3.1.9.4 Defining your User Agent

1. Click the icons to expand the test suite structure.

48 1553-APR 901 753/3 Uen H 2009-02-13

Page 53: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

Figure 45 Expanded ATF Structure

We will now define Coco as our user agent.

2. Select User Agents in the structure and click the Add button.

• A User Agent item appears under User Agents on the left.• A User Agent Edition set of fields is displayed on the right.

The Automated Testing Framework window for this step looks like this:

Figure 46 Adding User Agent

3. Edit the fields in User Agent Edition section to the right as follows:

• Change the Name field to Coco.

In the structure on the left, User Agent changes to Coco.• Change the Public ID field to sip:[email protected].• Leave everything else.

4. Click the Save icon.

491553-APR 901 753/3 Uen H 2009-02-13

Page 54: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

The Automated Testing Framework window for this step looks like this:

Figure 47 Coco as User Agent

3.1.9.5 Defining Variables

We will now create a variable to be used in the test later.

1. Select Variables in the structure and click the Add button.

• A Variable item appears under Variables on the left.

• A Variable Edition set of fields is displayed on the right.

The Automated Testing Framework window for this step looks like this:

Figure 48 Adding New Variable

2. Edit the fields in Variable Edition section to the right as follows:

50 1553-APR 901 753/3 Uen H 2009-02-13

Page 55: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

• Change the Name field to ServiceRoute.

In the structure on the left, Test Case changes to Hello World Test.• Leave everything else.

3. Click the Save icon.

The Automated Testing Framework window for this step looks like this:

Figure 49 Created Hello World Test Case

3.1.9.6 Defining your Test Case and Steps

We will now create our test case and define the individual steps.

1. Select Test Case in the structure and click the Add button.

• A Test Cases item appears under Test Cases on the left.• A Test Case Edition set of fields is displayed on the right.

The Automated Testing Framework window for this step looks like this:

511553-APR 901 753/3 Uen H 2009-02-13

Page 56: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 50 Adding Test Case

2. Edit the fields in Test Case Edition section to the right as follows:

• Change the Name field to Hello World Test.

In the structure on the left, Test Case changes to Hello World Test.• Leave everything else.

3. Click the Save icon.

The Automated Testing Framework window for this step looks like this:

Figure 51 Created Hello World Test Case

Scenario

To recall the scenario we used with the Test Agent (see Section 3.1.8 on page38):• Coco sends a REGISTER request to the server so that messages are

routed correctly back to this user.

52 1553-APR 901 753/3 Uen H 2009-02-13

Page 57: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

• The expected result is that the server responds with a 200 OK.• Coco sends a MESSAGE request to sip:[email protected] to

trigger the HelloWorldServlet.• The expected result is that the server sends back a 200 OK.• Then the server sends Coco the “Hello, World!” message.• Coco responds with a 200 OK.• Coco deregisters by sending a REGISTER request with expiry time 0.• The expected result is that the server sends back a 200 OK.

Now we need to add the individual steps to implement this test case.

Coco Sends REGISTER

1. Select Hello World Test in the structure and click the Add button.

• An Undefined agent sends ACK item appears under the Hello WorldTest case on the left.

• A Message Definition set of fields is displayed on the right.• Messages appear at the top of the screen to indicate the mandatory

fields.

The Automated Testing Framework window for this step looks like this:

Figure 52 Creating a Test Case Step

531553-APR 901 753/3 Uen H 2009-02-13

Page 58: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

2. Edit the fields in Message Definition as follows:

• User Agent: Select Coco from the drop-down list. Only users definedin the User Agents for this script can be used.

• Method and URI:

� Method: Select REGISTER from the drop-down list.

� Request URI: Type sip:ericsson.com in the field.

• Leave everything else.

3. Click the Save icon.

The Automated Testing Framework window for this step looks like this:

Figure 53 ATF - Coco sends REGISTER

CSCF Sends 200 OK

4. Click the Add button again.

A Coco sends ACK item appears under the Coco sends REGISTERitem on the left.

54 1553-APR 901 753/3 Uen H 2009-02-13

Page 59: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

Figure 54 ATF - Adding the Second Test Step

5. Edit the fields in Message Definition as follows:

Note: Some fields will change as appropriate when you make yourselection.

• Operation: Select Receive.• Message Type: Select Response.• Code and Reason: Select 200 OK from the drop-down list.• Leave everything else.

The Automated Testing Framework window for this step looks like this:

551553-APR 901 753/3 Uen H 2009-02-13

Page 60: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 55 ATF - Coco Receives 200 OK

From the received 200 OK message, the client must retrieve the service route.This is where the variable created earlier comes into use.

6. Click the Variable Update tab.

56 1553-APR 901 753/3 Uen H 2009-02-13

Page 61: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

Figure 56 ATF - Coco Receives 200 OK - Variable Update

7. Click Add

ATF inserts a new row in the Variable Update table, and automatically fillsin variable information from what is already defined under variable.

• Under Target Variable, ATF automatically inserts the ServiceRoutevariable created previously.

• Under Operation, ATF automatically inserts the Set operation.

• Under Value, select from the drop-down menu, or type$(message.header.service-route).

8. Click the Save icon.

The Automated Testing Framework window for this step looks like this:

571553-APR 901 753/3 Uen H 2009-02-13

Page 62: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 57 ATF - Coco Receives 200 OK - Variable Updated With ServiceRoute

Coco Sends MESSAGE to trigger HelloWorldServlet

9. Click the Add button again.

A new Coco sends ACK item appears under the Coco receives 200 OKitem on the left.

10. Click the Message Definition tab to select it.

11. Edit the fields in Message Definition as follows:

• Method and URI:� Method: Select MESSAGE from the drop-down list.� Request URI: Type sip:[email protected] in the field.� Leave everything else.

12. In the Headers section, click Add.

A new row appears in the table.

13. Define a new header:

• Under Name, select from the drop-down menu Route.

58 1553-APR 901 753/3 Uen H 2009-02-13

Page 63: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

• Under Value, select from the drop-down menu $(ServiceRoute).

14. Click the Save icon.

The Automated Testing Framework window for this step looks like this:

Figure 58 ATF - Coco Sends MESSAGE

Servlet Sends 200 OK

15. Click the Add button again.

A Coco sends ACK item appears under the Coco sends MESSAGEitem on the left.

16. Edit the fields in Message Definition as follows:

Note: Some fields will change as appropriate when you make yourselection.

• Operation: Select Receive.• Message Type: Select Response.• Code and Reason: Select 200 OK from the drop-down list.• Leave everything else.

591553-APR 901 753/3 Uen H 2009-02-13

Page 64: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

17. Click the Save icon.

The Automated Testing Framework window for this step looks like this:

Figure 59 ATF - Coco Receives 200 OK

Servlet Sends Hello, World! Message

18. Click the Add button again.

A new Coco sends ACK item appears under the Coco receives 200 OKitem on the left.

19. Edit the fields in Message Definition as follows:

Note: Some fields will change as appropriate when you make yourselection.

• Operation: Select Receive.• Method and URI:

� Method: Select MESSAGE from the drop-down list.� Request URI: leave blank.� Leave everything else.

The Automated Testing Framework window for this step looks like this:

60 1553-APR 901 753/3 Uen H 2009-02-13

Page 65: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

Figure 60 ATF - Coco Receives MESSAGE

20. Click the Add button to the right of the Message Content list.

A row in the table becomes editable.

• Condition: Leave equals

• Value: Type Hello, World! in the field.• Leave everything else.

21. Click the Save icon.

Coco Sends 200 OK

22. Click the Add button again.

A Coco sends ACK item appears under the Coco receives MESSAGEitem on the left.

23. Edit the fields in Message Definition as follows:

Note: Some fields will change as appropriate when you make yourselection.

• Message Type: Select Response.• Code and Reason: Select 200 OK from the drop-down list.

611553-APR 901 753/3 Uen H 2009-02-13

Page 66: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

• Leave everything else.

The Automated Testing Framework window for this step looks like this:

Figure 61 ATF - Coco Sends 200 OK

24. Click the Save icon.

Coco Sends de-REGISTER

25. Click the Add button.

26. Edit the fields in Message Definition as follows:

• Method and URI:� Method: Select REGISTER from the drop-down list.� Request URI: Type sip:ericsson.com in the field.

• Leave everything else.

27. In the Header section, click Add. A new row is created in the table.

• In the Name column, select Expires.

• In the Value column, type 0.

28. Click the Save icon.

62 1553-APR 901 753/3 Uen H 2009-02-13

Page 67: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

The Automated Testing Framework window for this step looks like this:

Figure 62 ATF - Coco sends REGISTER

CSCF Sends 200 OK

29. Click the Add button again.

A Coco sends ACK item appears under the Coco sends MESSAGEitem on the left.

30. Edit the fields in Message Definition as follows:

Note: Some fields will change as appropriate when you make yourselection.

• Operation: Select Receive.

• Message Type: Select Response.

• Code and Reason: Select 200 OK from the drop-down list.

• Leave everything else.

The Automated Testing Framework window for this step looks like this:

631553-APR 901 753/3 Uen H 2009-02-13

Page 68: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 63 ATF - Coco Receives 200 OK

3.1.9.7 Running Your Test Suite

Now let's set up the test suite to run the test case we just created.

1. Select Test Suites at the bottom of the structure and click the Addbutton.

• A Test Suite item appears under Test Suites on the left.• A Test Suite Edition set of fields is displayed on the right.

64 1553-APR 901 753/3 Uen H 2009-02-13

Page 69: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

Figure 64 Add Test Case

2. Click the Add button to the right of the Test Suite Execution Steps list.

A row in the table becomes editable.

• Type: Select Test Case from the drop-down list.

• Value: Select Hello World Test from the drop-down list.

• Leave everything else.

3. Click the Save icon.

The Automated Testing Framework window for this step looks like this:

651553-APR 901 753/3 Uen H 2009-02-13

Page 70: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 65 ATF - Hello World Test Case Added to Test Suite

Our test suite is ready to run.

4. Click the Run Test Suite button at the bottom of the screen.

If you have resized your screen, you may need to scroll to access it.

A progress dialog is displayed briefly.

66 1553-APR 901 753/3 Uen H 2009-02-13

Page 71: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

Figure 66 Running the Test Suite

A successful execution of the test suite displays a bright green dot and Passedin the Status column, and Hello, World! displayed in the console.

Figure 67 ATF - Successful Execution of the Test Suite

671553-APR 901 753/3 Uen H 2009-02-13

Page 72: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

3.1.9.8 Loading the Sample HelloWorldServlet ATF Script

SDS is installed with a sample ATF script which you can load and use as amodel for your own scripts.

To load the sample ATF scripts:

1. Click the Browse button. You can navigate to it using the directory tree orenter the absolute path to the sample script in the Folder field:

C:\Ericsson\SDS4.1FD1\Sample\Java\CSCandSE\HelloWorld\HelloWorldServlet\atf_scripts\

Figure 68 Select a Folder Containing ATF Scripts

2. Click OK.

The Test suite is represented in the view.

Figure 69 Automated Testing Framework Sample

3. Click the icons to expand the test suite structure.

68 1553-APR 901 753/3 Uen H 2009-02-13

Page 73: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

Figure 70 Automated Testing Framework Sample Expanded

3.1.9.9 Editing the Sample ATF Script

The ATF sample script provided with SDS uses Alice by default. We willchange Alice to Coco.

1. Click the icons to expand the test suite structure completely, includingUser Agents, Test Cases, the HelloWorld test case, and the Test Suites.

2. Highlight Alice under User Agents.

691553-APR 901 753/3 Uen H 2009-02-13

Page 74: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 71 ATF - Edit User Agent

3. Edit the fields in User Agent Edition section to the right as follows:

• Change the Name field to Coco.

Notice that in the Test Cases in the tree on the left, all instances ofAlice change to Coco.

• Change the Public ID field to sip:[email protected].• Leave everything else.

4. Click the Save icon.

5. Click on each of the Test Cases and observe how they implement thenecessary signaling flow to validate the servlet. This should be the sameas yours in the previous section.

3.1.9.10 Running the Sample ATF Script

To run this test script:

1. Expand the Test Suites node and highlight MessageSuite.

This displays the test suite interface to the right.

70 1553-APR 901 753/3 Uen H 2009-02-13

Page 75: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

Figure 72 Sample Test Suite Installed with SDS

2. Click the Run Test Suite button at the bottom of the test suite.

Note: You may need to resize your SDS or use the scroll bar on the rightto see the Run Test Suite button.

A progress dialogue appears briefly, indicating the progress of theexecution of the script.

A Console view opens in the workbench and displays the log ofcommunications.

A successful execution of the test suite displays a bright green dot andPassed in the Status column, and Hello, World! displayed in theconsole.

711553-APR 901 753/3 Uen H 2009-02-13

Page 76: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 73 ATF — Run Sample Test Suite

72 1553-APR 901 753/3 Uen H 2009-02-13

Page 77: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

3.1.10 Troubleshooting

If your “Hello, World!” servlet does not work, check the following:• Is your code correct? See Section 3.1.3 on page 15.• Are the CSCF and DNS server started? See Section 3.1.4 on page 19.• Is the user Coco correctly provisioned? See Section 3.1.5 on page 20.• Is the application deployed in the SIP Container? See Section 3.1.6 on

page 35 and Section 3.1.7 on page 36.• Have you followed the procedure without missing any steps?

3.1.11 Next Steps

Having developed, deployed, and tested your first SIP servlet using SDS,you are now aware of the many possibilities SDS can offer. Here are somevariations and similar services that you might want to explore developing:• You can modify the Java code to send a “Happy Birthday” message.• You can add a database to store users' birthdays and send a “Happy

Birthday” message to them on their birthdays.• You can send different messages on different days, for example:

� Today is <date>.� Have you tried our new gaming service? Try it today!

731553-APR 901 753/3 Uen H 2009-02-13

Page 78: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

3.2 “Hello, World!” Client Application

We will now develop an application using IMS Client Platform (ICP) to interactwith our HelloWorldServlet SIP application.

The steps to creating, deploying, and testing a client application are outlinedbelow:

1. Creating Your ICP Project

2. Adding the ICP Capabilities

3. Coding

4. Installing the Client in Windows

5. Starting the Execution Environment

6. Configuring the ICP User Profile

7. Restarting ICP

8. Deploying and Running Your Application

9. Troubleshooting

Note: If you did not select the ICP component among the components to be

installed when installing SDS, you cannot use this feature and theAdd ICP Capabilities icon will not appear in your SDS toolbar.

74 1553-APR 901 753/3 Uen H 2009-02-13

Page 79: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

3.2.1 Creating Your ICP Project

The first thing you need to do is create a new Client project.

1. On the SDS toolbar, click the New icon.

The New wizard is launched.

Figure 74 New Project Wizard – Select a Wizard

2. Under Java, double-click Java Project.

The Create a Java project screen appears. The Project Layoutconfiguration you specified when you created your HelloWorldServletproject does not need to be done again.

751553-APR 901 753/3 Uen H 2009-02-13

Page 80: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 75 New Java Project Wizard – Create a Java Project

3. In the Project name field type HelloWorldClient. You do not need tochange anything else.

76 1553-APR 901 753/3 Uen H 2009-02-13

Page 81: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

Figure 76 New Java Project Wizard – Create a Java Project

4. In the Project layout section:

• Ensure that the Create separate source and output folders optionis selected

• Click Configure default to check that the Source and Output foldersare src and bin, respectively.

771553-APR 901 753/3 Uen H 2009-02-13

Page 82: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 77 Preferences Filtered for Build Path

5. Click Finish

The wizard is closed and your HelloWorldClient project is added to thePackage Explorer view. It is shown here expanded.

Figure 78 Package Explorer

3.2.2 Adding the ICP Capabilities

1. With the HelloWorldClient project selected in the Package Explorer view,

click the Add ICP Capabilities icon in the toolbar.

The Add ICP Capabilities wizard is launched.

78 1553-APR 901 753/3 Uen H 2009-02-13

Page 83: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

The Source folder field displays HelloWorldClient/src.

Figure 79 Add ICP Capabilities Wizard

2. Complete the Add ICP Capabilities to Project page as follows:

• Leave Source folder as HelloWorldClient/src.• In the Package field type com.ericsson.• In the Name field type HelloWorldClient

• Leave the JRE 1.4 Support section as-is.

The Symbian Emulator supports only Java Runtime Environment (JRE)1.4, but we will not be running this application on the Symbian Emulator.

791553-APR 901 753/3 Uen H 2009-02-13

Page 84: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 80 Specify Class Name and Package

3. Click Next.

The next page prompts you to select the services to add to the project.

Figure 81 Select Services for the Project

4. Complete the page as follows:

80 1553-APR 901 753/3 Uen H 2009-02-13

Page 85: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

• Leave Defined Services check boxes blank. We do not need any ofthem for this simple client.

• In the Customized Services section click Add. A row in the ServiceIdentifier table becomes editable.

• Place your cursor in the first row of the Service Identifier table andtype +g.<service_id>.ericsson.com in the activated identifiercell, where <service_id> with the name service, for example, thename of your project.

• On your keyboard, press Enter to exit the table.

Figure 82 Select Services for the Project

5. Click Finish.

A HelloWorldClient class is added to your project, and a skeleton for yourclass is generated in the SDS code editor window.

811553-APR 901 753/3 Uen H 2009-02-13

Page 86: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 83 A Skeleton for Your Class is Generated in the Code Editor

All ICP clients require one or more listeners. Some listeners have many(mandatory) functions. In order to use even one function of a listener, you mustimplement all functions of that listener to use it.

To ease development, SDS creates adapter classes; adapters are simply anempty implementation of the listeners. The adapters provided with SDS area convenient way of implementing all functions of the listeners so that yourapplication has access to the functions it needs, and you do not have toimplement the functions it does not need.

The Add ICP Capabilities wizard not only created a skeleton for our clientapplication, it added three generic adapter classes to your project.

• PlatformAdapter.java

• ProfileAdapter.java

• ServiceAdapter.java

82 1553-APR 901 753/3 Uen H 2009-02-13

Page 87: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

Figure 84 Adapter Classes Added to Your Project

3.2.3 Coding

Next we need to add code that will send a MESSAGE message to ourHelloWorldServlet and trigger it to send a “Hello, World!” message in response.

Caution!

The back slash (\) is used to show where long lines are split. Do not leave themin the coding examples or your program will not work.

HelloWorldClient.java

The Add ICP Capabilities wizard created a skeleton for our client application,with the necessary imports and structure. We will now edit it.

1. If the HelloWorldClient.java code is not already displayed the codeeditor, double-click the HelloWorldClient.java class in the PackageExplorer. The class is opened in the code editor.

First we want to declare an isResponseReceived variable and set it tofalse.

831553-APR 901 753/3 Uen H 2009-02-13

Page 88: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

2. On a new line under public class HelloWorldClient{, type or copythe following line (comment optional):

/*** Variable to indicate if the message has been received.* Is set to true once the expected message is received.*/private static boolean isResponseReceived = false;

Next we need to edit the generated code. The ICP wizard generated themain class with a throws Exception. We will instead use a try blockfollowed by a catch block for exceptions.

3. Locate the main subroutine and delete throws Exception, leaving the {.

Your resulting code should look like this:

public static void main(String[] args) {

4. Insert a new line below and type try {

Your resulting code should look like this:

public static void main(String[] args) {try{

Now we need to create a catch block.

5. Scroll to the end of the file and position your cursor on the line above thefinal closing parenthesis.

6. Type or copy the code below into the code editor.

}catch (Exception e){

e.printStackTrace();}

This catches any exceptions and writes them to the trace logs.

Now we will return to the body of the code.

7. Review the generated code immediately inside the try block. You maywish to insert a new line with an annotation to understand what eachmethod does, as illustrated in the code excerpts below.

• A generic PlatformAdapter class was generated for you by the Add ICPCapabilities wizard. Here is the auto-generated code to implement it.We do not need to modify it, but you may wish to annotate it.

84 1553-APR 901 753/3 Uen H 2009-02-13

Page 89: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

// create the platform and its corresponding listenerIPlatform platform = ICPFactory.createPlatform();platform.registerClient("HelloWorldClient");

// register client applicationplatform.addListener(new PlatformAdapter());

• A generic ProfileAdapter class was generated for you by the Add ICPCapabilities wizard. Here is the auto-generated code to implement it.We do not need to modify it, but you may wish to annotate it.

// create the profile and its corresponding listenerIProfile profile = platform.createProfile("IMSSetting");profile.addListener(new ProfileAdapter());

• A generic ServiceAdapter class was generated for you by the Add ICPCapabilities wizard. Here is the auto-generated code to implement it.We do not need to modify it, but you may wish to annotate it.

// create an instance of a service. This can be used// to send instant messages afterwards.IService ghelloworldericssoncomService =\

profile.createService("+g.helloworld.ericsson\.com", "");

ghelloworldericssoncomService.addListener(new \ServiceAdapter());

Next we will add code to deal with incoming messages.

8. Insert your cursor before the ); and hit Enter twice to insert a blank line.

Your resulting code should look like this:

ghelloworldericssoncomService.addListener(new ServiceAdapter()

);

Here we will add a processMessage() method to print any receivedmessage, and to set the isResponseReceived variable to true.

9. Type or copy the following code above the ); (comment optional).

{/*** When a message is received, this method will print* it to the console and set the isResponseReceived flag* to indicate success.*/public void processMessage(String remote,

851553-APR 901 753/3 Uen H 2009-02-13

Page 90: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

String messageType, byte[] content, int length){

String message = new String(content);System.out.println(message);isResponseReceived = true;

}}

Next we will add code to send an outgoing response through ICP.

10. Insert a new line after the ); and type or copy the following code (commentoptional).

// send a message through ICPbyte[] message = "Hello, Mercury!".getBytes();ghelloworldericssoncomService.sendMessage(profile.\getIdentity(), "sip:[email protected]", \"text/plain", message, message.length);

This code creates a message saying “Hello, Mercury!” and sends it to theservice.

We will also specify a time-out of 30 seconds for a reply.

11. On a new line, type or copy the code below into the code editor (commentoptional).

// Specify 30 second time out.long startTime = System.currentTimeMillis();long timeElapsed = 0;long DELAY = 30 * 1000;

Finally, we implement the logic to wait for a response and if it is not receivedwithin the 30 second delay, we print a “Goodbye, World!” message instead.

12. On a new line, type or copy the code below into the code editor (commentoptional).

// wait/notify mechanism could be used as wellwhile (timeElapsed < DELAY){

timeElapsed = System.currentTimeMillis() - startTime;Thread.sleep(100);

}if(!isResponseReceived){

System.out.println("Message not received. Goodbye, World!");}

86 1553-APR 901 753/3 Uen H 2009-02-13

Page 91: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

13. Press Ctrl+Shift+F (formatting) to realign the indentations.

Your finished code should look similar to the code below.

If not, for the purpose of completing this tutorial, you may want to replace thecontent of your HelloWorldClient.java class with the example code providedbelow.

871553-APR 901 753/3 Uen H 2009-02-13

Page 92: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

package com.ericsson;

import com.ericsson.icp.ICPFactory;

public class HelloWorldClient{

/*** Variable to indicate if the message has been received. Is set to true* once the expected message is received.*/ private static boolean isResponseReceived = false;

public static void main(String[] args) {try {

// create the platform and its corresponding listenerIPlatform platform = ICPFactory.createPlatform();platform.addListener(new PlatformAdapter());

// create the profile and its corresponding listenerIProfile profile = platform.createProfile("IMSSetting");profile.addListener(new ProfileAdapter());

// register client applicationplatform.registerClient("HelloWorldClient");

// create an instance of a service. This can be used to send instant messages afterwards.IService ghelloworldericssoncomService = profile.createService("+g.helloworld.ericsson.com", "");ghelloworldericssoncomService.addListener(new ServiceAdapter(){

/*** When a message is received, this method will print it to the console and set the* <code>isResponseReceived</code> flag to indicate success.*/public void processMessage(String remote, String messageType, byte[] content, int length){

String message = new String(content);System.out.println(message);isResponseReceived = true;

}});

// send a message through ICPbyte[] message = "Hello, Mercury!".getBytes();ghelloworldericssoncomService.sendMessage(profile.getIdentity(),

"sip:[email protected]", "text/plain",message, message.length);

// Specify 30 second time out.long startTime = System.currentTimeMillis();long timeElapsed = 0;long DELAY = 30 * 1000;

// wait/notify mechanism could be used as wellwhile (timeElapsed < DELAY) {

timeElapsed = System.currentTimeMillis() - startTime;Thread.sleep(100);

}if(!isResponseReceived) {

System.out.println("Message not received. Goodbye, World!");}

} catch (Exception e) {e.printStackTrace();

}}

}

Example 2 HelloWorldClient.java

14. Press Ctrl+S to save.

Now we are going to look at the generated listeners.

88 1553-APR 901 753/3 Uen H 2009-02-13

Page 93: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

PlatformAdapter.java

1. Double-click the PlatformAdapter.java class in the Package Explorer.The class is opened in the code editor.

2. Replace the arg0 and error arguments in the auto-generated code withaError in both methods.

3. You can optionally annotate or delete the auto-generated TODO comments.

Your finished code should look similar to the code below.

If not, for the purpose of completing this tutorial, you may want to copy the codebelow into your PlatformAdapter.java class.

package com.ericsson;

import com.ericsson.icp.IPlatformListener;

public class PlatformAdapter implements IPlatformListener {

public void processPlatformTerminated(ErrorReason aError) {

}

public void processError(ErrorReason aError) {

}}

4. Press Ctrl+Shift+F (formatting) to realign the indentations.

5. Press Ctrl+S to save.

ProfileAdapter.java

The implemented adapters can be used as-is. If you wish, you can deletethe auto-generated TODO comments.

ServiceAdapter.java

The implemented adapters can be used as-is. If you wish, you can deletethe auto-generated TODO comments.

3.2.4 Installing the Client in Windows

Now we need to install the client in Windows.

1. With the HelloWorldClient project selected in the Project Explorer, from theSDS menu, select SDS > Client > Install Client in Windows

891553-APR 901 753/3 Uen H 2009-02-13

Page 94: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

The Install Client in Windows wizard is launched.

Figure 85 HelloWorldClient in Windows

2. Select HelloWorldClient and click Next.

The Select project resources page is displayed.

90 1553-APR 901 753/3 Uen H 2009-02-13

Page 95: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

Figure 86 Select Project Resources

3. Click Next.

The Define the application deployment information page is displayed.

911553-APR 901 753/3 Uen H 2009-02-13

Page 96: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 87 Define the Application Deployment Information

4. In the Application deploy path navigate to an existing folder that willcontain your ICP application, for example, C:\ICPapps

Note: If the folder does not exist, create it first.

5. In the Application Main Class list, highlight com.ericsson.HelloWorldClient.

6. Click Finish.

A progress message and then an Install Client Completed message aredisplayed.

7. Click OK to dismiss the dialog box. Your client is ready to test.

3.2.5 Starting the Execution Environment

Once the .jar files are in the application folder and the .xml file is in theClients folder, start the execution environment.

Note: If these are still running from the previous exercise, they do not need tobe restarted; you can skip to the next section.

92 1553-APR 901 753/3 Uen H 2009-02-13

Page 97: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

3.2.5.1 Starting the Emulated Nodes

1. From the SDS menu, select SDS > Server > CSCF > Start CSCF.

Note: If the option is unavailable, this means the CSCF is already started.

You will see a progress dialog followed by a wait cursor.

The Console view displays the CSCF logging.

2. From the SDS menu, select SDS > Server > DNS > Start DNS.

Note: If the option is unavailable, this means the DNS server is alreadystarted.

You will see a progress dialog followed by a wait cursor.

The Console view displays the DNS logging.

3.2.5.2 Starting the Sailfin SIP Container

ICP functionality uses PGM, which runs on the Sailfin SIP Container, so youmust start it to be able to run this application.

To set the default server of the application to Sailfin do the following:

1. Switch to the Java EE perspective by clicking the >> arrow at the top rightof the SDS window and selecting Java EE.

Figure 88 Switch to Java EE Perspective

2. From the Servers view (J2EE Perspective), right-click on Sailfin v1and from the context menu select Start.

931553-APR 901 753/3 Uen H 2009-02-13

Page 98: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 89 Servers View - Starting Sailfin

The starting process is displayed in Console. When it is over, the statedisplayed in the Servers view goes from Stopped to Started.

3.2.6 Configuring the ICP User Profile

ICP comes preconfigured with a user profile for Alice. We will now change thisto our provisioned user, Coco.

1. In Windows, select Start > Settings > Control Panel.

The Windows Control Panel opens.

2. Double-click on the IMS Settings icon.

The ICP Properties window opens.

94 1553-APR 901 753/3 Uen H 2009-02-13

Page 99: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

Figure 90 ICP Properties

3. Click on the Profile Manager tab.

Figure 91 ICP Properties - Profile Manager

4. Click the Configuration Button.

The IMSSetting window appears, displaying the IMS Attach Mode tab.

951553-APR 901 753/3 Uen H 2009-02-13

Page 100: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 92 IMSSetting - IMS Attach Mode Tab

5. Click on the User Profile tab.

Figure 93 IMSSetting - User Profile Tab

ICP comes preconfigured with a user profile for Alice.

We will now change this to our provisioned user, Coco.

6. Update the User Profile as follows:

• Change Public User ID to sip:[email protected].• Change Private User ID to [email protected].• Change Password to coco.• Click Apply.

96 1553-APR 901 753/3 Uen H 2009-02-13

Page 101: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

Figure 94 IMSSetting - User Profile Tab

7. Click OK.

The IMSSetting window is dismissed.

8. Click OK in the ICP Properties window.

The ICP Properties window is dismissed.

971553-APR 901 753/3 Uen H 2009-02-13

Page 102: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

3.2.7 Restarting ICP

1. In Windows, select Start > Run.

The Windows Run dialog opens.

Figure 95 Windows Run Dialog

2. Type services.msc and press Enter.

The Services window is displayed.

Figure 96 Services Window

3. Scroll through the list and select the IMS Client Platform service.

4. Click the Restart button on the toolbar.

A Service Control message shows the progress of the restart.

Figure 97 Services Window

98 1553-APR 901 753/3 Uen H 2009-02-13

Page 103: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

5. Dismiss the Services window.

3.2.8 Deploying and Running Your Application

To run your client application so that it triggers the HelloWorldServlet:

1. In the Package Explorer, right-click the HelloWorldClient.java mainclass.

2. From the pop-up menu, select Run As > Java Application.

Figure 98 Run your Java Application from SDS

A dialog box will appear briefly and the Console will show activity.

991553-APR 901 753/3 Uen H 2009-02-13

Page 104: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

3. Switch to the console view for the HelloWorldClient application bydropping down the Display Selected Console list on the view's toolbarand selecting it from the list of open consoles.

Figure 99 Switch Console

Successful execution of your application will display a Hello, World!message.

Figure 100 Hello, World!

Note: You can also run your application in a DOS session with the batch file:

• In a DOS session, change to the deployment directory. By default,this is C:\ICPapps\HelloWorldClient.

• Run HelloWorldClient.bat

Hello, World! is returned.

100 1553-APR 901 753/3 Uen H 2009-02-13

Page 105: Plugin-Service Development Studio4.1Tutorial

Creating Your First SIP Servlet and Client

Figure 101 Hello, World! in DOS

3.2.9 Troubleshooting

If your HelloWorldClient does not trigger the HelloWorldServlet, check thefollowing:• Are your user(s) provisioned? See Section 3.1.5 on page 20.• Is the HelloWorld servlet deployed? See Section 3.2.8 on page 99.• Are your listeners in the com.ericsson package? Is your client application

code correct? See Section 3.2.3 on page 83.• Is your client installed in Windows? See Section 3.2.4 on page 89.• Are the DNS and the CSCF both started? See Section 3.2.5 on page 92.• Have you followed the procedure without missing any steps?• Try restarting the ICP Windows Service. See Section 7.2 on page 215.

3.2.10 Stopping the Execution Environment

Now that we have successfully completed our first “Hello, World!” applications,we are going to stop the servers for two reasons:• First, to bring to your attention that the SIP container, CSCF, and DNS

server continue to run (and use your system's resources) even after youexit SDS. This can affect the performance of your system.

• Second, in the following tutorial, you will be introduced to the VisualNetwork, which, among other things, provides an alternate means ofstarting and stopping these servers.

To Stop the Execution Environment

1. From the SDS menu, select SDS > Server >CSCF > Stop CSCF.

An Operation in Progress dialog appears briefly and the Console viewindicates that the server is stopped.

1011553-APR 901 753/3 Uen H 2009-02-13

Page 106: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

2. From the SDS menu, select SDS > Server > DNS > Stop DNS.

An Operation in Progress dialog appears briefly and the Console viewindicates that the server is stopped.

To Stop the Sailfin Application Server

The Sailfin application server will keep on running even if you close SDS. Youmust manually stop it or it will keep on using system resources.

1. In the Servers view (Java EE perspective), right-click on Sailfin v1 andfrom the context menu select Stop.

Figure 102 Servers - Stopping Sailfin

The stopping process is displayed in Console. When it is over, the state of theapplication server goes from Started to Stopped.

102 1553-APR 901 753/3 Uen H 2009-02-13

Page 107: Plugin-Service Development Studio4.1Tutorial

Guess Client / Server Application

4 Guess Client / Server Application

In this example, we are going to create a simple game where the serverapplication asks you to guess a number. You have to guess the number, andthe servlet responds by telling you to guess higher, lower, or if you got it right.

This exercise is more complex, and assumes you have completed andunderstood the “HelloWorld!” exercises in the previous chapter. The Guessclient application will have a Graphical User Interface (GUI) with which the usercan interact, and we will install and run it on both Windows and the SymbianEmulator.

4.1 Overview of the Projects

We will now develop the servlet and ICP client application for our Guess game.Here are the steps to follow:

1. Creating the Projects

2. Understanding the Code

3. Starting the Execution Environment

4. Configuring the CSCF

5. Setting the Default Runtime Server

6. Deploying the GuessServlet

7. Installing the GuessClient in Windows

8. Checking the Execution Environment

9. Configuring ICP

10. Playing the Guess Game in Windows

11. Testing Guess in the Test Agent

12. Troubleshooting

13. Running Guess in the Symbian Emulator

1031553-APR 901 753/3 Uen H 2009-02-13

Page 108: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

4.2 Creating the Projects

We will create two new projects called GuessServlet and GuessClient,respectively.

This time, we are going to create the projects by importing the sample codeprovided with SDS.

4.2.1 Importing the Code Samples

These projects are provided as sample code in the directoryC:\Ericsson\SDS4.1FD1\Sample\, if you have installed SDS on thedefault path.

Note: If you have installed SDS elsewhere than the default, your path willvary accordingly.

1. From the SDS menu, select File > Import.

The Import wizard is displayed.

Figure 103 Import Wizard

2. Select the Existing Projects into Workspace item and click Next.

104 1553-APR 901 753/3 Uen H 2009-02-13

Page 109: Plugin-Service Development Studio4.1Tutorial

Guess Client / Server Application

The Import Projects page of the wizard is displayed.

Figure 104 Import Projects

3. Click Browse.

Figure 105 Browse For Folder Window

1051553-APR 901 753/3 Uen H 2009-02-13

Page 110: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

4. Navigate to the path Java\CDCandSE\Guess and click OK.

The Projects list displays the GuessClient and GuessServlet projectsalready selected. Since there is both a JSR 116 and JSR 289 versionof the GuessServlet, for the purposes of this tutorial, unselect theGuessServlet-JSR116 project.

Figure 106 Import Guess Client and Servlet

5. Select Copy projects into workspace.

This is recommended so that if you modify the code and wish to revert tothe original code, you can simply re-import it.

6. Click Finish.

The GuessClient and GuessServlet projects are imported into theworkspace.

106 1553-APR 901 753/3 Uen H 2009-02-13

Page 111: Plugin-Service Development Studio4.1Tutorial

Guess Client / Server Application

Figure 107 GuessClient and GuessServlet Projects Added to PackageExplorer

1071553-APR 901 753/3 Uen H 2009-02-13

Page 112: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

4.3 Understanding the Code

The code for the GuessClient and GuessServlet projects is imported. Theprovided code has been annotated with comments to help you understandwhat it does.

As the projects are more complex than the HelloWorld example, and requiremultiple class files, explaining the Java coding line by line is outside the scopeof this Tutorial. Rather, this section provides a high-level overview of what theprovided sample code does.

4.3.1 Signaling Flow

Here is the SIP signaling flow that will happen for this application:

1. The first request is a REGISTER. Registration is required so that messagesaddressed to this particular user are routed to the correct contact.

The server response is SIP/2.0 200 OK.

2. The Client sends an INVITE message, which triggers the GuessServlet.

The Server sends a 200 OK.

3. The Client sends an ACK message to establish the session.

The Server sends a MESSAGE prompting you to guess a number between 0and 10.

4. The Client sends a 200 OK to notify the server that the message wasreceived.

5. Now the Client sends the server a MESSAGE with a guess.

• If you guessed right, the server sends a MESSAGE saying Good Guessand a BYE message.

• If you guessed wrong, the server responds with a 200 OK and aMESSAGE telling you to guess again, with a hint to guess higher or lower.

6. The Client sends a 200 OK to notify the server that the message wasreceived.

7. If the Client has not guessed right, it must send the server aMESSAGEmessage with another guess.

• If you guessed right, the server sends a MESSAGE saying Good Guessand a BYE message.

• If you guessed wrong, the server responds with a 200 OK and aMESSAGE telling you to guess again, with a hint to guess higher or lower.

8. The Client sends a 200 OK to notify the server that the message wasreceived.

108 1553-APR 901 753/3 Uen H 2009-02-13

Page 113: Plugin-Service Development Studio4.1Tutorial

Guess Client / Server Application

9. If the Client has not guessed right, it must send the server a MESSAGEwith another guess.

• If you guessed right, the server sends a MESSAGE saying Good Guessand a BYE message.

• If you guessed wrong, the server responds with a 200 OK and aMESSAGE telling you to guess again, with a hint to guess higher or lower.

10. The Client sends a 200 OK to notify the server that the message wasreceived.

11. The Client sends a BYE to end the session.

The Server sends a 200 OK.

4.3.2 ICP Adapters

In addition to the main Java class which contains the logic of the application,ICP client applications also require some ICP adapters in order to work. One ormore of these adapters are needed for every ICP client application. In the caseof the GuessClient project, the following adapter classes are provided:

• PlatformAdapter.java

Implements the IPlatformListener ICP interface, which is required to createan IProfile.

• ProfileAdapter.java

Implements the IProfileListener ICP interface, which is required to createan IService.

• ServiceAdapter.java

Implements the IServiceListener ICP interface, which is required to createan ISession.

• SessionAdapter.java

Implements the ISessionListener ICP interface, to capture the followingevents implemented by our Guess client.� processError� processSessionStartFailed� processSessionMessage

1091553-APR 901 753/3 Uen H 2009-02-13

Page 114: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

4.3.3 Client GUI

The user will interact with a Graphical User Interface (GUI) to usethis application. SDS provides the GuessNumberDialog.java andMessageDialog.java classes for the GuessClient application, and imports therequired Java AWT. You can study, reuse, or modify the code in these classesto implement your own GUI for other applications you may develop.

4.4 Starting the Execution Environment

We are now going to access the Visual Network perspective, which provides avisual representation of the state of your servers, and allows quick access totheir properties, starting, and stopping them.

4.4.1 Adding Servers to the Visual Network View

The Visual Network has a icon-driven GUI and allows you to select whichemulators to represent and provides quick access to their properties andchanging their states. When an emulator is started, a symbol appears next tothe icon to indicate this.

1. From the SDS menu, select SDS > Server > Visual Network.

This launches the Visual Network perspective.

Figure 108 Visual Network View

110 1553-APR 901 753/3 Uen H 2009-02-13

Page 115: Plugin-Service Development Studio4.1Tutorial

Guess Client / Server Application

2. Add the CSCF server to the Visual Network view.

• Click on the CSCF icon (green dot) in the bar on the right. Your cursorgoes into the drag-and-drop state.

• Click anywhere in the client area of the Visual Network perspective.

An icon representing the CSCF is added to the Visual Networkperspective.

Figure 109 CSCF Added to the Visual Network View

3. Add the DNS to the Visual Network perspective.

• Click on the DNS icon (orange dot) in the bar on the right. Your cursorgoes into the drag-and-drop state.

• Click anywhere in the client area of the perspective.

An icon representing the DNS is added to the Visual Networkperspective.

1111553-APR 901 753/3 Uen H 2009-02-13

Page 116: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 110 Visual Network View with CSCF and DNS

4.4.2 Starting Servers in the Visual Network View

The Visual Network view allows you to start and stop the execution environment.

1. Start the CSCF by right-clicking the icon and selecting the Start option.

Figure 111 Start the CSCF in the Visual Network Perspective

A symbol next to the CSCF server icon indicates it is running.

2. Start the DNS by right-clicking the icon and selecting the Start option.

Figure 112 Start the DNS in the Visual Network View

A symbol next to the DNS server icon indicates it is running.

112 1553-APR 901 753/3 Uen H 2009-02-13

Page 117: Plugin-Service Development Studio4.1Tutorial

Guess Client / Server Application

The next figure below shows both servers started.

Figure 113 Visual Network - Execution Environment Started

4.4.3 Starting the SIP Container Server

ICP functionality uses PGM, which runs on the Sailfin SIP Container, so youmust start it to be able to run this application.

To set the default server of the application to Sailfin do the following:

1. Switch to the Java EE perspective by clicking the >> arrow at the top rightof the SDS window and selecting Java EE.

Figure 114 Switch to Java EE Perspective

2. From the Servers view, right-click on Sailfin v1 and from the contextmenu select Start.

1131553-APR 901 753/3 Uen H 2009-02-13

Page 118: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 115 Servers View - Starting Sailfin

The starting process is displayed in Console. When it is over, the statedisplayed in the Servers view goes from Stopped to Started.

4.5 Configuring the CSCF

The CSCF needs to be configured with new trigger rules to trigger yourapplication on an initial INVITE request.

Note: It is assumed you followed the HelloWorld tutorial the last time youwere in the Provisioning perspective, and that the DNS and HSS arealready provisioned as described in section Section 3.1.5 on page20. The configuration in this section is in addition to the configurationrequired for the HelloWorld exercises.

4.5.1 DNS

For this exercise, we will use the same mydomain.com domain from theHelloWorld exercises.

1. From the SDS menu, select SDS > Server > Provisioning.

This launches the Provisioning perspective displaying the last view andtab you were in.

114 1553-APR 901 753/3 Uen H 2009-02-13

Page 119: Plugin-Service Development Studio4.1Tutorial

Guess Client / Server Application

2. Select the DNS tab.

3. Under the DNS tab, select the SIP/SIPS Keys tab.

A DNS record for sip:mydomain.com should exist from the HelloWorldexercise.

Figure 116 DNS Provisioning for sip:mydomain.com

4. If the DNS does not include sip:mydomain as above, provision it asfollows:

• Click Add at the right of the list.

• In the URI section, change Host to mydomain.com

• In the DNS Record section, note that the IP Address field automaticallypicks up the IP of the local machine. Change it to the IP address in theSIP container's preferences (by default this is 127.0.0.1).

• Leave everything else.

• Click Save.

4.5.2 Initial Filter Criteria

The game needs to be triggered on an INVITE when the request URI issip:[email protected]. To achieve this, we will create two ServicePoint Triggers in the same group and make sure that they are both true beforecalling the application server.

1151553-APR 901 753/3 Uen H 2009-02-13

Page 120: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

First we’ll need to change the Condition Type setting in the iFC to All triggerstrue in a group and at least one group true. Then we will define the twoService Point Triggers.

In the Provisioning perspective:

1. Select the HSS tab.

2. Select the Initial Filter Criteria tab.

3. Select the Definition tab if it is not displayed by default.

4. Click Add.

This creates a new Initial Filter Criteria named ifckey1 and populatesseveral of the fields in the tab with default values.

• In the Initial Filter Criteria section, change Name to Guess. Thename of ifckey1 in the list changes to this name simultaneously.

• In the Application Server section, change Server Address tosip:mydomain.com.

• Leave everything else.

Figure 117 Adding an iFC for “Guess”

5. Click Save.

116 1553-APR 901 753/3 Uen H 2009-02-13

Page 121: Plugin-Service Development Studio4.1Tutorial

Guess Client / Server Application

4.5.3 Service Point Triggers

We will now add two Service Point Triggers, one for the Guess INVITE andone for the Guess REQUEST URI.

In the Provisioning perspective:

1. Select the Service Point Trigger tab under Initial Filter Criteria.

2. Click Add at the bottom of the list.

This creates an SPT1 and populates several of the fields in the tab withdefault values.

3. Change Name to Guess Invite. The name of SPT_1 in the list changesto this name simultaneously.

4. Make the following changes in the Trigger Definition section:

• In the Trigger Type field, select SIP Method from the drop-down list.Your selection in this drop-down list alters the label of the field belowto Method.

• In the Method field, select INVITE from the drop-down list.• Leave everything else.

Figure 118 SPT for “Guess Invite”

1171553-APR 901 753/3 Uen H 2009-02-13

Page 122: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

5. Click Add at the bottom of the list to add the second trigger.

This creates a new SPT2 and populates several of the fields in the tabwith default values.

• Change Name to Guess Request URI. The name of SPT_2 in thelist changes to this name simultaneously.

6. Make the following changes in the Trigger Definition section:

• In the Trigger Type field, select Request URI from the drop-down list.• In the Value field, type sip:[email protected]• Leave everything else.

Figure 119 SPT for “Guess Request URI”

7. Click Save.

4.5.4 Service Profile

Now we need to add the initial filter criteria and service point triggers to theservice profile.

In the Provisioning perspective, do the following:

1. Select the Service Profile tab under HSS.

118 1553-APR 901 753/3 Uen H 2009-02-13

Page 123: Plugin-Service Development Studio4.1Tutorial

Guess Client / Server Application

2. Select the TutorialProfile item in the Select Service Profile list.

3. Put a check beside Guess in the Initial Filter Criteria Combinationsection.

Figure 120 Adding Guess iFC to the TutorialProfile

4. Click Save.

4.5.5 User Profile

The Guess game requires a provisioned user to be accessed. We will reusethe user profile Coco from the Hello World exercise.

In the Provisioning perspective, do the following:

1. Select the User Profile tab under HSS.

A user profile for Coco should exist from the previous exercise.

1191553-APR 901 753/3 Uen H 2009-02-13

Page 124: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 121 User Profile for Coco is Provisioned as Above

2. If no User Profile for Coco exists, provision it as follows:

• Click Add.• In the Public User ID type sip:[email protected]

• In the Private User ID type [email protected]

• In the Password type coco

• In the Service Profile select TutorialProfile from the drop-downlist.

• Click Save.

120 1553-APR 901 753/3 Uen H 2009-02-13

Page 125: Plugin-Service Development Studio4.1Tutorial

Guess Client / Server Application

4.5.6 PSI Profile

A Public Service Identity (PSI) is used to identify groups and services. For thepurpose of this tutorial, we do not need to provision one.

1211553-APR 901 753/3 Uen H 2009-02-13

Page 126: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

4.6 Setting the Default Runtime Server

Now determine the server on which the application will run. To set the defaultserver of the application to Sailfin, do the following:

1. Switch to the Java EE perspective by clicking the >> arrow at the top rightof the SDS window and selecting Java EE.

Figure 122 Switch to Java EE Perspective

2. In Package Explorer view, select the GuessServlet project and right-clickit.

3. In the context menu, select Properties.

4. In the Navigation Tree, select Server.

The Properties window is displayed.

122 1553-APR 901 753/3 Uen H 2009-02-13

Page 127: Plugin-Service Development Studio4.1Tutorial

Guess Client / Server Application

Figure 123 Project Properties Window - Server

5. Select Sailfin v1.

6. Click Apply.

7. Close the Properties window by clicking OK.

4.7 Deploying the GuessServlet

To deploy and start the application on the Sailfin server, do the following:

1. In SDS, select the project and right-click it.

2. In the context menu, select Run As > Run on Server.

A progress bar appears at the bottom of the SDS window showing theSailfin server being started.

Figure 124 Sailfin Server Progress Bar

1231553-APR 901 753/3 Uen H 2009-02-13

Page 128: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

After a minute, the servlet is deployed. In the server view, you can see theSailfin v1 server, its state (Started) and status (Synchronized).

Figure 125 Servers View - Sailfin Server

In the Console view, the message BUILD SUCCESSFUL is displayed whenthe deployment is over.

The Internal Web Browser window is also automatically opened.

4.8 Installing the GuessClient in Windows

Now we will install and run the GuessClient in Windows.

1. From the SDS menu, select SDS > Client > Install Client in Windows.

The Install Client in Windows wizard is launched.

Figure 126 Select Client to Install

2. Select GuessClient and click Next.

The Select project resources screen is displayed.

124 1553-APR 901 753/3 Uen H 2009-02-13

Page 129: Plugin-Service Development Studio4.1Tutorial

Guess Client / Server Application

Figure 127 Select Project Resources

3. Click Next.

The Define the application deployment information screen is displayed.

• Application Name is provided. Leave GuessClient

1251553-APR 901 753/3 Uen H 2009-02-13

Page 130: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 128 Define the Application Deployment Information

4. In the Application deploy path navigate to an existing folder that will containyour ICP application. By default, this is C:\ICPapps\GuessClient.

5. Highlight com.ericsson.sds.samples.guess.GuessClient in theApplication Main Class list.

6. Click Finish.

A progress message and then an Install Client Completed message aredisplayed.

126 1553-APR 901 753/3 Uen H 2009-02-13

Page 131: Plugin-Service Development Studio4.1Tutorial

Guess Client / Server Application

4.9 Checking the Execution Environment

To play our game, we need to make sure the execution environment is properlystarted.

1. If the Visual Network view is not already opened, open it now. From theSDS menu, select SDS > Server > Visual Network.

If your Visual Network view does not look something like the figure below,refer back to Section 4.4 on page 110.

Figure 129 Visual Network - Execution Environment Started

1271553-APR 901 753/3 Uen H 2009-02-13

Page 132: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

4.10 Configuring ICP

1. In Windows, select Start > Settings > Control Panel.

The Windows Control Panel opens.

2. Double-click the IMS Settings icon.

Figure 130 Control Panel

The ICP Properties window opens.

Figure 131 ICP Properties

3. Click on the Profile Manager tab.

128 1553-APR 901 753/3 Uen H 2009-02-13

Page 133: Plugin-Service Development Studio4.1Tutorial

Guess Client / Server Application

Figure 132 ICP Properties - Profile Manager

4. Click the Configuration Button.

The IMSSetting window appears, displaying the IMS Attach Mode tab.

Figure 133 IMSSetting - IMS Attach Mode tab

5. Click on the User Profile tab.

1291553-APR 901 753/3 Uen H 2009-02-13

Page 134: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 134 IMSSetting - User Profile tab

ICP comes preconfigured with a user profile for Alice.

Previously, we changed these configurations to user profile Coco. However, ifAlice is the currently configured user, change it to Coco as described below:

6. Update the User Profile as follows:

• Change Public User ID to sip:[email protected].

• Change Private User ID to [email protected].

• Change Password to coco.

• Click Apply.

Figure 135 IMSSetting - User Profile

7. Click on the Profile Status tab.

130 1553-APR 901 753/3 Uen H 2009-02-13

Page 135: Plugin-Service Development Studio4.1Tutorial

Guess Client / Server Application

Figure 136 IMSSetting - Profile Status

8. Click the Stop Profile button and wait for the displayed status to beStopped.

9. Click the Start Profile button and wait for the displayed status to beRegistered.

10. Click OK.

The IMSSetting window is dismissed.

11. Click OK in the ICP Properties window.

The ICP Properties window is dismissed.

1311553-APR 901 753/3 Uen H 2009-02-13

Page 136: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

4.11 Playing the Guess Game in Windows

Let's try it now in Windows.

1. Switch to the Java EE perspective.

2. In the Package Explorer, right-click the GuessClient.java main class.

3. From the popup menu, select Run As > Java Application.

Figure 137 Run GuessClient as Java Application

A Guess Game Client Java application window is launched.

132 1553-APR 901 753/3 Uen H 2009-02-13

Page 137: Plugin-Service Development Studio4.1Tutorial

Guess Client / Server Application

Figure 138 Guess Game Client Application Window

4. In the Java application window, click New Game.

Our Guess a number interface dialog is launched.

Note: You should see some traffic in the CSCF and SIP Containerconsoles.

5. Type a number between 0 and 10 and press Enter or click OK.

• If you guessed too high, you are prompted to guess again with thefollowing hint:

• If you guessed too low, you are prompted to guess again with thefollowing hint:

• If you guessed right, the game is over:

1331553-APR 901 753/3 Uen H 2009-02-13

Page 138: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

6. Play until you guess correctly. Click OK to dismiss the message whenyou have won.

7. To play again, click New Game in the Java window.

Figure 139 Play Again

8. To exit the game, click Quit.

The game is closed.

4.12 Testing Guess in the Test Agent

Now let's test the game using the Test Agent.

Conditions

Before you can use the Test Agent, the following conditions must be met:• Your application is deployed. See Section 4.7 on page 123.• Your user(s) are provisioned. See Section 4.5 on page 114.• ICP is restarted and configured. See Section 4.5 on page 114.• SIP Container, CSCF, and DNS are started. See Section 4.9 on page 127.

4.12.1 Start Test Agent

• From the SDS menu, select SDS > Server > Start Test Agent.

The SDS Test Agent window is displayed.

134 1553-APR 901 753/3 Uen H 2009-02-13

Page 139: Plugin-Service Development Studio4.1Tutorial

Guess Client / Server Application

Figure 140 SDS Test Agent

We will now follow the signaling flow using the test agent. We will form andsend the GuessClient messages and validate that the GuessServlet respondswith the expected responses.

ATTENTION: The SIP Application Session may time out if you take too longbetween sending messages. If this happens, simply restart by sending a NewInitial Request of method INVITE to launch a new session (it is not necessaryto register again).

1351553-APR 901 753/3 Uen H 2009-02-13

Page 140: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

4.12.2 Testing with Test Agent

Here is the SIP signaling flow that will happen for this application.

C GuessClient GuessServlet S

1 REGISTER

200 OK 1

2 INVITE

200 OK 2

3 ACK

MESSAGE(Guess a number)

3

4 200 OK 4

5 MESSAGE (Iguess 6)

200 OK 5

MESSAGE(Number is lower.Guess again)

5

6 200 OK 6

7 MESSAGE (Iguess 2)

200 OK 7

MESSAGE(Number ishigher. Guessagain)

7

8 200 OK 8

9 MESSAGE (Iguess 4)

200 OK 9

MESSAGE(You're right!)

9

10 200 OK 10

11 BYE

200 OK 11

BYE 11

136 1553-APR 901 753/3 Uen H 2009-02-13

Page 141: Plugin-Service Development Studio4.1Tutorial

Guess Client / Server Application

Note: Since the generated number is random, and your guess and theservlet's response to your guess may vary, the need for messages 7through 10 may vary.

Note: Messages are automatically retransmitted if there is no response withina predefined (UDP-specific) delay. If your network connection or serverare slow, you may see multiple messages. This is normal.

1 Client - REGISTER Coco

The first request is a REGISTER. Registration is required so that messagesaddressed to this particular user are routed to the correct contact.

1. Click the New Request button below the Message Creation field.

The New Initial Request screen is displayed.

The default Request method is REGISTER and the default Name andURI are for user Alice.

Note: This step is necessary every time the Test Agent is started, even ifthe user was previously registered from another instance of TestAgent or from another application.

1371553-APR 901 753/3 Uen H 2009-02-13

Page 142: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 141 New Initial Request

2. Change all occurrences of Alice to Coco in the Request section andclick OK.

The New Initial Request screen is dismissed and the generated messagefor the REGISTER request is displayed in the Message Creation editor.

The Send Message button below the Message Creation is activated.

3. Click the Send Message button.

The REGISTER message is sent and displayed in the Message History onthe right side of the window.

138 1553-APR 901 753/3 Uen H 2009-02-13

Page 143: Plugin-Service Development Studio4.1Tutorial

Guess Client / Server Application

Note: Messages from the client are displayed in green.

Messages from the servlet are displayed in blue.

1 Server - Expected Result

The server response is SIP/2.0 200 OK.

Figure 142 Response to REGISTER

2 Client - Send INVITE Message

Now we need to send the INVITE, which triggers our Guess application.

4. Click the New Request button below the Message Creation editor again.

The New Initial Request screen is displayed.

• In the Request section, select INVITE from the Method drop-down list andchange the URI field to sip:[email protected]

• In the To section, change Name to guess and URI to sip:[email protected].

• Leave everything else.

1391553-APR 901 753/3 Uen H 2009-02-13

Page 144: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

5. Click OK.

The New Initial Request screen is dismissed and the generated messagefor the INVITE request is displayed in the Message Creation editor.

6. Click the Send Message button.

The INVITE message is received and displayed in the Message History onthe right side of the window.

2 Server - Expected Result

The response is SIP/2.0 100 Trying.

Then, if successful, SIP/2.0 200 OK.

140 1553-APR 901 753/3 Uen H 2009-02-13

Page 145: Plugin-Service Development Studio4.1Tutorial

Guess Client / Server Application

Figure 143 Response to INVITE

Note: The application responds with SIP/2.0 200 OK multiple times, until ittimes-out and sends a BYE. You must send an ACK message beforethe time-out.

3 Client - Send ACK Message

Now we send an ACK to establish the session.

7. Click the ACK button to the right of the Message History.

An ACK message is generated and displayed in the Message Creationeditor.

You have 32 seconds to respond, or the session will time out. If youtime-out, you can start again by simply creating a new INVITE.

8. Click the Send Message button.

1411553-APR 901 753/3 Uen H 2009-02-13

Page 146: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

3 Server - Expected Result

The Guess Server sends a MESSAGE prompting you to guess a numberbetween 0 and 10.

Figure 144 Response to ACK

4 Client - Send 200 OK that you received the Server Message

Now we send a 200 OK to notify the server that the message was received.You have 32 seconds, or the session will time out.

9. Click the 200 OK button to the right of the Message History.

A SIP/2.0 200 OK message is generated and displayed in the MessageCreation editor.

You have 32 seconds to respond, or the session will time out. If youtime-out, you can start again by simply creating a new INVITE.

10. Click the Send Message button.

The SIP/2.0 200 OK message is displayed in the history in green.

4 Server - Expected Result

There is no other response.

Now you must send the server a message with a guess.

142 1553-APR 901 753/3 Uen H 2009-02-13

Page 147: Plugin-Service Development Studio4.1Tutorial

Guess Client / Server Application

5 Client - Send a MESSAGE with a Guess

11. In the Message History, select the servlet's first SIP /2.0 200 OKmessage after the INVITE message.

Figure 145 Select the SIP /2.0 200 OK message after the INVITE

Note: The way to know you have selected the correct SIP/2.0 200 OKmessage is that the CSeq header indicates CSeq: 1 INVITE

12. Click the Request button to the right of the Message History.

The New Subsequent Request screen is displayed.

1431553-APR 901 753/3 Uen H 2009-02-13

Page 148: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 146 New Subsequent Request

13. Make the following changes to the screen:

• In the Request section, select MESSAGE from the Method drop-downlist.

The URI field displays the address of the SIP Container:sip:127.0.0.1:5060. Leave this.

• Leave the To section as-is.• In the Headers section, click the Add button.

This activates a row for input.

� Click on the Name field and type or select Content-Type fromthe drop-down list.

� Click on the Value field and type guess/try

144 1553-APR 901 753/3 Uen H 2009-02-13

Page 149: Plugin-Service Development Studio4.1Tutorial

Guess Client / Server Application

• Click in the Message Content field and type a number between 1and 10.

We used 6 in our example.

Figure 147 New Subsequent Request

14. Click OK.

The New Subsequent Request screen is dismissed and the generatedmessage for the MESSAGE message is displayed in the MessageCreation editor.

15. Click the Send Message button.

The MESSAGE message is sent and displayed in the Message History onthe right side of the window.

1451553-APR 901 753/3 Uen H 2009-02-13

Page 150: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

5 Server - Expected Result

Note: Since the number is random, your response may vary.

• If you guessed right, the server sends a MESSAGE saying Good Guessand a BYE message.� Click the 200 OK button on the right of the Messages list to generate a

SIP 200 OK message in the Message Creation editor.

You have 32 seconds to respond, or the session will time out. If youtime-out, you can start again by simply creating a new INVITE.

� Click the Send Message button below the Message Creation editorto send your 200 OK message.

� Select the MESSAGE above the BYE in the Messages list to see theServer's Good Guess! message in the Message History.

Figure 148 Good Guess!

• If you guessed wrong, the server responds with a SIP/20 200 OK anda MESSAGE telling you to guess again, with a hint to guess higher or lower.

146 1553-APR 901 753/3 Uen H 2009-02-13

Page 151: Plugin-Service Development Studio4.1Tutorial

Guess Client / Server Application

Figure 149 Guess Again

6 Client - Send 200 OK that you received the Server Message

We send a 200 OK to notify the server that the message was received. Youhave 32 seconds, or the session will time out.

16. Click the 200 OK button to the right of the Message History.

A SIP/2.0 200 OK message is generated and displayed in the MessageCreation editor.

You have 32 seconds to respond, or the session will time out. If youtime-out, you can start again by simply creating a new INVITE.

17. Click the Send Message button.

The Servlet receives the SIP/2.0 200 OK message and it is displayed inthe history in green.

6 Server - Expected Result

There is no response.

1471553-APR 901 753/3 Uen H 2009-02-13

Page 152: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Now you must send the server a message with another guess.

7 Client - Send a MESSAGE with another Guess

18. In the Message History, select the servlet's first SIP /2.0 200 OKmessage after the INVITE message.

Note: The way to know you have selected the correct SIP/2.0 200 OKmessage is that the CSeq header indicates CSeq: 1 INVITE

Figure 150 Select the SIP /2.0 200 OK message in the Test Agent History.

19. Click the Request button to the right of the Message History.

The New Subsequent Request screen is displayed.

Note: For every subsequent guess until you guess right, the CSeq value mustbe incremented by one from your previous message. Failure to do soresults in a SIP/2.0 500 Server Internal Error and you willneed to restart the communication from the INVITE.

• In the Request section, select MESSAGE from the Method drop-down list.• Leave the URI field as-is.• Leave the To section as-is.• In the Headers section, click the Add button.

This activates a row for input.

� Click on the Name field and type CSeq

148 1553-APR 901 753/3 Uen H 2009-02-13

Page 153: Plugin-Service Development Studio4.1Tutorial

Guess Client / Server Application

� Click on the Value field and type 3 MESSAGE

• Click the Add button again.

This activates another row for input.

� Click on the Name field and type Content-Type

� Click on the Value field and type guess/try• Type a number between 1 and 10 in the Message Content field, following

the servlet's hint.

20. Click OK.

The New Subsequent Request screen is dismissed and the generatedmessage for the MESSAGE message is displayed in the MessageCreation editor.

21. Click the Send Message button.

The MESSAGE message is sent and displayed in the Message History onthe right side of the window.

7 Server - Expected Result

Note: Since the number is random, your response may vary.

• If you guessed right, the server sends a MESSAGE saying Good Guessand a BYE message.� Click the 200 OK button on the right of the Messages list to generate a

SIP 200 OK message in the Message Creation editor.

You have 32 seconds to respond, or the session will time out. If youtime-out, you can start again by simply creating a new INVITE.

� Click the Send Message button below the Message Creation editorto send your 200 OK message.

� Select the MESSAGE above the BYE in the Messages list to see theServer's Good Guess! message in the Message History.

• If you guessed wrong, the server responds with a SIP/20 200 OK anda MESSAGE telling you to guess again, with a hint to guess higher or lower.

8 - Send 200 OK that you received the Server Message

Now we send a 200 OK to notify the server that the message was received.You have 32 seconds, or the session will time out.

1491553-APR 901 753/3 Uen H 2009-02-13

Page 154: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

22. Click the 200 OK button to the right of the Message History.

A SIP/2.0 200 OK message is generated and displayed in the MessageCreation editor.

You have 32 seconds to respond, or the session will time out. If youtime-out, you can start again by simply creating a new INVITE.

23. Click the Send Message button.

The SIP/2.0 200 OK message is displayed in the history in green.

8 Server - Expected Result

There is no other response.

9 Client - If necessary, send a MESSAGE with another Guess

24. In the Message History, select the servlet's first SIP /2.0 200 OKmessage after the INVITE message.

Figure 151 Select This SIP /2.0 200 OK Message in the Test Agent History

25. Click the Request button to the right of the Message History.

The New Subsequent Request screen is displayed.

• In the Request section, select MESSAGE from the Method drop-down list.• Leave the URI field as-is• Leave the To section as-is.

150 1553-APR 901 753/3 Uen H 2009-02-13

Page 155: Plugin-Service Development Studio4.1Tutorial

Guess Client / Server Application

• In the Headers section, click the Add button.

This activates a row for input.

� Click on the Name field and type CSeq

� Click on the Value field and type 4 MESSAGE

Note: For every subsequent guess until you guess right, the CSeqvalue must be incremented by one from your previousmessage. Failure to do so results in a SIP/2.0 500Server Internal Error and you will need to restart thecommunication from the INVITE.

• Click the Add button again.

This activates another row for input.

� Click on the Name field and type Content-Type

� Click on the Value field and type guess/try

• Type a number between 1 and 10 in the Message Content field.

Depending on the content of the last message from the Servlet, guesshigher or lower.

26. Click OK.

The New Subsequent Request screen is dismissed and the generatedmessage for the MESSAGE message is displayed in the MessageCreation editor.

27. Click the Send Message button.

The MESSAGE message is sent and displayed in the Message History onthe right side of the window.

9 Server - Expected Result

The response is SIP/2.0 200 OK.

The Guess Server sends a MESSAGE telling you whether to guess again orif you guessed right.

Note: Since the number is random, your response may vary.

1511553-APR 901 753/3 Uen H 2009-02-13

Page 156: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

If you guessed right, the servlet sends a message saying Good Guess!

Figure 152 Good Guess! — You Win!

10 Client - Send 200 OK that you received the Server Message

Now we send a 200 OK to notify the server that the message was received.You have 32 seconds, or the session will time out.

28. Click the OK button to the right of the Message History.

A SIP/2.0 200 OK message is generated and displayed in the MessageCreation editor.

You have 32 seconds to respond, or the session will time out. If youtime-out, you can start again by simply creating a new INVITE.

29. Click the Send Message button.

The Servlet receives the SIP/2.0 200 OK message and it is displayed inthe history in green.

152 1553-APR 901 753/3 Uen H 2009-02-13

Page 157: Plugin-Service Development Studio4.1Tutorial

Guess Client / Server Application

10 Server - Expected Result

There is no other response.

11 Client - Send BYE to end session

30. Click the BYE button to the right of the Message History.

A BYE message is generated and displayed in the Message Creationeditor.

31. Click the Send Message button.

The BYE message is displayed in the history in green.

11 Server - Expected Result

The response is SIP/2.0 200 OK.

Our game was tested successfully.

4.13 Troubleshooting

If your Guess Game does not work as described in sections 4.10 and 4.11,check the following:• Are your listeners in the GuessClient com.ericsson package? See

Section 4.2.1 on page 104.• Is your client application code correct? See Section 4.3 on page 108.• Is the CSCF provisioned? See Section 4.5 on page 114.• Is the GuessServlet servlet deployed? See Section 4.7 on page 123.• Is the execution environment started? See Section 4.9 on page 127.• Are your ICP Properties properly configured? See Section 4.10 on page

128.• Have you followed the procedure without missing any steps?

1531553-APR 901 753/3 Uen H 2009-02-13

Page 158: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

4.14 Running GuessClient in the Symbian Emulator

Now that we have successfully played Guess in Windows and tested thesignaling flow in Test Agent, we will now install and play the GuessClient inthe Symbian Emulator.

The following steps must be performed to run the client in the SymbianEmulator:

1. Installing ICP in the Symbian Emulator

2. Configuring SDS Servers for the Symbian Emulator

3. Installing the GuessClient in the Symbian Emulator

4. Starting the Symbian Emulator

5. Configuring ICP Settings on the Symbian Emulator

6. Launching the ICP Profile

7. Playing the Guess Game Client

8. Exiting the Symbian Emulator

9. Troubleshooting

4.14.1 Installing ICP in the Symbian Emulator

Note: This configuration needs to be done only once, and will not be requiredagain unless you reinstall SDS.

1. From the SDS menu, select SDS > Server > Visual Network.

Figure 153 Switch to Visual Network Perspective

2. If the servers are not running, start them now as described in Section 4.4.2on page 112.

3. Add the Symbian Emulator to the Visual Network view.

154 1553-APR 901 753/3 Uen H 2009-02-13

Page 159: Plugin-Service Development Studio4.1Tutorial

Guess Client / Server Application

Figure 154 Add the Symbian Emulator to the Visual Network

4. Right-click the Symbian Emulator icon and select Properties from thecontext menu.

Figure 155 Access the Symbian Emulator Properties

The Preferences window appears, filtered to display only the Client properties.

1551553-APR 901 753/3 Uen H 2009-02-13

Page 160: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 156 Preferences for Client

5. Click the Browse button beside the Symbian emulator location field.

• Navigate to the directory where the Symbian UIQ 3 SDK is installed.The default is C:\Symbian\UIQ3SDK.

• Leave everything else.

6. Click OK.

The Preferences screen is dismissed, and an ICP Platform installationdialog is displayed.

Figure 157 Prompt to Install ICP Platform in the Emulator

An Operation in Progress dialog is displayed briefly, followed by a ICPPlatform installed successfully dialog.

7. Click OK to dismiss them.

156 1553-APR 901 753/3 Uen H 2009-02-13

Page 161: Plugin-Service Development Studio4.1Tutorial

Guess Client / Server Application

4.14.2 Configuring SDS Servers for the Symbian Emulator

Note: This configuration assumes that your workstation is configured withDynamic Host Configuration Protocol (DHCP). If your workstationhas a static IP, refer to the Troubleshooting section of the ServiceDevelopment Studio 4.1 Developer's Guide, (Reference [3]).

SDS is installed with default environment configuration settings for the CSCF,DNS, and PoC servers, using the localhost IP (127.0.0.1), which is thesame on every computer. This way you can start using SDS with minimalconfiguration.

However, as soon as you wish to use the Symbian Emulator, a conflict arises.The Symbian Emulator is considered a separate computer from a networkpoint of view, even though it is collocated on the same computer as the SIPcontainer, CSCF, DNS, and PoC servers.

In order to deploy and run applications on the Symbian Emulator, we mustconfigure the SDS servers to use the real IP address assigned to theworkstation instead of using the localhost IP.

Note: This configuration needs to be done only once, and will not be requiredagain unless you reinstall SDS.

4.14.2.1 Finding your IP Address

1. Open a DOS window.

2. Type ipconfig and note the IP Address.

In the figure below, the IP Address is 142.133.118.68. Substitute yourown IP address in the following configuration instructions.

Figure 158 Retrieving your IP Address

3. Close the DOS window.

1571553-APR 901 753/3 Uen H 2009-02-13

Page 162: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

4.14.2.2 Configuring the SDS IP Addresses

CSCF IP Address

1. Right-click the CSCF icon and select Properties.

The Preferences window appears, filtered to display only the CSCF properties.

Figure 159 Preferences for CSCF

2. Make the following changes:

• Change the Host field in the DNS Server section to your IP Address.• Leave everything else.

3. Click the in the tree on the left to expand it.

4. Select the Transport tab.

158 1553-APR 901 753/3 Uen H 2009-02-13

Page 163: Plugin-Service Development Studio4.1Tutorial

Guess Client / Server Application

Figure 160 Preferences for CSCF• In the S-CSCF section, change the Address field to your IP Address.• In the P-CSCF section, change the Address field to your IP Address.• Leave everything else.

5. Click OK.

The Preferences screen is dismissed.

DNS Server IP Address

Nothing to change.

1591553-APR 901 753/3 Uen H 2009-02-13

Page 164: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

PoC Server IP Address

As the IP Address configuration needs to be done only once, we shouldconfigure the PoC settings at the same time as the others, even though we donot need it for our exercise.

1. Add the PoC Server to the Visual Network view perspective.

2. Right-click the PoC icon and select Start.

3. Right-click the PoC icon and select Properties.

The Preferences window appears, filtered to display only the PoC Serverproperties.

Figure 161 Preferences for PoC Server

4. Make the following changes:

• In the SIP Core section, change the Host field to your IP Address.• Change the XDMS Server Address field to your IP Address.

Note: Change only the 127.0.0.1 IP - leave the http://beforeand :9080/services after.

• Change the Tel URI Lookup Server field in the SIP Core section toyour IP Address.

160 1553-APR 901 753/3 Uen H 2009-02-13

Page 165: Plugin-Service Development Studio4.1Tutorial

Guess Client / Server Application

Note: Change only the 127.0.0.1 IP - leave the :53 port.

• Leave everything else.• You do not need to change anything else in any other PoC Server

preferences screens.

5. Click OK.

The Preferences screen is dismissed.

4.14.3 Installing the GuessClient in the Symbian Emulator

Now we can install the GuessClient in the Symbian Emulator.

1. From the SDS menu, select SDS > Client > Install Client in SymbianEmulator.

The Install Client in Symbian emulator wizard is launched.

Figure 162 Select a Client Project

2. Select GuessClient and click Finish.

An Operation in Progress dialog is displayed briefly, followed by a ICPPlatform installed successfully dialog.

4.14.4 Starting the Symbian Emulator

Now we need to start the Symbian Emulator.

1. In the Visual Network view, right-click the Symbian Emulator icon andselect Start.

1611553-APR 901 753/3 Uen H 2009-02-13

Page 166: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 163 Start the Symbian Emulator

The Symbian emulator opens displaying the Sony Ericsson P1 skin.

Figure 164 Symbian Emulator

Along with a floating window control bar.

Figure 165 Symbian Window Control Bar

After a few moments, the Symbian UIQ splash screen appears on the displaywhile the OS loads.

162 1553-APR 901 753/3 Uen H 2009-02-13

Page 167: Plugin-Service Development Studio4.1Tutorial

Guess Client / Server Application

Figure 166 Symbian Splash Screen

The screen then displays the Applications window of the Emulator.

Figure 167 Applications Window

Note: If you prefer text to icons, click on Applications and from thedrop-down menu select View as list.

1631553-APR 901 753/3 Uen H 2009-02-13

Page 168: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 168 View as List

The display changes from icons to a text list. We will continue with the text, butyou may prefer to go back to the icons (View as grid option).

The Symbian Emulator will remember this setting the next time you restart it.

4.14.5 Configuring ICP Settings on the Symbian Emulator

Before we can run any client application on the Symbian Emulator for the firsttime, we need to configure the IMS Settings on the Symbian Emulator.

The configuration needs to be performed once only. The Symbian Emulator willretain this configuration if it is closed and reopened, but you must perform thisconfiguration again it if you reinstall SDS.

1. In the Symbian Emulator Applications screen, click on Control panel.

Figure 169 Open the Control Panel

2. Click on IMS Settings.

164 1553-APR 901 753/3 Uen H 2009-02-13

Page 169: Plugin-Service Development Studio4.1Tutorial

Guess Client / Server Application

Figure 170 Access IMS Settings

3. Click on Server Addresses.

Figure 171 Access Server Addresses

We must now provide the real IP addresses.

1651553-APR 901 753/3 Uen H 2009-02-13

Page 170: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 172 Server Addresses

4. Click on PCSCF Address.

Figure 173 Update the PCSCF Address• Use the backspace to delete the default 127.0.0.1 PCSCF address, and

type the same IP address from Section 4.14.2.1 on page 157.• Click Done.

5. Click on Aggregation Proxy Address.

166 1553-APR 901 753/3 Uen H 2009-02-13

Page 171: Plugin-Service Development Studio4.1Tutorial

Guess Client / Server Application

Figure 174 Symbian Emulator• Use the backspace to delete the default 127.0.0.1 Aggregation Proxy

address, and type the same IP address from Section 4.14.2.1 on page 157.• Click Done.

6. Click OK. (Leave the default ports.)

This brings you back to the ImsSetting screen.

Figure 175 Access User Profile

ICP comes preconfigured with a user profile for Bob. We will change this toCoco.

1671553-APR 901 753/3 Uen H 2009-02-13

Page 172: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 176 User Profile for Bob

7. Make the following changes:

• Change Public UserId to sip:[email protected]

• Change Private UserId to [email protected]

• Change Password to coco

Figure 177 User Profile for Coco

8. Click OK.

This brings you back to the ImsSetting screen.

4.14.6 Launching the ICP Profile

Now we are going to launch the Profile to the ICP Server.

Note: The Profile must be launched every time you restart the SymbianEmulator.

168 1553-APR 901 753/3 Uen H 2009-02-13

Page 173: Plugin-Service Development Studio4.1Tutorial

Guess Client / Server Application

If you are not in the ImsSetting screen (continuing from the previous section),navigate there now:• In the Symbian Emulator Applications screen, click on Control panel.• Click on IMS Settings.

1. In the ImsSetting screen, click Profile Status

Figure 178 Access Profile Status

The Profile Status is Not Launched.

Figure 179 Profile Status

2. Click Launch.

An FYI message appears. Please read it.

1691553-APR 901 753/3 Uen H 2009-02-13

Page 174: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 180 For Your Information

3. Check the Do not show me this information again and click OK.

The message is dismissed.

After a moment, a Set up successful! message flashes briefly on thescreen, and the Profile status dialog changes to display Status: Launched.

Figure 181 Successful Launch

The display is cleared and you are in the ICPServer screen.

After a few moments, the IP flashes briefly on the screen.

170 1553-APR 901 753/3 Uen H 2009-02-13

Page 175: Plugin-Service Development Studio4.1Tutorial

Guess Client / Server Application

Figure 182 Connected to the Network

A bright blue globe appears at the top left of the display and begins flashing toindicate that the network connection is live.

4. Click the Back button three times to return to the Applications screen.

Now everything is configured to run our client.

4.14.7 Playing the Guess Game Client

1. In the Symbian Emulator Applications screen, click on GuessClient.

Figure 183 Launch the GuessClient Game

A blank screen appears briefly while the application loads, then you areprompted to start a new game.

1711553-APR 901 753/3 Uen H 2009-02-13

Page 176: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 184 Guess Game Client - New Game

2. Click New Game.

Our Guess a number interface dialog is launched.

3. Type a number between 0 and 10 and press Enter or click OK.

• If you guessed too high, you are prompted to guess again with thefollowing hint:

• If you guessed too low, you are prompted to guess again with thefollowing hint:

• If you guessed right, the game is over:

172 1553-APR 901 753/3 Uen H 2009-02-13

Page 177: Plugin-Service Development Studio4.1Tutorial

Guess Client / Server Application

• Play until you guess correctly.

4. Click OK to dismiss the message when you have won.

5. To play again, click New Game or click Quit to exit the client and returnto the Applications screen.

4.14.8 Exiting the Symbian Emulator

1. To close the Symbian emulator, click the X button on the floating Symbiantitle bar.

Figure 185 Closing the Symbian Emulator

4.14.9 Troubleshooting

If your Guess Game does not work as described, check the following:• Does your client work in Windows? See Section 4.11 on page 132 and

Section 4.12 on page 134.• Is the SDS execution environment started? See Section 4.9 on page 127.• Is your execution environment properly reconfigured? See Section 4.14.2

on page 157.• Is the GuessClient installed in the Symbian Emulator? See Section 4.14.3

on page 161.• Are the ICP settings on the Symbian Emulator properly configured? See

Section 4.14.5 on page 164.• Is the ICP Profile status Launched (or Registered)? See Section 4.14.6

on page 168.• Have you followed the procedure without missing any steps?

1731553-APR 901 753/3 Uen H 2009-02-13

Page 178: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

174 1553-APR 901 753/3 Uen H 2009-02-13

Page 179: Plugin-Service Development Studio4.1Tutorial

IJCU Client

5 IJCU Client

This section explains how to run the sample IJCU application and use the VisualTraffic Flow (VTF) tool. The VTF is a visual tool that displays SIP messagesexchanged between applications and the CSCF on a SIP flow diagram that canbe customized according to your needs.

This simple application registers a user and allows the user to send a SIPmessage in spite of the telephone not being SIP capable. The messagedestination is the user's own phone, but in a real application, the destinationwould be another device. The message is delivered to the CSCF, whichforwards to the phone. We will demonstrate that this message goes throughthe CSCF and that a phone, whether SIP-capable or not, is able to send SIPmessages through IJCU.

5.1 About IJCU

For general information on IJCU, see the Service Development Studio (SDS)4.1 Developer's Guide, (Reference [3]).

For information on creating IJCU applications from scratch, see the ServiceDevelopment Studio (SDS) 4.1 Developer's Guide, (Reference [3]).

To access the IJCU JavaDoc, from the SDS selecting SDS > Documentation >IJCU API Javadoc. The IJCU API documentation opens as a standard HTMLJavaDoc in your default browser.

5.2 Prerequisites

This application requires that you have installed Sun Java(TM) Wireless Toolkit2.5.2_01 for CLDC and that you have configured SDS as described in theService Development Studio (SDS) 4.1 Installation Instruction (Reference [2])

The code for the IJCUBasicPageMessage application is imported from theSample/Java/CLDC/IjcuBasicPageMessage/ folder. To review how toimport code, see Section 4.2.1 on page 104.

If the CSCF and DNS are not started, go to section Section 5.3 on page 175.Otherwise, go to section Section 5.4 on page 178.

5.3 Checking the Execution Environment

To run the application, start the execution environment:

1751553-APR 901 753/3 Uen H 2009-02-13

Page 180: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

1. If the Visual Network perspective is not already opened, open it now. Fromthe SDS menu, select SDS > Server > Visual Network.

The Visual Network is displayed. You may also have the PoC serverand Symbian Emulator but they are not required for the IJCU application.For the instructions to set the Visual Network view, refer back to Section4.4 on page 110.

Figure 186 Visual Network - Execution Environment Started

By default, all the nodes are configured to communicate with address 127.0.0.1.If you have just done the Guess Client application, you have modified thesesettings. Reset them to 127.0.0.1. It is not mandatory to use 127.0.0.1 as longas all the nodes are configured to the same IP address.

CSCF IP Address

1. Right-click the CSCF icon and select Properties.

The Preferences window appears, filtered to display only the CSCF properties.

176 1553-APR 901 753/3 Uen H 2009-02-13

Page 181: Plugin-Service Development Studio4.1Tutorial

IJCU Client

Figure 187 Preferences for CSCF

2. Make the following changes:

• Change the Host field in the DNS Server section to 127.0.0.1.• Leave everything else.

3. Click the in the tree on the left to expand it.

4. Select the Transport tab.

1771553-APR 901 753/3 Uen H 2009-02-13

Page 182: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 188 CSCF Transport Preferences• In the S-CSCF section, change the Address field to 127.0.0.1.• In the P-CSCF section, change the Address field to 127.0.0.1.• Leave everything else.

5. Click OK.

The Preferences screen is dismissed.

5.4 Wireless Toolkit Configuration

In this tutorial we use Sun Java(TM) Wireless Toolkit 2.5.2 for CLDC.

178 1553-APR 901 753/3 Uen H 2009-02-13

Page 183: Plugin-Service Development Studio4.1Tutorial

IJCU Client

To configure the project to use

6. In SDS, open the Java EE perspective.

7. The project is displayed in the Java EE perspective. Right-click it andselect Properties. The Properties window is displayed.

8. Select J2ME. The Group field is blank. This occurs whenever a J2MEproject is imported.

Figure 189 Project Preferences - J2ME

9. Click in the Group drop-down box and select Sun Java(TM) WirelessToolkit 2.5.2 for CLDC.

If it is not present, click Manage Devices and browse to the WTK directory.

The Device field is automatically filled with a default value that you cankeep.

10. Click OK. The Preferences windows is closed.

1791553-APR 901 753/3 Uen H 2009-02-13

Page 184: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

5.5 Understanding the Code

The code for the IjcuBasicPageMessage projects is imported. The providedcode has been annotated with comments to help you understand what it does.

As the project is more complex than the HelloWorld example, and requiremultiple class files, explaining the Java coding line by line is outside the scopeof this Tutorial. Rather, this section provides a high-level overview of what theprovided sample code does.

5.5.1 Signaling Flow

Here is the SIP signaling flow that will happen for this application:

Figure 190 IJCU Sample Application - SIP Flow Diagram

1. The first request is a REGISTER. Registration is required so that messagesaddressed to this particular user are routed to the correct contact.

2. The server response is SIP/2.0 200 OK.

3. The Client sends a MESSAGE message, which triggers theIjcuBasicPageMessage. The message content is whatever text user Alicehas typed.

4. The Server receives the message, checks the destination, which is127.0.0.1, and sends the MESSAGE to Alice.

180 1553-APR 901 753/3 Uen H 2009-02-13

Page 185: Plugin-Service Development Studio4.1Tutorial

IJCU Client

5. The Client sends a 200 OK to notify the server that the message wasreceived.

6. The Server sends a 200 OK

5.6 Starting Visual Traffic Flow

Visual Traffic Flow (VTF) is an application in SDS to see at a glance what SIPtraffic is being exchanged. To view SIP traffic for the application, start it now,before the application starts executing:

1. Start VTF by selecting SDS > Server > CSCF > Analyze Log Real Time.

Figure 191 SDS Menu - Analyze Log Real Time

2. A pop-up appears. Click the Run in Background button.

The VTF view (labelled Real Time CSCF SIP Flow) is displayed but is blankat this time. The Outline view is also displayed.

1811553-APR 901 753/3 Uen H 2009-02-13

Page 186: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 192 Visual Traffic Flow - Real Time CSCF SIP Flow

As the application runs and sends SIP messages, the VTF view will display thetraffic in a SIP flow diagram.

5.7 Starting the Application

1. Go to the Java EE perspective.

2. Right-click on the IjcuBasicPageMessage.java file and from the contextmenu select Run As > Emulated J2ME Midlet.

The Symbian phone emulator is started and displayed on your screen.

3. On the phone emulator, click the button directly under the Registeraction text.

The following message is displayed on your emulator screen:

182 1553-APR 901 753/3 Uen H 2009-02-13

Page 187: Plugin-Service Development Studio4.1Tutorial

IJCU Client

Figure 193 Phone Emulator - Reading Local File Warning

4. Click Yes to dismiss the warning.

These messages are displayed because basic phone licences often demanduser confirmation each time an application requires network access. Thisimpedes greatly usage of phone applications, especially during development.For the purposes of this tutorial you will use SDS to change the security domainthat is applied when the emulator is running.

5. Close the emulator window. On the phone emulator, click the buttondirectly under the Exit action text.

Before going further, take a look at Visual Traffic Flow perspective.

6. In SDS, go to Visual Traffic Flow. You can observe the following:

1831553-APR 901 753/3 Uen H 2009-02-13

Page 188: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 194 Flow Part 1

The application sent a register message and was approved. Since we will nowrestart the application under different settings, clear the VTF view.

7. Right-click in the VTF view and select Clear Real Time SIP Flow Diagram.

The view is now blank.

Now you will change the Security Domain setting in SDS.

8. In SDS (in the Java EE perspective), right-click on the IjcuBasicPageMessage.java file and from the context menu select Run As > RunConfigurations.

9. Select the Emulation tab.

The Run window is displayed. In the left panel, IjcuPageMessageClientis selected

184 1553-APR 901 753/3 Uen H 2009-02-13

Page 189: Plugin-Service Development Studio4.1Tutorial

IJCU Client

Figure 195 Run Dialog - Emulation

10. Set the Security Domain drop-down box to manufacturer. This allowsyou to run the application without the emulator warning you each timenetwork access is required.

11. Click Apply.

12. Click Run. The phone emulator is displayed.

1851553-APR 901 753/3 Uen H 2009-02-13

Page 190: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 196 Phone Emulator - Register

On the screen is displayed your user's default parameters. Action text appearsat the bottom of the screen. These actions can be selected by clicking the keysdirectly under the action text. The keyboard is controlled by the mouse, but thescreen is navigated with the arrow key of your keyboard.

5.8 Registering the User

To register the user and observe the SIP messages being passed throughVisual Traffic Flow (VTF). Presently there are two action allowed. They appearat the bottom of the screen: Exit and Register.

13. On the phone emulator, click the button directly under the Registeraction text.

14. In SDS, look at the Visual Traffic Flow. You can observe the following:

186 1553-APR 901 753/3 Uen H 2009-02-13

Page 191: Plugin-Service Development Studio4.1Tutorial

IJCU Client

Figure 197 Flow Part 1

Our user appear on the right and the server on the left. You can see that aREGISTER message was sent (top arrow) and acknowledged (second arrow).

15. To view the properties of the message, in VTF right-click of the firstarrow and from the context menu select Properties. This will open theProperties view.

Figure 198 Message Properties

This view is used to see the details of a SIP message.

For more information on the Visual Traffic Flow, see the Service DevelopmentStudio (SDS) 4.1 Developer's Guide, (Reference [3]).

5.9 Sending a Message

We now send a message. The message is sent to the user's device simply todemonstrate that a SIP message can be sent even though the phone (in thiscase, the phone emulator) is not SIP-capable.

1871553-APR 901 753/3 Uen H 2009-02-13

Page 192: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

16. In the phone emulator, go to the Enter Message field. Navigation is donewith the arrow keys, either the ones on your keyboard or on the emulator'skeyboards.

17. There is a default message already present, but change it to somethingunique, such as your name.

18. Click the Send button. That is the button on the right, directly under theSend action text.

On the emulator you will observe the following:

Figure 199 Phone Emulator Receiving Message

The message has been received. Now look at VTF. If you find the display istruncated or cluttered, rearrange it by clicking and dragging the figures fartherapart.

188 1553-APR 901 753/3 Uen H 2009-02-13

Page 193: Plugin-Service Development Studio4.1Tutorial

IJCU Client

Figure 200 Flow Part 2

5.10 Exiting

It is important to shut down the simulated servers and the Sailfin server asthey will keep on running even if you close SDS and they will keep on usingsystem resources.

5.10.1 Stopping the Simulated Environment

To quit the session:

19. In the emulator, click the top left button directly under the Exit action texton the screen.

The phone emulators turns off and its window is closed.

20. Stop the execution environment. In SDS, select SDS > Server > CSCF >Stop CSCF.

21. Stop VTF. Close the VTF. This is important since VTF uses a lot of systemresources and will keep running in the background unless stopped.

5.10.2 Stopping Sailfin Server

The Sailfin server will keep on running even if you close SDS. You mustmanually stop it or it will keep on using system resources.

1891553-APR 901 753/3 Uen H 2009-02-13

Page 194: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

1. In SDS, switch to the Java EE perspective.

2. Right-click on Sailfin v1 and from the context menu select Stop.

Figure 201 Servers View - Stopping Sailfin

The stopping process is displayed in Console. When it is over, the statedisplayed in the Servers view goes Stopped.

190 1553-APR 901 753/3 Uen H 2009-02-13

Page 195: Plugin-Service Development Studio4.1Tutorial

Back-to-Back User Agent (B2BUA)

6 Back-to-Back User Agent (B2BUA)

The Back-to-Back User Agent application is a server-side application thatallows users to exchange messages. The Server accepts an incoming sessionfrom the A Party (Alice) and creates a new session to the B Party (Bob).

This application is provided to you in two versions: one JSR 116- and oneJSR 289-compliant version. They behave the same way but are coded inslightly different ways. SDS also comes with an automated testing script todemonstrate how this application runs.

6.1 Prerequisites

Before you can run the applications, you must do the following:

• Import the B2BUAServlet-JSR116 project.

• Undeploy previous projects from the Sailfin server since they may interferewith the B2BUA application.

If you forgot how to do this, the following sections are a quick reminder.

Importing the B2BUA Project

To import the B2BUA project:

1. In the Java EE perspective, go to the Project Explorer view and right-clickit.

The Import window is displayed.

2. Select Existing Project into Workspace and click Next.

3. Select the root directory from which to import the project by clicking Browse.

4. Navigate to the sample directory. By default this is C:\Ericsson\SDS4.1FD1\Sample\CDCandSE\B2BUA\.

5. Click OK. The window is closed.

6. Select the B2BUASerlvet-JSR116 project.

7. Click Finish.

The project is imported and is displayed in the Project Explorer view.

1911553-APR 901 753/3 Uen H 2009-02-13

Page 196: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Undeploying Previous Projects

Other applications deployed previously can interfere, so it is prudent toundeploy any unnecessary application you have used previously.

To undeploy other projects from the Sailfin server:

1. In the Java EE perspective, go to the Servers view.

2. If the Sailfin server is collapsed, expand it.

3. Right-click the application to remove and from the context menu, clickRemove.

The application is removed from under the Sailfin server. Repeat for eachapplication.

6.2 Provisioning

The B2BUA application showcases how you can transmit messages betweenusers through a mediating application. The automated test script assumesusers Alice and Bob, which you must provision with initial Filter Criteria (iFCs)and Service Trigger Points (STPs) described below, but you could run theapplications with any number of users as long as they are provisioned withthe required iFCs and STPs.

6.2.1 Initial Filter Criteria

You will need to create an initial Filter Criteria for the B2BUA.

To create an iFC, do the following:

1. Open the Home Subscriber Server (HSS) configuration page. Go to SDS> Server > Provisioning.

2. Select the HSS tab and the Initial Filter Criteria sub tab.

3. Select the Definition tab.

192 1553-APR 901 753/3 Uen H 2009-02-13

Page 197: Plugin-Service Development Studio4.1Tutorial

Back-to-Back User Agent (B2BUA)

Figure 202 SDS - Service Trigger Point

4. Click Add in the Definition tab.

5. In the Name field type the iFC's name: B2BUA.

6. Leave the default values in the fields as they are and click Save.

In the next section you will create two service trigger points for this iFC.

6.2.2 Service Trigger Points

To create the Service Point Triggers, follow the steps below and use the valuesprovided with these steps:

1. On the Definition tab select one the B2BUA iFC created earlier.

2. Select the Service Point Trigger tab.

3. Click the Add button at the bottom. A new Service Trigger Point is createdand a name is automatically created for it. You can keep that name.

1931553-APR 901 753/3 Uen H 2009-02-13

Page 198: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

4. Fill in the fields as described below.

5. When you are done creating an SPT, click Save.

Table 3 First Service Point Trigger

Trigger when condition is true

Group 0

Trigger Type SIP Method

Method INVITE

Table 4 Second Service Point Trigger

Trigger when condition is true

Group 0

Trigger Type SIP Method

Method MESSAGE

6.2.3 Service Profiles

Define a new profile, B2BUAProfile, and associate the B2BUA iFCs to it.

6.2.4 User Profiles

Set the service profiles of Alice and Bob to No Service Profile. No STPsor iFCs are associated to our users. Rather, they will be associated to theservlet.

Save.

6.2.5 PSI Profile

Create a Public Service Identity (PSI) profile for the B2BUA servlet:

• Public ID: sip:[email protected]

• Service profile: B2BUAProfile

Save.

6.3 Starting the Execution Environment

Start the following nodes:

1. CSCF

194 1553-APR 901 753/3 Uen H 2009-02-13

Page 199: Plugin-Service Development Studio4.1Tutorial

Back-to-Back User Agent (B2BUA)

2. DNS

3. SDS SIP Server

If you forgot how to do this, the following sections are a quick reminder.

Starting the CSCF

To start the CSCF, in SDS, select SDS > Servers > CSCF > Start CSCF.

Alternatively, you can use the Visual Network perspective. You create theCSCF element by clicking on the small CSCF icon and clicking in the mainpain. You start the CSCF by right-clicking on it and select Start from thecontext menu.

Starting the DNS

To start the DNS, In SDS, select SDS > Servers > DNS > Start DNS.

Alternatively, you can use the Visual Network perspective. You create theDNS element by clicking on the small DNS icon and clicking in the main pain.You start the DNS by right-clicking on it and select Start from the context menu.

Start the SDS SIP Server

To start the SDS SIP Server:

1. In the J2EE perspective go to the Servers view.

2. Right-click on the SIP Container Server.

3. Select Start from the context menu.

6.4 Deploying the B2BUA Servlet

6.5 A Short Overview of the Route Parameters

In the SIP header, there are several parameters that contain URIs. Each fulfillsa different purpose.

Route This parameter contains obligatory URIs. Any messageexchanged must pass through these nodes. These arenodes such as the different CSCFs that are required tomediate between the two end points.

Via This parameter contains the route history of a message.Looking at this parameter, the receiver of a messagecan see each node through which the message

1951553-APR 901 753/3 Uen H 2009-02-13

Page 200: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

travelled. This parameter is updated by the nodes thattransmit the message.

Service-route This parameter is received in the 200 OK response afterthe registration and becomes the route header of thenew initial requests. It then becomes part of the Routeparameter and is used by the S-CSCF to route all theinitial requests.

Record-route This parameter is filled with the URI of the nodes thatrequire that messages subsequent to an initial requestbe sent to them. It then becomes part of the Routeparameter.

Request URI The final destination of a message.

To The destination of a message in a human-friendlyformat containing the name of the destination and itsSIP address.

From The origin of a message in a human-friendly formatcontaining the name of the originator and its SIPaddress.

6.6 Using the B2BUA Servlet

To display the functionality of the B2BUA servlet, you will register two usersusing SDS Test Agents and have them send messages to one another.

Start Test Agents

Start a test agent for user Alice and one for user Bob:

1. In SDS, select SDS > Server > Start Test Agent.

The SDS TestAgent window is displayed.

196 1553-APR 901 753/3 Uen H 2009-02-13

Page 201: Plugin-Service Development Studio4.1Tutorial

Back-to-Back User Agent (B2BUA)

Figure 203 SDS Test Agent

Open one for user Alice and one for user Bob.

Register Bob and Alice

Register both users with the CSCF, starting with Alice:

1. In the test agent, select New Request.

The New Initial Request window is displayed.

1971553-APR 901 753/3 Uen H 2009-02-13

Page 202: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 204 New Initial Request

The URI field is the domain to which the user wants to connect. Connect yourtwo users to the ericsson.com domain:

2. Make sure that the URI field of the request is sip:ericsson.com.

3. Make sure that the Request fields have the correct values for this user. Forexample, for user Alice the fields should have the following values:

• To

� Name: Alice

� URI: sip:[email protected]

• From

� Name: Alice

� URI: sip:[email protected]

4. Click OK.

The window is closed.

198 1553-APR 901 753/3 Uen H 2009-02-13

Page 203: Plugin-Service Development Studio4.1Tutorial

Back-to-Back User Agent (B2BUA)

5. In the test agent, click Send Message.

In the Messages pane, you can see the REGISTER message and the200 OK reply from the CSCF.

Repeat for user Bob.

You can also confirm that both users are registered by going in theProvisioning perspective, selecting the Registrar tab. In the table you can seeboth users and under the Expiration Time column you will see the remainingtime of their registration.

Alice Sends an INVITE to Bob

Alice now sends an INVITE to the B2BUA application

6. In Alice's test agent, click New Request.

7. Put in the following values:

• Request:

� Method: INVITE

� URI: sip:[email protected]

• To:

� Name: B2BUA

� URI: sip:[email protected]

• From:

� Name: Alice

� URI: sip:[email protected]

8. Click OK.

The New Request window is closed.

9. Click Send Message.

The B2BUA sends back a 200 OK message.

10. Click ACK and then Send Message. This sends the requiredacknowledgement.

Bob receives the INVITE

Bob receives the INVITE and must acknowledge it.

11. Click 200 OK.

1991553-APR 901 753/3 Uen H 2009-02-13

Page 204: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

12. Click Send Message

Bob then receives a ACK from the B2BUA servlet.

Alice sends a MESSAGE to Bob

Alice now sends a MESSAGE to Bob:

13. In Alice's test agent, click Request on the right-hand side of the screen. Itis important not to use the New Request button, since it is used to createnew initial request.

14. Put in the following values:

• Request:

� Method: MESSAGE

� URI: sip:[email protected]

• To:

� Name: Bob

� URI: sip:[email protected]

• From:

� Name: Alice

� URI: sip:[email protected]

15. Click OK.

The New Request window is closed.

16. Click Send Message.

Alice then receives a 200 OK message from the B2BUA to confirmreception of the message. Bob receives Alice's message.

Bob receives the Message

Bob receives the message and must acknowledge it.

17. Click 200 OK.

18. Click Send Message

Bob then receives a ACK from the B2BUA servlet.

200 1553-APR 901 753/3 Uen H 2009-02-13

Page 205: Plugin-Service Development Studio4.1Tutorial

Back-to-Back User Agent (B2BUA)

6.7 ATF Script

This section explains the how to write an ATF script to test the B2BUA servlet.

First, create a new script by clicking the add button and rename itB2BUAscript.xml. If you expand it you can see the four basic scriptconstituents:

• User Agents

• Variables

• Test Cases

• Test Suites

6.7.1 User Agents

You will have two users exchange messages, therefore provision the followingtwo users:

• Alice with public ID sip:[email protected]

• Bob with public ID sip:[email protected]

Create a new user by selecting Users and clicking the add button.

6.7.2 Variables

There are no variables.

6.7.3 Test Case

In the test case, the users will perform the following tasks:

1. Alice registers

2. Bob registers

3. Alice sends an invitation

4. Alice sends a message to Bob

5. Bob sends a message to Alice

Create a new test case by selecting Test Cases and clicking the add button.Then, create a new message by selecting the new test case and clicking theadd button.

2011553-APR 901 753/3 Uen H 2009-02-13

Page 206: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Alice Registers

These steps register Alice with the CSCF:

1. Alice sends REGISTER: user Alice registers with the CSCF.

User Agent Alice

Operation Send

Message Type Request

Method REGISTER

Request URI sip:ericsson.com

2. Alice receives 200 OK: user Alice receives a 200 OK message from theCSCF.

User Agent Alice

Operation Receive

Message Type Response

Response 200 OK

Bob Registers

3. Bob sends REGISTER: user Bob registers with the CSCF.

User Agent Bob

Operation Send

Message Type Request

Method REGISTER

Request URI sip:ericsson.com

4. Bob receives 200 OK: user Bob receives a 200 OK message from theB2BUA servlet.

User Agent Bob

Operation Receive

Message Type Response

Response 200 OK

Alice Sends an Invite

5. Alice sends INVITE: user Alice registers with the B2BUA servlet. It has thefollowing message definition.

202 1553-APR 901 753/3 Uen H 2009-02-13

Page 207: Plugin-Service Development Studio4.1Tutorial

Back-to-Back User Agent (B2BUA)

User Agent Alice

Dialog Identifier 1

Operation Send

Message Type Request

Method INVITE

Request URI sip:[email protected]

The dialog identifier is a label for the dialog between Alice and the B2BUAservlet. It contains all the mandatory information for subsequent SIPmessages, such as the request URI. For subsequent messages, you onlyneed to specify dialog identifier 1.

In the headers section, you must add the following field value:

To sip:[email protected]

This is the part that invites user Bob (To field).

6. Alice receives 200 OK: user Alice receives a 200 OK message from theB2BUA servlet.

User Agent Alice

Dialog Identifier 1

Operation Receive

Message Type Response

Response 200 OK

Here and in the next message the dialog identifier is used to update thedialog information with the information from the received message.

7. Alice sends ACK: user Alice sends an ACK message to acknowledgereception of the B2BUA servlet's OK message.

User Agent Alice

Dialog Identifier 1

Operation Send

Message Type Request

Method ACK

Notice that no Request URI is required since the dialog identifier isspecified.

2031553-APR 901 753/3 Uen H 2009-02-13

Page 208: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

8. Bob receives INVITE: after the B2BUA serlvet has received Alice's INVITEmessage, it forwards it forwards according to the To header information, inother words, to user Bob.

User Agent Bob

Dialog Identifier 2

Operation Receive

Message Type Request

Method INVITE

Notice that a new dialog identifier is defined here. The B2BUA has twodialogs, one with Alice, one with Bob. Alice and Bob are not in a dialogtogether.

9. Bob sends 200 OK: user Bob indicates that he has received the invitationmessage from the B2BUA servlet.

User Agent Bob

Dialog Identifier 2

Operation Send

Message Type Response

Response 200 OK

10. Bob receives ACK: user Bob receives an acknowledgement from theB2BUA servlet's of the 200 OK message.

User Agent Bob

Dialog Identifier 2

Operation Receive

Message Type Request

Method ACK

Alice Sends a Message

The useful function of the B2BUA is to enable the two users to exchangemessages.

11. Alice sends MESSAGE: user Alice sends a message to Bob.

User Agent Alice

Dialog Identifier 1

Operation Send

204 1553-APR 901 753/3 Uen H 2009-02-13

Page 209: Plugin-Service Development Studio4.1Tutorial

Back-to-Back User Agent (B2BUA)

Message Type Request

Method MESSAGE

In the Message Content text box the content of the MESSAGE: “hello bob!”

12. Alice receives 200 OK: user Alice receives a 200 OK message from theB2BUA servlet.

User Agent Alice

Dialog Identifier 1

Operation Receive

Message Type Response

Response 200 OK

13. Bob receives MESSAGE: Bob receives from the B2BUA servlet themessage that it received from Alice. It has the following message definition.

User Agent Bob

Dialog Identifier 2

Operation Receive

Message Type Request

Method MESSAGE

In the Message Content table, the expected message is described, in thiscase the content should be equal to “hello bob!”

14. Bob sends 200 OK: user Bob indicates that he has received theMESSAGE message from the B2BUA servlet.

User Agent Bob

Dialog Identifier 2

Operation Send

Message Type Response

Response 200 OK

Bob Sends a Message

Same as Alice, Bob now sends a message.

15. Bob sends MESSAGE: user Bob sends a message to Alice.

2051553-APR 901 753/3 Uen H 2009-02-13

Page 210: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

User Agent Bob

Dialog Identifier 2

Operation Send

Message Type Request

Method MESSAGE

In the Message Content text box the content of the MESSAGE: “helloalice!”

16. Bob receives 200 OK: user Bob receives a 200 OK message from theB2BUA servlet.

User Agent Bob

Dialog Identifier 2

Operation Receive

Message Type Response

Response 200 OK

17. Alice receives MESSAGE: Alice receives from the B2BUA servlet themessage that it received from bob. It has the following message definition.

User Agent Alice

Dialog Identifier 1

Operation Receive

Message Type Request

Method MESSAGE

In the Message Content table, the expected message is described, in thiscase the content should be equal to “hello alice!”

18. Alice sends 200 OK: user Alice indicates that he has received theMESSAGE message from the B2BUA servlet.

User Agent Alice

Dialog Identifier 1

Operation Send

Message Type Response

Response 200 OK

206 1553-APR 901 753/3 Uen H 2009-02-13

Page 211: Plugin-Service Development Studio4.1Tutorial

Back-to-Back User Agent (B2BUA)

6.7.4 Test Suite

Define a new test in the test suite with the following values in the Test SuiteExecution Steps:

• Type: Test Case

• Value: the name of the test case you created

• Description: optional

6.7.5 Running the Script

To run the script, select the test suite you created and click Run Test Suiteat the bottom of the Test Suite Execution Steps on the right side of the ATFperspective.

You can confirm the test has been run successfully, by looking at the test suitestatus column, which should indicate Success.

2071553-APR 901 753/3 Uen H 2009-02-13

Page 212: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

208 1553-APR 901 753/3 Uen H 2009-02-13

Page 213: Plugin-Service Development Studio4.1Tutorial

Troubleshooting

7 Troubleshooting

This section provides general troubleshooting that is not related to a particularexercise.

7.1 Setting JDK 1.6 as the Default JRE

SDS requires JDK1.6 for all features to work properly. Perform this procedure ifyour default JRE is not JDK1.6. This needs to be done only once.

1. Access the Preferences window, either by clicking Configure default fromthe New Java Project wizard, or from the SDS Window > Preferencesmenu.

• If you access it from the New Java Project, the Preferences windowis filtered to show Java / Installed JREs.

• If you access it from the SDS Window > Preferences menu, expandthe Java folder and select Installed JREs.

2091553-APR 901 753/3 Uen H 2009-02-13

Page 214: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 205 Installed JREs Preferences

To set JDK 1.6 as your default JRE, follow these steps.

If JDK 1.6 is not part of your list of installed JREs, do the following:

1. Click Add.

The Add JRE window is displayed.

210 1553-APR 901 753/3 Uen H 2009-02-13

Page 215: Plugin-Service Development Studio4.1Tutorial

Troubleshooting

Figure 206 Add JRE Window

2. Select Standard VM and click Next.

The JRE Definition window is displayed.

2111553-APR 901 753/3 Uen H 2009-02-13

Page 216: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 207 JRE Definition Window

3. In the JRE home field type the path to JDK 1.6 or click Browse and selectthe path. Do not modify any other field.

The JRE name field is updated and the JRE system libraries panedisplays the list of included libraries.

212 1553-APR 901 753/3 Uen H 2009-02-13

Page 217: Plugin-Service Development Studio4.1Tutorial

Troubleshooting

Figure 208 JRE System Libraries Pane

4. Click Finish.

The window is closed. In the Installed JREs Preferences page, jdk 1.6is now displayed in the installed JREs list.

5. Click the checkbox next to jdk 1.6 to make it the default JRE.

2131553-APR 901 753/3 Uen H 2009-02-13

Page 218: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 209

6. In the navigation tree, select Java > Compiler.

214 1553-APR 901 753/3 Uen H 2009-02-13

Page 219: Plugin-Service Development Studio4.1Tutorial

Troubleshooting

Figure 210 Compiler - Compiler Compliance Level

7. Set the Compiler compliance level to 1.6 if it is not already.

8. Click Apply, then OK.

7.2 Restarting the ICP Windows Service

Problem Client application doesn't run in Windows.

Solution Restart the ICP Windows Service.

Note: ICP is not supported on Windows Vista.

Procedure

If your client application does not run, try restarting the ICP Windows Service.

1. In Windows, select Start > Run.

The Windows Run dialog opens.

2151553-APR 901 753/3 Uen H 2009-02-13

Page 220: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 211 Windows Run Dialog

2. Type services.msc and press Enter.

The Services window is displayed.

Figure 212 Services Window

3. Scroll through the list and select the IMS Client Platform service.

4. Click the Restart button on the toolbar.

A Service Control message shows the progress of the restart.

Figure 213 Services Window

5. Close the Services window.

216 1553-APR 901 753/3 Uen H 2009-02-13

Page 221: Plugin-Service Development Studio4.1Tutorial

Other Sample Applications

8 Other Sample Applications

SDS installs a set of sample applications that you can use to examine how toimplement various interfaces and functions, or to use as the starting point foryour own applications. These projects are provided as sample code in theC:\Ericsson\SDS4.1FD1\Sample\Java directory (assuming the SDS isinstalled on the default server).

Inside the Sample\Java directory, there are two subdirectories containingJava applications:

• CDCandSE, see Table 5 on page 217.

• CLDC, see Table 6 on page 219.

For more information on C++ code samples, see Service Development Studio(SDS) 4.1 C++ Tutorial, 1/1553-APR 901 753/3.

The tables below describe the projects bundled with SDS as sample codes.Under Server Side and Client Side, you will find the components necessary torun these sample applications.

Table 5 CDC and SE

Project Description Server Side Client Side

B2BUAServlet-JSR116

B2BUAServlet-JSR289

This application actsas a go-between fortwo client. Whena client issues asession request, theapplication createstwo client-transparentsessions. The clientsare then able tocommunicate asif they sharing asession.

This applicationis covered in thistutorial and comesin a JSR 116- and aJSR 289-compliantversion.

CSCF

DNS

SailFin SIP Container

Two Test Agents

2171553-APR 901 753/3 Uen H 2009-02-13

Page 222: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Table 5 CDC and SE

Project Description Server Side Client Side

ChatClient This ICP applicationdemonstrates howtwo clients can initiatea session betweeneach other.

It showcases the ICPAPI functionality toinitiate sessions, andsend messages andfiles.

CSCF

DNS

SailFin SIP Container(for PGM)

ICP

CombinationalClient This applicationruns on a phoneor emulator andcombines voice withfile transfer.

CSCF

DNS

SailFin SIP Container

ICP

GuessClient This application isa client that is usedto interact with theGuessServlet.

N/A ICP

GuessServlet-JSR116

GuessServlet-JSR289

This applicationdemonstratessession-basedcommunicationbetween a serverand a client.

This applicationis covered in thistutorial and comesin a JSR 116- and aJSR 289-compliantversion.

CSCF

DNS

SailFin SIP Container

N/A

HelloWorld-JSR116

HelloWorld-JSR289

This applicationdemonstratea server-sideapplication that sendsmessages to a client.

This applicationis covered in thistutorial and comesin a JSR 116- and aJSR 289-compliantversion. An ATF scriptis also provided.

CSCF

DNS

SailFin SIP Container

N/A, in the tutorial,a client is createdfor demonstrationpurposes.

218 1553-APR 901 753/3 Uen H 2009-02-13

Page 223: Plugin-Service Development Studio4.1Tutorial

Other Sample Applications

Table 5 CDC and SE

Project Description Server Side Client Side

InstantMessageClient This applicationdemonstrates howto send adhocmessages betweenclients

CSCF

DNS

SailFin SIP Container(for PGM)

ICP

PocClient This applicationshowcases thePush-to-Talk OverCellular API

CSCF

DNS

PoC

ICP

PresenceClient This applicationdemonstratethe basics ofposting presentityinformation.

CSCF

DNS

SailFin SIP Container(for PGM)

ICP

VoipCallClient This applicationmake VoIP calls anddemonstrated the ICPAPI

CSCF

DNS

SailFin SIP Container(for PGM)

ICP

WindowsClient This application runson Windows anddemonstrates

This application iscovered in the SDS4.1 Windows ClientSample ApplicationDescription, 19810-APR 901 753/3

CSCF

DNS

PoC Server

ICP

All IJCU applications require a use of a Wireless Toolkit.

Table 6 CLDC

Project Description Server Side Client Side

IjcuBasicPageMessage

This IJCU applicationsends SIP messagesbetween client

This applicationis covered in thistutorial.

CSCF

DNS

IJCU, automaticallybundled with IJCUapplications.

2191553-APR 901 753/3 Uen H 2009-02-13

Page 224: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Table 6 CLDC

Project Description Server Side Client Side

IjcuBasicPresence This applicationdemonstratethe basics ofposting presentityinformation.

CSCF

DNS

SailFin SIP Container(for PGM)

IJCU, automaticallybundled with IJCUapplications.

IjcuChat This IJCU applicationdemonstrates howtwo clients can initiatea session betweeneach other.

It showcases theIJCU API functionalityto initiate sessions,and send messagesand files.

CSCF

DNS

IJCU, automaticallybundled with IJCUapplications.

IjcuPresenceEnablerClient

This applicationdemonstrates thefunctionality of thePresence Enablerpackage, whichexceeds that of theIjcuBasicPresenceapplication.

CSCF

DNS

SailFin SIP Container(for PGM)

IJCU, automaticallybundled with IJCUapplications.

8.1 Importing the Code Samples

To import the other code samples:

1. From SDS, in the menu select File > Import > Import.

This launches the Import wizard.

220 1553-APR 901 753/3 Uen H 2009-02-13

Page 225: Plugin-Service Development Studio4.1Tutorial

Other Sample Applications

Figure 214 Import Wizard

2. Expand the General folder and select the Existing Projects intoWorkspace item.

3. Click Next.

The Import Projects page of the wizard is displayed.

2211553-APR 901 753/3 Uen H 2009-02-13

Page 226: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 215 Import Projects

4. Click the Browse button next to the Select root directory fieldand navigate to the Sample directory. By default the full path isC:\Ericsson\SDS4.1FD1\Sample\.

• The Projects list displays all SDS sample projects that are not alreadyin your workspace.

• The Copy projects into workspace check box is checked.

It is recommended that you leave this option on so that if you modifythe code and wish to revert to the original code, you can simply deletethe project from the Project Explorer and re-import the sample code.

222 1553-APR 901 753/3 Uen H 2009-02-13

Page 227: Plugin-Service Development Studio4.1Tutorial

Other Sample Applications

Figure 216 Import Guess Client and Servlet

5. Select the Copy projects into workspace option.

6. Select the projects you wish to import (all are selected by default) and clickFinish. To unselect a project, remove the check mark next to the projectby clicking the check box.

You will see a progress bar while the projects are imported into theworkspace. This may take a few moments.

2231553-APR 901 753/3 Uen H 2009-02-13

Page 228: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

Figure 217 Sample Projects added to Package Explorer

A Building workspace message with another progress bar appears in thestatus bar at the bottom of the screen while SDS rebuilds the workspace. Thismay take a few moments.

Figure 218 Building workspace

224 1553-APR 901 753/3 Uen H 2009-02-13

Page 229: Plugin-Service Development Studio4.1Tutorial

Glossary

Glossary

ATFAutomated Testing Framework

CSCFCall Session Control Function

DHCPDynamic Host Configuration Protocol

DNSDomain Name Server

GUIGraphical User Interface

HSSHome Subscriber Server

ICPIMS Client Platform

iFCinitial Filter Criteria

IMS-MIMS Messaging

JREJava Runtime Environment

PGMPresence and Group List Management

PoCPush-to-Talk over Cellular

PSIPublic Service Identity

SARSIP Archive

SDSService Development Studio

SIPSession Initiation Protocol

SPTService Point Trigger

2251553-APR 901 753/3 Uen H 2009-02-13

Page 230: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

226 1553-APR 901 753/3 Uen H 2009-02-13

Page 231: Plugin-Service Development Studio4.1Tutorial

Reference List

Reference List

Documents in this Set

[1] SDS 4.1 Technical Product Description, 1/221 02-FGC 101 0558

[2] Service Development Studio (SDS) 4.1 Installation Guide, 1531-APR901 753/3

[3] Service Development Studio (SDS) 4.1 Developer's Guide, 198 17-APR901 753/3

[4] Service Development Studio (SDS) 4.1 C++ Developer's Guide, 1/19817-APR 901 753/3

[5] Service Development Studio (SDS) 4.1 Tutorial, 1553-APR 901 753/3

[6] Service Development Studio (SDS) 4.1 C++ Tutorial, 1/1553-APR 901753/3

[7] Service Development Studio (SDS) 4.1 Glossary, 0033-APR 901 753/3

[8] Service Development Studio (SDS) 4.1 Third Party Licence Agreements,0962-APR 901 753/3

[9] SDS 4.1 Client Use Case Signalling Flows for Java Developers,1953-APR 901 753/3

[10] SDS 4.1 Client Use Case Signalling Flows for C++ Developers,1/1953-APR 901 753/3

[11] IMS Client Platform (ICP) 4.1 Parameter List, 190 59-APR 901 0338

[12] Service Development Studio (SDS) 4.1 Sample Windows ClientDescription, 198 10-APR 901 753/3

[13] Service Development Studio (SDS) 4.1 Mini Golf Game SampleApplication Description, 198 10-APR 901 753/3

Useful References

[14] Apache Tomcat, http://jakarta.apache.org/tomcat/tomcat-5.0-doc/index.html

[15] Eclipse IDE home, http://www.eclipse.org/

[16] UIQ Developer Community, http://developer.uiq.com

[17] Symbian Signed site, https://www.symbiansigned.com/app/page

2271553-APR 901 753/3 Uen H 2009-02-13

Page 232: Plugin-Service Development Studio4.1Tutorial

Service Development Studio (SDS) 4.1 Tutorial

[18] Sony Ericsson Developer World site, http://developer.sonyericsson.com/site/global/docstools/symbian/p_symbian.jsp

[19] 3rd Generation Partnership Project; Technical Specification Group CoreNetwork; IP Multimedia Call Control Protocol based on Session InitiationProtocol (SIP) and Session Description Protocol, 3GPP TS 24.229 V6.1.0

JSRs and RFCs

[20] JSR 116 SIP Servlet API, http://jcp.org/aboutJava/communityprocess/final/jsr116/index.html

[21] JSR 281 IMS Services API, http://jcp.org/en/jsr/detail?id=281

[22] SIP: Session Initiation Protocol RFC 3261, http://www.ietf.org/rfc/rfc3261.txt

[23] RFC 2327 - SDP: Session Description Protocol, http://www.ietf.org/rfc/rfc2327.txt

[24] RFC 4825 - The Extensible Markup Language (XML) ConfigurationAccess Protocol (XCAP), http://www.ietf.org/rfc/rfc4825.txt

PoC References

[25] OMA Push-to-Talk over Cellular Working Group (PoC),http://www.openmobilealliance.org/tech/wg_committees/poc.html

[26] OMA Public Documents for PoC, http://member.openmobilealliance.org/ftp/Public_documents/POC/

Presence References

[27] OMA Presence and Availability Working Group (PAG),http://www.openmobilealliance.org/tech/wg_committees/pag.html

[28] OMA Public Documents for PAG, http://member.openmobilealliance.org/ftp/Public_documents/PAG/

[29] OMA Presence SIMPLE specification, version 1.0, http://www.openmobilealliance.org/ftp/Public_documents/PAG/Permanent_documents/OMA-TS-Presence_SIMPLE-V1_0-20060214-C.zip

228 1553-APR 901 753/3 Uen H 2009-02-13