API Reference for Interface Address

Sending and Receiving Messages using the User Messaging Service Java API 17-11

3. Click OK.

4. Verify that the usermessagingclient-ejb project exists in the application. This is an EJB module that packages the messaging client beans used by SDP Messaging applications. The module allows the application to connect with the UMS server. 5. Explore the Java files under the usermessagingsample-web project to see how the messaging client APIs are used to send messages, get statuses, and synchronously receive messages. The application info that is registered with the UMS Server is specified programmatically in SampleUtils.java in the project Example 17–10 . Example 17–10 Application Information ApplicationInfo appInfo = new ApplicationInfo; appInfo.setApplicationNameSampleConstants.APP_NAME; appInfo.setApplicationInstanceNameSampleConstants.APP_INSTANCE_NAME; appInfo.setSecurityPrincipalrequest.getUserPrincipal.getName;

17.5.4 Deploying the Application

Perform the following steps to deploy the application: 1. Create an Application Server Connection by right-clicking the application in the navigation pane and selecting New. Follow the instructions in Section 17.7, Creating a New Application Server Connection .

2. Deploy the application by selecting the usermessagingsample application,

Deploy , usermessagingsample, to, and SOA_server Figure 17–4 . Figure 17–4 Deploying the Project 3. Verify that the message Build Successful appears in the log. 4. Verify that the message Deployment Finished appears in the deployment log. You have successfully deployed the application. Before you can run the sample you must configure any additional drivers in Oracle User Messaging Service and optionally configure a default device for the user receiving the message in User Messaging Preferences.

17.5.5 Testing the Application

Once usermessagingsample has been deployed to a running instance of WLS, perform the following: Note: Refer to Configuring Notifications in the Oracle Fusion Middleware SOA Developer’s Guide for more information. 17-12 Developers Guide 1. Launch a Web browser and enter the address of the sample application as follows: http:host:http-portusermessagingsample. For example, enter http:localhost:7001usermessagingsample into the browser’s navigation bar. When prompted, enter login credentials. For example, username weblogic. The browser page for testing messaging samples appears Figure 17–5 . Figure 17–5 Testing the Sample Application

2. Click Send sample message. The Send Message page appears

Figure 17–6 .