sendMessage Operation Send Message Interface

18-8 Developers Guide in assembling a Web Service with SOAP attachments in the style mandated by Parlay X, we recommend the use of the provided API rather than starting from WSDL. For a complete listing of the classes available in the Parlay X Messaging API, see the Oracle Fusion Middleware User Messaging Service API Reference. The main entry points for the API are through the following client classes: ■ oracle.sdp.parlayx.multimedia_messaging.send.SendMessageClient ■ oracle.sdp.parlayx.multimedia_messaging.receive.ReceiveMessageClient ■ oracle.sdp.parlayx.multimedia_messaging.extension.receive_manager. ReceiveMessageManager Each client class allows a client application to invoke the operations in the corresponding interface. Additional Web Service parameters such as the remote gateway URL and any required security credentials, are provided when an instance of the client class is constructed. See the Oracle Fusion Middleware User Messaging Service API Reference for more details. The security credentials are propagated to the server using standard WS-Security headers, as mandated by the Parlay X specification. The general process for a client application is to create one of the client classes above, set the necessary configuration items endpoint, username, password, then invoke one of the business methods for example SendMessageClient.sendMessage, etc. For examples of how to use this API, see the Messaging samples on Oracle Technology Network OTN, and specifically usermessagingsample-parlayx-src.zip.

18.6 Sample Chat Application with Parlay X APIs

This chapter describes how to create, deploy and run the sample chat application with Parlay X APIs provided with Oracle User Messaging Service on OTN. This chapter contains the following sections: ■ Section 18.6.1, Overview ■ Section 18.6.2, Running the Pre-Built Sample ■ Section 18.6.3, Testing the Sample ■ Section 18.6.4, Creating a New Application Server Connection

18.6.1 Overview

This sample demonstrates how to create a Web-based chat application to send and receive messages through e-mail, SMS, or IM. The sample uses standards-based Parlay X Web Service APIs to interact with a User Messaging server. The sample application includes web service proxy code for each of three Web service interfaces: the SendMessage and ReceiveMessage services defined by Parlay X, and the ReceiveMessageManager service which is an Oracle extension to Parlay X. You must define an Application Server connection in JDeveloper, and deploy and run the application. The application is provided as a pre-built Oracle JDeveloper project that includes a simple web chat interface. Note: To learn about the architecture and components of Oracle User Messaging Service, see Oracle Fusion Middleware Getting Started with Oracle SOA Suite. Parlay X Web Services Multimedia Messaging API 18-9

18.6.1.1 Provided Files

The following files are included in the sample application: ■ Project – the directory containing the archived Oracle JDeveloper project files. ■ Readme.txt. ■ Release notes

18.6.2 Running the Pre-Built Sample

Perform the following steps to run and deploy the pre-built sample application: 1. Open the usermessagingsample-parlayx.jws contained in the .zip file in Oracle JDeveloper. In the Oracle JDeveloper main window the project appears. Figure 18–1 Oracle JDeveloper Main Window 2. In Oracle JDeveloper, select File Open..., then navigate to the directory above and open workspace file usermessagingsample-parlayx.jws. This opens the precreated JDeveloper application for the Parlay X sample application. The application contains one Web module. All of the source code for the application is in place. You must configure the parameters that are specific to your installation. 3. Satisfy the build dependencies for the sample application by adding a library to the Web module. 1. In the Application Navigator, right click on web module usermessagingsample-parlayx-war, and select Project Properties.

2. In the left pane, select Libraries and Classpath.