6 Developing Converged Applications

This chapter describes how to develop converged Hypertext Transfer Protocol (HTTP) and Session Initiation Protocol (SIP) applications with Oracle Communications Converged Application Server.

Overview of Converged Applications

In a converged application, SIP protocol functionality is combined with HTTP or Java Platform, Enterprise Edition (Java EE) components to provide a unified communication service. For example, an online push-to-talk application might enable a customer to initiate a voice call to ask questions about products in their shopping cart. The SIP session initiated for the call is associated with the customer's HTTP session, which enables the employee answering the call to view customer's shopping cart contents or purchasing history.

You must package converged applications that utilize Java EE components (such as EJBs) into an Enterprise Archive (EAR) file. EAR is a file format used by Java EE for packaging one or more modules into a single archive so that the deployment of the various modules onto an application server happens simultaneously and coherently. It also contains XML files called deployment descriptors which describe how to deploy the modules. Converged applications that use SIP and HTTP protocols must be packaged in a single SAR or WAR file containing both a sip.xml and a web.xml deployment descriptor file.You can optionally package the SIP and HTTP Servlets of a converged application into separate SAR and WAR components within a single EAR file.

The HTTP and SIP sessions used in a converged application can be accessed programmatically through a common application session object. The SIP Servlet API also helps you associate HTTP sessions with an application session.

Assembling and Packaging a Converged Application

The SIP Servlet specification fully describes the requirements and restrictions for assembling converged applications. The following statements summarize the information in the SIP Servlet specification:

  • Use the standard SIP Servlet directory structure for converged applications.

  • Store all SIP Servlet files under the WEB-INF subdirectory; this ensures that the files are not served up as static files by an HTTP Servlet.

  • A weblogic.xml deployment descriptor may be included to configure Servlet functionality in the Converged Application Server container.

  • Observe the following restrictions on deployment descriptor elements:

  • The distributable tag can be present in sip.xml or specified using a SipApplication annotation.

  • context-param elements are shared for a given converged application. If you define the same context-param element in sip.xml and in web.xml, the parameter must have the same value in each definition.

  • If either the display-name or icons element is required, the element must be defined in both sip.xml and web.xml, and it must be configured with the same value in each location.

Examples

Converged Application Server includes sample converged applications when installed using the Complete Installation option. All source code, deployment descriptors, and build files for the examples are found in

OCCAS_home/occas/samples/sipserver/examples

where, OCCAS_home is the directory in which the Converged Application Server software is installed. By default, occas_home is a subdirectory of Oracle_home; for example, Oracle_home/occas. For more information on these placeholders, see Table1-1 in Converged Application Server Installation Guide.

For descriptions of the examples, source code, and build files, see index.html under the src sub-directory in the examples location.