Skip Headers
Oracle® Application Server Wireless Developer's Guide
10g Release 2 (10.1.2)
B13819-02
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

10 Creating Messaging Applications

This chapter describes Messaging Application architecture, and explains how to use these Applications to create and deploy applications. Each section of this document presents a different topic. These sections include:

10.1 Overview of Messaging Applications

Messaging services are a key component that enhance your applications by supporting sending and receiving messages among mobile users. OracleAS Wireless Messaging services provide a highly scalable mechanism to deliver messages to all mobile devices. Messages are delivered to mobile devices using native device protocols, for example through SMS to a mobile phone, as an e-mail to a 2-way pager, as an audio message to regular telephone, as an Instant Messaging (IM) message to an IM client or as a fax to a fax machine.

Messaging services in OracleAS Wireless also offer a Web Service Interface (specified using WSDL) that uses SOAP over HTTP. The SOAP service enables applications to invoke remote object methods over HTTP protocol. This enables applications to invoke Messaging services from anywhere on the Internet, using any programming model. OracleAS Wireless Messaging services enable applications to specify both the message and the recipient(s) of the message. The application communicates to the Messaging service in OracleAS Wireless using SOAP and HTTP. OracleAS Wireless receives the message and delivers it to mobile devices using appropriate protocols such as SMS, E-mail, Voice, and others.

Figure 10-1 OracleAS Wireless Messaging Architecture

Description of Figure 10-1  follows
Description of "Figure 10-1 OracleAS Wireless Messaging Architecture"

Messaging Services in OracleAS Wireless are scalable, and can handle large volumes of messages to many devices. The Messaging Service is based on extensible architecture and design; it can support a variety of devices and push protocols. Push protocols are handled by the XMS messaging API. The Messaging subsystem supports a driver-based architecture; the drivers are components in the wireless messaging system that handle all device-specific or communication protocol-specific routines.

10.1.1 Key Messaging Features

OracleAS Wireless provide intelligent messaging with functionality for:

  • Automatic device selection

  • Message content adaptation

  • Failover delivery control

  • MMS (multi-media messaging) features that allow for richer messaging experiences

  • Actionable notification messages

  • Contact Rule Integration

10.1.2 Multi-Channel Adaptive Messaging

Messages that are authored generically in XHTML or OracleAS Wireless XML are automatically adapted for devices by OracleAS Wireless. The power of adaptation allows a message to be written once and automatically optimized for receiving device capabilities. For example, multi-media content can be optimized for a device by using image conversion allowing images to be altered from full-color to black and white.

10.1.3 Multimedia Messaging

OracleAS Wireless supports Multi-Media Messaging (MMS) for rich mobile messages including graphics, video and audio. MMS messages can be authored natively in SMIL, XHTML or OracleAS Wireless XML.

10.1.4 Transport Framework

The Messaging subsystem (based on the device address and transport type such as SMS, MMS, IM, Voice, E-mail), dispatches a message to the appropriate transport protocol driver. The driver interface delivers the message to a device in the native device protocol. The Messaging subsystem can support multiple drivers in a single instance.

Message drivers in OracleAS Wireless are plugable modules that implement device-specific or communication protocol-specific handling routines. OracleAS Wireless includes prebuilt drivers that support communication protocols such as SMS (SMPP and UCP), MMS, IM, Voice, E-mail and Fax.

OracleAS Wireless includes a special driver implementation that enables your wireless instance to act as a client to another OracleAS Wireless installation or any service that respects the Web Service Interface defined by OracleAS Wireless. This special driver uses the SOAP interface (as the XMS APIs) to send messages. By default, this driver is configured to act as an XMS Client to an OracleAS Wireless instance hosted, on the Internet, by Oracle. Instance administrators can change this default setting to point to any server that respects the XMS WSDL interface defined by OracleAS Wireless. As a result, any OracleAS Wireless installation is capable of sending SMS, MMS, E-mail, Voice, Fax messages out-of-the-box without configuration.

There is a quota preconfigured. If you need to raise the quota after exceeding the pre-allotted limit, see your Oracle administrator.

The Transport process periodically purges messages older than 15 days, in order to free up disk space (critical for environments with high-volume transactions). For those with different requirements, you can change the message retention period by modifying attribute log_cleanup_interval_in_days, in the trans_attribute table.

10.1.5 MMS Center

The XMS component includes MMS Center (MMSC) functionality out-of-the-box, supporting the MM1 message notification protocol. If the recipient device has an MMS browser, a notification message is sent to the browser, and the message is retrieved using HTTP. The content is stored and served out by OracleAS Wireless, the only external component needed is a regular SMSC for transmitting the notification message. Coupled with the fact that OracleAS Wireless can send SMS out-of-the-box using a hosted server, the product can send MMS out-of-the-box without configuration.

10.1.5.1 Actionable Messaging Framework

The templates, security to prevent message spoofing, support for message prioritization, and more flexibility in handling volume notifications.

10.2 Sending and Receiving Messages

Before you begin this section, ensure that you have the following JAR files in your CLASSPATH:

These JAR files are included in JDeveloper Wireless Extension; you can download it from the Oracle web site (See Chapter 4 for more details.).After JWE is installed properly in JDeveloper, these JAR files are located at: [JDeveloper Home]\jdev\jwe\wdk\lib


Note:

Messaging Transport supports sending messages in English only over Enhanced Messaging Services (EMS). Other languages are supported on SMS and MMS.

Sending SyncML server settings to the Nokia 3650 is not supported.


10.2.1 Overview of One-Way Message Application API

The OracleAS Wireless Messaging Service is deployed as a web service using SOAP with HTTP as the transport layer. WSDL (Web Services Definition Language) is a standard XML interface that defines a Web Service application. With clearly defined WSDL, developers can build applications in any programming language (such as Java and VB) that can communicate with the OracleAS Wireless messaging interface over the Internet. Developers can use any WSDL toolkit to quickly implement a one-way (Push) application and send messages to mobile devices using any OracleAS Wireless instance on the Internet.

Parallel to the Web Service interface, OracleAS Wireless also supports a simple Java API (the XMS API) for building one-way message (Push) applications. The XMS API uses SOAP over HTTP to communicate with the OracleAS Wireless server instance, however the XMS API abstracts any protocol-specific (SOAP) implementation details from the application's Java code. XMS is the preferred API for application developers who need a clear and simple interface to deliver messages.

The XMS API supports a uniform interface for the delivery of messages to any kind of device (such as SMS, MMS, IM, Voice, E-mail and Fax). The API allows applications to specify multiple recipients for a single message using only one delivery request.

Furthermore, message destination addresses can have devices using different communications channels; for example, a single message delivery request application can send messages to E-mail as well as fax machines. Applications can make one delivery request and send the messages to a list of users with SMS or MMS devices, E-mail or IM clients and Voice devices.

OracleAS Wireless supports different types of contents for delivery. A message can consist of only text characters, or can be as complex as a multipart message. Message types are identified based on the MIME, hence delivering documents such as Microsoft Word or Adobe PDF is possible if the target device supports the message MIME type. OracleAS Wireless provides two variants of the XMS API: the XMSSimpleSender API supports text-only messages, while the XMSSender advanced XMS API supports messages of any MIME type.

The following is an abridged overview of the XMS API functionality; for a complete overview see the XMS JavaDoc.

10.2.1.1 XMSSimpleSender

oracle.panama.messaging.xms.XMSSimpleSender

XMSSimpleSender corresponds to the PushLite API from earlier OracleAS Wireless releases. It is a simple API that works on String parameters only. It is lightweight and very easy to use.

10.2.1.1.1 Send

public String[] sendMsg(String[] recipients, String message)

Sends out a text message (without subject) to multiple recipients of multiple transport types. Encoding and content of the message depends on the content of the message and the receiving device. This method provides the easiest way to send out text messages. Other overloaded send() methods can be used to set subject, reply to, content type encoding (MIME type) and associated key parameters.

recipients—an array of recipients addresses. A sender's address consists of either an OracleAS Wireless user name or a transport type and address, separated by a colon (:).

Example 1: E-mail:mye-mail@company.com

Example 2: SMS:16505551234

Example 3: username

Valid transport types are defined in:

oracle.panama.messaging.common.TransportType

recipients—recipients' addresses (such as: e-mail address, phone number or user name)

The address format is shown in Example 10-1

Example 10-1 XMSSimpleSender address format

<address string ><:transport type > [;<address string>:<transport type >]* 
<address string> = <e-mail address>|<phone number> |< subscriber ID > |< user address > 
<user address> = < brand name > ~ < user name > 
<phone number> = < country code > - < area code > - < local phone number > 

One line per recipient. A recipient may have multiple failover addresses and each address must have at least one transport type. Use a colon(:) to separate address and transport types. Use a comma(,) to separate transport types within the same address. Use a semicolon(;) to separate addresses.

Example 1: SMS:1-650-5551234,Voice:1-650-5551234;Fax:1-408-3456789

Example 2: E-mail:mye-mail@foo.com;Voice:mary,E-mail:mary,Fax:mary;E-mail: bob

[transport] is one of the types defined in oracle.panama.messaging.common.TransportType

message—body of the message. The message text can be either plain or rich text (XHTML or OracleAS Wireless XML). XMS examines the content of the message to detect whether rich text is used. Rich text will be transformed to the appropriate markup for the target device.

10.2.1.1.2 getStatus

public String[] getStatus(String[] messageIDs)

Gets the current status of a set of message IDs.

Returns: an array of text status strings.

10.2.1.2 XMSSender

oracle.panama.messaging.xms.XMSSender

XMSSender corresponds to the Push API from earlier OracleAS Wireless releases. It is an API that allows users to send out more complex (multipart) messages.

10.2.1.2.1 Send

public WorkOrder[] sendMsg(Packet pkt)

Sends out a message packet.

pkt—The message packet to be delivered. Packet class will be discussed below.

Returns: a set of WorkOrders will be returned after the XMS server accepts the request. One WorkOrder will be returned for each instance of a recipient's address.

10.2.1.2.2 getStatus

public Status getStatus(WorkOrder workOrder)

Gets the current status of a work order. A work order has one address and the message ID of that address.

public Status[] getStatus(WorkOrder[] workOrders)

Gets the current status of a set of work orders.

oracle.panama.messaging.push.Packet

Packet class represents a generic message in the real world (For example: e-mail). It may have a subject, a body or a set of message bodies (multipart). The same message may be delivered to multiple recipients of multiple transport types (delivery types). For example: the same message can be delivered to 2 E-mail recipients, 3 SMS recipients and 4 fax machines in the same packet.

Every transport type may have a sender, an alternate reply to address and a group of recipients. The packet could have a set of optional delivery instructions, such as priority or registered.

To accomplish this, first construct an empty Packet instance. Then set message, message info, sender, reply to and recipients of the packet. See the sample code below for more details.

The XMS API provides methods to set the properties of a message and dispatch it to a OracleAS Wireless instance. For a detailed description of the API interfaces, see the OracleAS Wireless XMS Javadoc (oracle.panama.messaging.xms). To send a push message, you must provide the following:

  • OracleAS Wireless server on which the Push Web Service is running. Include the username and password, and the HTTP proxy required to access the remote OracleAS Wireless Web Service (unless the application will be running in an OracleAS Wireless VM).

  • Actual message to be sent and the content (MIME) type of the message.

10.2.1.3 Text-based Messages

The simplest way to use the XMS API is to send text-only messages. When used in this manner, the XMS API behaves like the Push API from earlier OracleAS Wireless releases, with one important difference: when sending messages to devices that cannot display plain text (such as WAP Push), the input text is embedded in the correct markup for the chosen device.

10.2.1.4 Multimedia Messages

XMS accepts rich text (that is, text marked-up in OracleAS Wireless XML or XHTML markup languages supported by OracleAS Wireless). The content of the input message is converted to fit the target device chosen. This includes both the structure and layout of the document itself, as well as any embedded images or sound files. In addition, XMS also processes URLs to be appropriate for the target device. Specifically, if the target device cannot display HTTP hyperlinks, the message is rewritten to use the Reverse Async (RevAsync) format instead, which allows the end user to invoke links by using a request-reply messaging exchange.

In addition to transcoding the input markup, XMS also converts images and audio as appropriate. For images, the conversion includes changing the image format, as well as resizing and resampling the image if necessary for the target device. If a single image is sent through a channel that supports handset provisioning (such as SMS) it will be sent as an installable operator logo. Similarly, if a single audio clip is sent, it is converted to a ringtone in the format appropriate to the target device.

By providing transparent support for Reverse Async, XMS allows other applications (such as the Notification framework) to send rich content that a user can interact with (so-called actionable notifications). These are notifications that contain the output of a OracleAS Wireless service; the user can interact with the service by replying to the message. Actionable notifications can be thought of as RevAsync sessions that are started by the server rather than by the user.

XMS accepts regular OracleAS Wireless XML markup, as well as the mapping of the markup language elements (depending on the target device of the message). A rich target device such as an MMS browser receives all multimedia elements, and will also use any timing information present in the markup to control the duration of multimedia content. Images can be supplied in JPEG, GIF or BMP format; if the target device does not support the image format at hand, the image will be converted to another format suitable for the target device. XMS also supports the available attribute of the OracleAS Wireless XML SimpleImage tag; this means an image can be stored in multiple formats and the best format of those available will be chosen if possible. This is in fact the recommended approach, since automatic conversion both introduces some computational overhead and can lead to undesirable conversion artifacts in the final image. By pre-generating multiple versions of a given image, one can create simpler versions of the image for devices that support low-resolution images of limited colordepth.


Note:

Due to a bug in the device, sending MMS messages with the Subject containing non-ASCII characters to the Nokia 3650 is not supported.

10.2.1.5 Other Content

In addition to plain and rich text, XMS can send any arbitrary content. In this case, no transcoding is performed, and it is up to the client programmer to format and package the message correctly.

An explicit MIME-type should be specified in this case, which means the XMSSender API is the correct API to use for this class of messages.

10.2.2 Two-Way Messaging, Transport API

Transport API is a rich set of APIs that can be used for both sending and receiving.

Transport API is the client side messaging interface. This section details the Transport API, explaining the major constructs and functionality available to customize the Transport System.

XMS API is built over Transport API. XMS API handles sending only. In terms of sending, transport API does not provide message transformation. However, Transport API provides some extra features which XMS API does not have, such as status tracking, hints and fine-tuned message routing.

When a message delivery request is submitted, the transport system performs analysis of the recipients and routes the message to the appropriate protocol drivers for delivery.

To receive messages, an application must register listening end points and a message callback listener to the transport system. An end point is in the form of an address, such as a phone number. It identifies (to the transport system) how messages should be dispatched. When a message is received for a targeted address, it is dispatched to the listener associated with an end point with a matching address.

The key interface is oracle.panama.messaging.transport.Messenger. An instance of this interface will be returned through the Get method of oracle.panama.messaging.transport.MessengerController which in turn can be obtained through the TransportLocator class. This gives you access to the rest of the package to build your messaging applications. See the Javadoc for a complete reference of the APIs.

10.2.2.1 Destination Analysis

A single message can be delivered to multiple recipients of different communication protocols. For example, one can send a meeting reminder to a few people using SMS, and some other people to their e-mail addresses. Before routing messages to drivers, the transport analyzes and groups recipients by their delivery category. Typically, the transport system starts its internal processing by analyzing all destinations and groups them accordingly.

10.2.2.2 Message Routing

To send a message, the transport system must locate a proper driver to do so. The process of finding a proper driver is called message routing. The transport system at a particular time may have many messaging servers and protocol drivers configured. Different driver instances may handle different categories of messages.

For example, a driver may be able to send SMS messages only. Another one may be able to send e-mail and fax messages only. Therefore, the transport system must use a driver with SMS capability to send SMS messages, a driver with e-mail capability to send e-mail messages. Sometimes, there may be more than one driver that can handle the same category of messages. For example, there could be more than two SMS drivers. One communicates with ATT's SMSC, the other with Cingular's SMSC. The transport system must use ATT's SMS driver to send SMS messages to ATT's devices, and use Cingular's SMS driver to send SMS messages to Cingular's devices.

All these decisions are made by the transport based on two sets of information. The first set is the sending criteria specified by the application (such as delivery type, speed, cost and encoding). Of these, the delivery type is required and can be specified in the class destination. The other information is provided by the set of available drivers. The properties of the drivers are configured by the administrator, such as driver speed, driver cost, encoding and delivery category.

As mentioned earlier, routing finds the best-matching driver. Some properties must match, for example, the delivery category; some of them just find the closest match, for example, cost and speed.

The transport uses the following information to do the routing:

  • delivery category

  • protocol

  • carrier

  • speed

  • cost

Attribute encoding is not used in routing.

The transport will route a message to a driver with best match:

  1. The delivery category, such as SMS or E-MAIL.

  2. The protocol, such as UCP or SMPP.

  3. The carrier, such as Cingular or Telia.

  4. If (speed_requested >= 0 and cost_requested >= 0), the minimum (driver_speed -speed_requested)**2 + (driver_cost - cost_requested)**2

    or

    if cost_requested < 0 the minimum abs(driver_speed - speed_requested)

    or

    if speed_requested < 0, the minimum abs(driver_cost - cost_requested)

If more than one driver meet the above criteria, the transport chooses randomly one of them.

10.2.2.3 Providing Hints to Facilitate Transport Internal Processing

Applications can provide hints that help speed up routing and destination analysis. For example, if you specify E-mail as the delivery category of all recipients, the transport will not have to look into each of the recipients to determine what they are.

In principal, the required parameter to deliver a message (the Messenger.send() methods) is Destination and Message. All others (SenderInfo, MessageInfo and DeviceInfo) are optional. When they are specified, they will be interpreted as hints that describe properties common to all recipients. For example, if DeviceInfo is specified and the getDeliveryType() of this DeviceInfo instance returns DeliveryType.E-MAIL.getName() then the transport will take it as a hint that all recipients are e-mail addresses and no destination analysis will be performed.

10.2.3 Actionable Messages

Before OracleAS Wireless, messaging devices could not respond to Push messages initiated from a server. For example, the notification messages sent by the OracleAS Wireless instance were considered in their final result once they were received on a user's device; there was no more interaction. The inability to respond to such messages limited the information and options provided to device users through Push messaging.

10.2.3.1 Components Overview

Integrating XMS and Async exposes an API that enables content providers to create Push messages which can be acted on for messaging channels such as: SMS, E-mail and Instant Messaging. Figure 10-2, "Actionable Messages" the relevant components and their relationship.

Figure 10-2 Actionable Messages

Description of Figure 10-2  follows
Description of "Figure 10-2 Actionable Messages"

10.2.3.1.1 XMS Client

XMS Client is a component which calls the XMS API to deliver messages and content. There are several requirements on the kind of document it can generate in order to make a Push message actionable:

  • The document must be in OracleAS Wireless-supported content markup format. For this release, only OracleAS Wireless XML is supported for actionable messages.

  • The URL link used in the document could be in HTTP or OMP protocol. The OMP is a virtual URL to identify a service in an OracleAS Wireless instance. The benefit of using OMP URL is that it uniquely identifies a service created in OracleAS Wireless. Thus, any change of a service OID does not affect the user program.

10.2.3.1.2 XMS

The role of XMS for actionable messages is to determine if a document being sent must be in persistent state. One example is to push a document with an embedded URL to an SMS device. Since the device does not have a browser to process the URL link, the state must be cached in the server. The XML achieves this by calling the underlying component, RevAsync. The document is subsequently transformed to the device result and sent out.

10.2.3.1.3 RevAsync

RevAsync is a newly created entity under the XMS component. Its main function is to receive an OracleAS Wireless-supported markup document as input and analyze the document to locate all the elements and attributes which need to be cached. The cached objects are persisted into the database and are used by Async to reconstruct the session state once the device user replies.

10.2.3.2 Actionable Message Flow

To enable an actionable message, the content provided to XMS must be in a OracleAS Wireless-supported markup document. For this release, only OracleAS Wireless XML is supported.

There are two ways to trigger an actionable message:

  • Create a Notification service so that the service is invoked whenever a user-specified condition is fulfilled. The service returns an OracleAS Wireless XML result, possibly with some hyperlinks embedded within the document.

  • Directly push an OracleAS Wireless XML document through XMS API. The document should contain some menu or form construct so user interaction can be applied. To address the service to be invoked on user reply, it's use the OMP protocol for the URL values in the document, then the developer does not need to be concerned with the OID change of a service.

Receiving an OracleAS Wireless XML input, XMS traverses the document for any element that could trigger further user interaction. A typical example is the SimpleMenu element which presents a hyper link for a device user to select. A persistent state and its corresponding transaction ID are generated once such a situation is detected. RevAsync adds an extra instruction line to the result message indicating the format and the transaction ID to be used for user reply. The ID must be part of the reply parameters if the user decides to respond. This way, Async is able to restore the session state by the transaction ID once it receives an actionable message reply.

To retrieve the persisted user state, Async uses the following methods to differentiate between the user reply of an actionable message and the typical Async requests:

  1. A user replies with a site-wide unique Actionable Message (AM) Short Name. The AM short name is a site-wide unique system parameter. Async differentiates the request being a reply to an actionable message if the command line starts with an AM short name. With this option, the user reply should conform to the following format:

    <AM short name> <transaction ID> <parameters>
     
    

    A user may receive the following message (Example 10-2) for stock notifications.

    Example 10-2 Stock notification

    To respond, type 'am 2 <link selector>' 
    [orcl] L 15.25 B 15.20 A 15.30 O 15.10 
    1 News 
    2 Detail Quote 
    
    

    A user would reply to this message with the content am 2 2 to get the Detail Quote option. Since am is the site-wide unique short name, Async will interpret the parameter right after the short name as the transaction ID and use it to retrieve all the persisted state.

  2. Set the From address of the push message as a Dedicated Actionable Message Access Point. An Async access point can be configured as AM-dedicated, thereby causing all of the requests to the access point to be interpreted as the Actionable Message Reply. The user does not need to specify an Actionable Message Short Name (as in the example above, replying 2 2 to get the Detail Quote).

10.2.3.3 Enabling Actionable Messages

To enable actionable messages, follow these steps:

  1. Prepare an OracleAS Wireless document to be sent out.

    As discussed earlier, the document can be either generated as the output of a notification service, or a document being pushed out by an XMS client. The document should contain action elements (such as SimpleMenu or SimpleForm, on which device users can act). A sample document is shown in Example 10-3.

    Example 10-3 Actionable message sample

    <SimpleResult>
       <SimpleContainer>
          <SimpleText>
              <SimpleTextItem>Approve/Disapprove John Doe's expense report #1234</SimpleTextItem>
              <SimpleTextItem>Upgrade 256 MB memory on desktop pc - $30<SimpleBreak/></SimpleTextItem>
          </SimpleText>
          <SimpleMenu name="" title="">
             <SimpleMenuItem target="omp://expensereply?answer=approved&amp;reportNo=1234">Approve</SimpleMenuItem>
             <SimpleMenuItem target="omp://expensereply?answer=disapproved&amp;reportNo=1234">Disapprove</SimpleMenuItem>
          </SimpleMenu>
       </SimpleContainer>
    </SimpleResult>
    
    

    omp://expensereply identifies the service to be invoked once such an action item is triggered on a user reply message.

  2. Create Application Links addressed in pushed document.

    Application Links addressed in the pushed document must be created with the OMP value set. For the example above, the OMP value should is omp://expensereply

  3. Create Access Points

    At least one access point must be created for each supported delivery channel. The access point can be set as actionable-message-dedicated if it is only reserved as the entry point of the user reply of actionable message. Or, it can also be an access point, which allows messages from both Async requests and replies of an actionable message. The from address of the push message is set to the access point configured so it can be routed to the Async entry point when a user replies. If there are multiple access points set for the same channels, the one with a dedicated flag set has precedence.

10.2.3.4 Configuration Parameters

Table 10-1 lists the supported configuration parameters for Actionable Messages. See OracleAS Wireless Administrator's Guide for detailed configuration steps.

Table 10-1 Configuration Parameters of Actionable Message

Parameter Name Description

Short Name for Replying an Actionable Message

This is the site-wide unique short name to identify a reply of an Actionable Message if both Async requests and replies of Actionable Message share the same access point as the entry point.

Maximum Active Transaction Number per Device

This parameter defines the maximum number of active persistent transactions per device. Once a user replies to an actionable message, the persistent transaction addressed by the message gets deleted.

Expiration Time for Non-Active Transaction

This parameter specifies the expiration time (in number of days) for a non-active transaction. Once expired, the transaction will be removed from persistent store.

Access Point Dedicated for Actionable Message Reply

A flag to indicate if an Access Point is dedicated for Actionable Message Reply. Once set, all actionable Push messages will have the From address set to the access point. The instruction, added to the Push message, on how to reply to an actionable message, will have the short name omitted. Users only need to reply with the transaction ID and the application parameters.


10.2.3.5 Actionable Messages Example

This tutorial demonstrates how to enable actionable messages through pushing a Wireless XML document containing the actionable elements (such as SimpleMenu), and create the corresponding services for handling user replies.

10.2.3.5.1 Requirements

This tutorial requires a full installation (10g) of OracleAS Wireless installation.

10.2.3.5.2 Assumptions

The tutorial assumes that you have the knowledge to send out documents by calling the XMS API. There is no discussion on how to write such programs. The main focus here is to demonstrate how to associate an original document with the service being invoked on user reply.

10.2.3.5.3 Pre-requisites

Because this tutorial shows how to create a simple Async application and test it with Jabber IM clients, a Jabber client and an account on a Jabber server should be prepared before starting configuration.


Note:

Jabber, the backend used with Instant Messaging, does not support multibyte usernames; therefore Instant Messaging does not support multibyte usernames.

In this tutorial, the product (Rival), is the Jabber client, and netmindz.net is the Jabber server for user accounts; you can use your own favorite client or server. The site http://jabber.org provides a comprehensive list of popular Jabber clients and public servers. To download the freeware and set up an account:

  1. Point your browser to http://rival.chote.net/

  2. Download the software.

  3. Run the EXE file, and follow the instructions to install the software. Be sure to set the proxy value (if required in your environment). Once installed, the first screen you see should look like the following screen:

Figure 10-3 Actionable Message Tutorial Opening Screen

Shows the opening screen of the Actionable Message tutorial.
Description of "Figure 10-3 Actionable Message Tutorial Opening Screen"

  1. Click the text (Click to Login) in the middle of the screen to log in. The Rival Messenger Login screen appears.

Figure 10-4 Actionable Message Login

Description of Figure 10-4  follows
Description of "Figure 10-4 Actionable Message Login"

  1. Click the text, Rival Signup / Registration, to register for a new account.

  2. Check New Account.

  3. Enter netmindz.net (or the name of your favorite server) as the Jabber Server value.

  4. Enter UserName. In this tutorial, we create a user called asynctester. You should assign a name other than this, if you also use netmindz.net as your server.

  5. Enter a Password.

  6. Click Proceed to create a new account. A new account is created, and you can chat with your Jabber buddy.

Next, you will accomplish Async Configuration.

10.2.3.5.4 Tutorial Steps

This tutorial is accomplished in four parts:

  • Configuring the Messaging driver

  • Adding Async access points

  • Creating the service to be invoked for user reply

  • Testing

10.2.3.5.5 Configuring the Messaging Driver

Async uses the transport layer to provide access to wireless networks. Async supports various channels; in this example Instant Messaging is the transport for this tutorial.

You will first configure the IM driver to be able to communicate with a Jabber client. You will configure the system parameters in different components, depending on the installation you are working on (standalone or integrated). For standalone mode, configure it through OracleAS Wireless Webtool. Enterprise Manager is the tool to use for integrated installation. This tutorial is based on the standalone instance. Here are the steps:

  1. Log in to OracleAS Wireless Webtool (at a URL such as http://<hostname>:7777/webtool).

  2. Enter the user account (orcladmin with the password manager, or whatever password has been set).

  3. Click the link, Site Administration, in the Wireless Server section. The Administration page for site configuration appears.

  4. Under the General Configuration section, click HTTP, HTTPS Configuration.

  5. Provide the proxy settings if the instance resides within an intranet, and is required to use a proxy server to direct traffic to the Internet. Set required values.

  6. Click the + sign in front of Component Configuration to expand the configuration settings for server components.

  7. Select the Drivers link under the Messaging component. The driver page appears, listing supported drivers for the instance.

  8. Select PushDriver and click Edit. The property settings for the PushDriver are displayed.

Because you are creating your own IM driver instance, remove the IM delivery capability from the PushDriver; all the IM traffic will go though the IM driver instance.

  1. Under the Delivery Category section, deselect the IM entry and click OK. You are returned to the Driver list screen.

  2. Click System (or the Wireless link from Enterprise Manager) to go to the Process Configuration Page.

  3. Click Add Process; the Create New Process page appears.

  4. Select Messaging Server as the Process Type, assign a name (for example, messaging_server_tutorial and click Continue.

  5. Set the value (IMTutorialDriverInst) as the Driver Instance Name.

  6. Select IMDriver for the Driver Name and click Go.

  7. Assign 1 to both Sending and Receiving Threads.

  8. Assign netmindz.net as the value for im.server.host.

  9. To avoid user name conflicts for the tutorial, choose a name for im.server.username, which is specific to each tester (for example, <last_name><birthday>). In this walk-through, we will use the name am0101; you should configure using a different name.

  10. Assign a password and click Finish. A new Messaging Server named messaging_server_tutorial is created with an IM driver.

  11. Click Start to start the process. Only one active IM driver should be running in order to have two-way IM work properly.

  12. Bring up your IM client window and add the newly created account (am0101 in this example), to the contact list. For Rival Jabber client, you do this by clicking the + sign to the left of the screen.

Once the account is added as a contact, you will see the contact (am0101), marked as online in your IM client. If this is not the case, it may be due to the following:

  • The contact name being entered into your IM client is not correct.

  • The IM Server is not up. This can be verified by viewing the log file. To do so, click System, and then View Log File at the bottom of the screen.

Messaging Configuration is complete.

10.2.3.5.6 Adding Async Access Point

To configure the Async access point, log in to the Webtool (or Enterprise Manager).

  1. Click Site Administration and then click the + sign in front of Component Configuration to expand the configurable items.

  2. Click Access Point under Async Listener.

  3. Add the IM account you created earlier as an Async access point.

  4. Click Add Access Point to enter the account information.

  5. Assign TutorialActionableMessage as the Name value.

  6. Select IM as the Delivery Type. The format for the address is <network>|<User ID>. Since the account you created is for the Jabber protocol, the network value should be Jabber. The User ID format for Jabber is <User Name>@<Server>. Hence, the value of the Address field should be jabber|am0101@netmindz.net. Note: Your address should be different from this one, and be consistent with the address configured for your Messaging Driver.

  7. Check Dedicated for Async Message Reply.

  8. Uncheck Allowed to Access All Applications and click OK. The new entry appears on the Access Point list.

This completes System Configuration; next is application creation.

10.2.3.5.7 Creating Async-enabled Applications

This phase includes two steps: application creation and content publishing. You will create a Hello application to exercise some important Async parameters. First login to Webtool and click Services tab on top. This leads you to the page shown below.

  1. Log in to the Webtool.

  2. Click Add Folder, and create a folder named Async Tutorial.

  3. Click the Async Tutorial link to navigate to the folder.

  4. Click Create Application.

  5. Click Create.

  6. Assign TutorialExpense as the Name value.

  7. Assign a URL value /mcs/async/modules/revask/ExpenseReply.jsp. ExpenseReply.jsp is a simple JSP file, which outputs a Wireless XML document, listed below.

Example 10-4 Async-enabled sample

<?xml version = "1.0" encoding = "ISO-8859-1"?>
<%@ page contentType="text/vnd.oracle.OracleAS Wireless XML; charset=ISO-8859-1" %>
<%
   String answer = request.getParameter("answer");
   String reportNo = request.getParameter("reportNo");
%>
<SimpleResult>
   <SimpleContainer>
      <SimpleText>
         <SimpleTextItem>Expense Report, #<SimpleStrong><%=reportNo%></SimpleStrong>, has been <%=answer%>.</SimpleTextItem>
      </SimpleText>
   </SimpleContainer>
</SimpleResult>

The JSP file is included in the product, in the directory ORACLE_HOME/wireless/j2ee/applications/mcs/async-web/modules/revask. The listing above is for your reference.

  1. Click Finish to create the application.

    Now you will publish the application.

  2. Click the Content tab to go to Content Manager.

  3. Create a folder named Async Tutorial.

  4. Navigate to the newly created folder.

  5. Click Add Application Link.

  6. Click Master Link.

  7. Click Async Tutorial.

  8. Select TutorialExpense Application and click Next.

  9. Assign TutorialExpense to the Name field.

  10. Assign omp://tutorialexpensereply to the OMP URL field. This is the identification of the Application Link, which should be referenced by the MenuItem of the document being published.

  11. Click Finish.

    Next, you will make the application accessible to public by associating it with the Guest group.

  12. Click the Access Control Content tab.

  13. Select the Guest group and click Assign Application.

  14. Click Async Tutorial under the Available Applications group.

  15. Select TutorialExpense and click Add to Group. TutorialExpense appears in the Group Accessible Applications section.

  16. Click Finish.

Since we also want to restrict the service to be accessible to the access point just configured, we should create an application category to associate this two.

  1. Click Categorize Content.

  2. To create a new category, click Create.

  3. Assign Tutorial Expense as the Name.

  4. Click Add to bind an access point.

  5. Select access point TutorialActionableMessage and click Add; associating the access point with the application category. The access point is associated with the category.

  6. Click Finish to complete the category creation. Now you will bind the application category with an application link.

  7. Click the Publish Content tab on top left.

  8. Click the Async Tutorial folder.

  9. Select the Tutorial Expense Application link, and click Categorize to bind the link to a category.

  10. Select Tutorial Expense Category and click Move to make the association.

  11. Click Apply to complete the action.

10.2.3.5.8 Test Run

Now you will test the application you created. Open a browser and go to http://<host_name>:7777/mcs/async/modules/revask/RequestPushInfo.jsp with <host_name> being the name of the installed OracleAS Wireless host.

  1. Assign jabber|<jabber_account> as the device address value where <jabber_account> is the Jabber account you use as the client device (for example: asynctester@netmindz.net). Important: Be sure to add Jabber as the IM transport in front of the account name (making the full address jabber|asynctester@netmindz.net).

  2. Select IM as the Delivery Type.

  3. Select XML Document.

  4. Paste the document below into the document input box:

    Example 10-5 Test Run Sample

    <SimpleResult>
       <SimpleContainer>
          <SimpleText>
              <SimpleTextItem>Approve/Disapprove John Doe's expense report #1234</SimpleTextItem>
              <SimpleTextItem>Upgrade 256 MB memory on desktop pc - $30<SimpleBreak/></SimpleTextItem>
          </SimpleText>
          <SimpleMenu>
             <SimpleMenuItem target="omp://tutorialexpensereply?answer=approved&amp;reportNo=1234">Approve</SimpleMenuItem>
             <SimpleMenuItem target="omp://tutorialexpensereply?answer=disapproved&amp;reportNo=1234">Disapprove</SimpleMenuItem>
          </SimpleMenu>
       </SimpleContainer>
    </SimpleResult>
    
    

As you see, the MenuItem uses the OMP URL to point to the service to be invoked on user reply. The value is the same as the OMP value you defined for the newly created Application Link (You can also use HTTP protocol if you prefer). In this case the format should be like this:

http://<host_name>:7777/ptg/rm?answer=approved&amp;reportNo=1234&amp;PAompurl=omp%3A%2F%2Ftutorialexpensereply

If you do not want to go through the OracleAS Wireless service for request authorization (that is, the service provider will do the request authorization), you can skip the application/link creation steps, and provide the URL format like the one shown here:

http://<host_name>:7777/mcs/async/modules/revask/ExpenseReply.jsp&amp;answer=approved&amp;reportNo=1234

There is no value in above URL to indicate the service to invoke. The invocation goes through a public proxy service seeded in OracleAS Wireless installation.

  1. Click Push Message to send out the document. A text message is displayed indicating a message has been sent, and a message will be received by your IM client.

  2. To reply to the message, follow the instruction on the first line of the message. For the example above, it requires the format 3 [params] where 3 is transaction ID, and params may have the values of 1 (approve) or 2 (disapprove).

  3. Reply with the value 3 1 to approve the expense report.

Service is sent back to confirm the approval of the expense report. This step completes the walkthrough of the actionable message example.

10.3 Building Async Applications

This section describes how to build Async applications.

10.3.1 Asynchronous Listener

This section describes the Asynchronous Listener.

10.3.1.1 Asynchronous Listener Architecture

OracleAS Wireless presents a framework and a runtime environment for developing wireless and voice applications accessed through a browser-based device, such as a device with a WAP or XHTML browser, or through messaging-protocol-based devices such as mobile phones with SMS. Async is the Wireless component that enables the messaging protocol-based devices to access these wireless applications.

Conventionally, the entry point into an application server is through the HTTP protocol. This limits applications built on an application server to only clients with Web capability. This server restriction is a problem for mobile market users, because the vast majority of mobile users does not have, or are not enabled, with Web access. These users, however, are almost certain to have some kind of message capabilities (such as e-mail or SMS). Consequently, developers are faced with the dilemma of building applications specifically for users depending on their capability, or ignoring them because the application server cannot deal with the mobile market.

OracleAS Wireless solves this dilemma for developers without them having to do anything at all. With the introduction of Async, applications cannot only be accessed through the usual HTTP protocol, but through any other messaging protocol (such as e-mail or SMS) as well. Rather than worry about writing an application to fit a certain protocol, developers can instead focus on building their application logic. OracleAS Wireless establishes the proper connection and performs session management, and the interpretation of user requests. An application is invoked the same way regardless of which protocol handles the incoming requests, offering complete transparency to application developers to allow access to their services.

10.3.2 Key Challenges

This section details some of the most important challenges addressed by Asynchronous applications.

10.3.2.1 Multiple messaging transport protocol support

One of the most obvious challenges is supporting multiple protocols. It is not desirable to build the same functionality to work with e-mail, then SMS, then some other protocols. OracleAS Wireless offers access to the same application regardless of the protocol used by clients. Hence the immediate challenge is to be able to support multiple protocols uniformly.

10.3.2.2 The asynchronous nature of messaging protocols

In contrast to the HTTP protocol, (commonly referred to as the synchronous protocol) messaging protocols such as SMS or e-mail are asynchronous. It is asynchronous because unlike HTTP, they are not based on a "request and response" model. A single atomic operation is typically one way. For example, when you use a Web browser, you enter a URL and make the request, then you wait for the result to come back. In messaging protocols (such as SMS) sending a message itself completes one operation. Most applications respond to user requests so HTTP is usually adequate. To enable the same application be accessed through asynchronous protocols presents a challenge on how such behavior can be mimicked with protocols such as SMS or e-mail.

10.3.2.3 Supporting Sessions

Another big challenge is that most applications are session based; multiple requests and responses are typically required to complete a task. Applications are able to maintain sessions in the Web world because the client, a Web browser, has built in capabilities such as cookies to facilitate session semantics. This is not the case for an e-mail or SMS client. They do not have any such ability built in to support conversational applications.

10.3.2.4 User Navigation

A Web browser offers a User Interface for navigating through applications (examples include clicking on a hyper link and traversing through a menu or a series of steps to complete certain functionality). Clients that work with other protocols such as SMS or e-mail typically do not have similar navigation power. The challenge here is to offer similar navigating capability to such clients so that applications can be independent of the protocols.

10.3.2.5 Naming/Addressing an Application

In the Web world, applications are typically assigned a URL. The URL is how the application can be identified and requested. Clients for messaging are typically plain text devices; although there is no convention on how to name an application, consistency across protocols is needed.

10.3.3 Key Solutions

Async combines functionality of a HTTP server and portions of a Web browser to provide its functionality.

10.3.3.1 Multiple Transport Protocol Support

This challenge is a relatively easy one. Built on top of the OracleAS Wireless transport system, support for multiple transport protocols is achieved by the nature of the transport system itself. Async registers as an application to the transport system to send and receive messages. It further registers one or more addresses for each of the protocols it is serving in order to interact with users on those protocols. For example, it can register async@yourcomany.com for e-mail and 1234567 for SMS. Then async@yourcompany.com and 1234567 become the URIs for their respective protocols similar to http://yourcompany.com in the Web world.

Async itself does not consider the incoming protocols; it is designed to send and receive messages by the means that it is registered to use. The payload (content) of the messages are what Async interprets and acts upon.

10.3.3.2 The asynchronous nature of messaging protocols

Async builds logic similar to an HTTP listener to present synchronous semantics over asynchronous protocols. It achieves this by acting as a client to the application that the device requested. Async makes a request to the application on behalf of the user, waits and processes the response from the application, then formats the response and presents it back to the users. To users, it appears as if it is the response from an earlier request.

10.3.3.3 Supporting Sessions

Upon receiving requests from a user, Async creates a session for the user to enable conversational applications to function. Unlike in HTTP, where session information is kept by the browser (or cookie), all session states are kept in the backend by Async.

10.3.3.4 User Navigation

Async transforms elements such as forms or menus, and presents a navigation command for end users. When elements such as forms are returned by an application, Async retains the format of the form in the backend, and determines what action to take when the form is submitted with all of the other necessary information. When this user (using the set of Async-specified commands) completes and submits the command, Async makes a request (based on the current user information stored in Async) and processes the result again on behalf of the user. This is akin to hyperlinks stored in the backend when a user clicks on the face of the link.

10.3.3.5 Naming/Addressing an Application

Just as in assigning a URL to an application in the Web world, using Async requires that a short name be assigned to an application so that it can be Async-enabled. For example, assume the stock quote application has been assigned the path: /finance/quote and can be accessed as http://mycompany.com/finance/stock. Through the Content Manager, one or more short names can be assigned to the application (for example, st.). Now any messages received by Async that begin with st signals a request for the stock quote application. A user can send st orcl (orcl is the stock ticker symbol for Oracle Corporation) to an Async access point to which Async is configured to listen, such as async@mycompany.com for e-mail or 1234567 for SMS, and get back the stock quote for Oracle Corporation.

Optionally, service access points can be created to identify an Async application. Through Content Manager, you can also associate an e-mail access point (stock@mycompany.com) and an SMS access point (123FINANCE) to the stock quote application. Once this is done, sending just orcl as an e-mail to stock@mycompany.com or as SMS message to 123FINANCE results in receiving the stock quote of Oracle Corporation.

10.3.4 Async Request Authorization

Async differentiates the user issuing a request into two categories: guest or registered. Upon receipt of a user request by Async, the source address of the request message is used to reverse-lookup an OracleAS Wireless user for authentication. A user object can be located if a user has a device address registered under his or her profile. This address is the same as the source address of the request message. The located user object is then bound to a newly authenticated session created by the request. Otherwise, a guest user object is bound to the session. Any applications which are authorized to the user are accessible to requests issued from the device.

Only those applications belonging to the guest group are accessible to a guest user. Accessing a non-guest application triggers a returned form challenging the user for name and password. A valid OracleAS Wireless username/password supplied by the user enables the previous session to be upgraded to an authenticated one with the user object identified by the name to be bound. Alternately, a guest user can log in explicitly through a login command, !L (followed by a user name and password) to avoid being challenged.

10.3.5 User Interface and Navigation Commands

As discussed earlier, messaging clients typically only present plain text and do not offer conversational navigation capabilities. Async transforms and formats responses from applications to a certain presentation to enable such capabilities. Async includes a set of presentation formats and navigational commands similar to what a Web browser has done for the Web world. Hence when a user invokes applications using Async, he or she sees the response in the format transformed by Async. Further interactions with Async would have to comply with the format expected by Async.

This section discusses the commands that users can issue to Async. Issuing a command is simply sending a message with the correct format. The command text can be put into a subject line or message body.

System Commands

  • !H: (Help command) provides general help on the command usage

  • !E: (Escape command) clears current form state.

  • !S: marks the end of command sequence. A message may contain a sequence of commands, each separated by a line feed or command delimiter.!S marks the end of a command sequence. No interpretation will be done on text past the !S mark.

  • help: the application level help. If no parameter is provided, the all of the Async application help displays. Users can also provide an application short name as the parameters to acquire the help on a particular Async-enabled application.

  • !L <username> <password>- to sign on to the system with the user name and password.

  • !O - to terminate a session.

Application Invocation Commands

These commands invoke an application, perform menu selection and fill parameters. There are no reserved command symbols for the application invocation and form commands. Certain commands, such as form command and menu item selection, can be invoked only when there is a current form/menu state maintained in the user's session. More details on form/menu state will be discussed later in this chapter.

  • [<shortname>|<menuitem>] <parm1><parm2> . . . to invoke an application. The first field provided could be a application short name or a menu item number. A menu item can be provided only when the user previously received a menu message from an application result. The menu state is maintained in the user session of Async. A user can make a selection based on the menu to trigger further actions. More detail on current menu state is explained later in this chapter.

  • <parm1><parm2> . . . to fill the parameter of a form. When a user invokes an application without providing a required parameter, a form may be returned requesting the user to fill in the parameter values. This creates a current form state in the user session, which expects the user to send the parameter sequences in the subsequent command. The parameter values should be supplied on the command line in the same sequence as the parameters listed on the previously returned form.

10.3.6 Configuration and Customization

This section describes how to configure and customize Asynchronous applications.

10.3.6.1 System Configuration Parameters

A list of site and application configuration parameters, listed in Table 10-2, enable the system administrator or application developer to customize Async site- and application- level behavior through the Oracle Enterprise Manager (OEM) console and the OracleAS Wireless Tools. For more information, see Section 4.3.5.4 in Chapter 4.

Table 10-2 Service Configuration Parameters

Name Default Semantics

Async Command Line Syntax


Help message sent to users to describe the application, and how to use it.

Delimiter

' ' (blank space)

The delimiter separating each parameter value. For example, a horoscope service with the short name ho, and the delimiter ',' (comma). A user would supply the command ho gemini, aries to get the horoscope result for both Gemini and Aries.

Silent Flag

False

Select this flag for applications that should not send the response message back to the device. This is a static way to mark an application as silent. Another option to dynamically disable the application result is to set a flag in the result document with a meta element having the name attribute of 'ASYNC_NO_RESPONSE' and content attribute of 'true'. An example of silent meta element for OracleAS Wireless XML is <SimpleMeta name="ASYNC_NO_RESPONSE" content="true" />

Variable Argument Support

False

This flag is useful when a user request may contain more parameter values than the corresponding Async application parameter. All of the additional values will be appended as the value to the last parameter.

Sessionless

False

This flag can be optionally selected for applications which do not provide conversational user interaction. Such applications always return the final result on application invocation, meaning that the result document does not contain any hyper link or form control. The session will not be maintained for the device which requests to access such an application, therefore introducing some resource saving.


Table 10-3 lists the Site Configuration parameters.

Table 10-3 Site Configuration Parameters

Name Default Semantics

Init Thread Count

25

The number of working threads at the time Async Server starts up.

Max Thread Count

50

The maximum number of working threads for the Async Server.

Thread Increment

1

The number of threads to be added each time no idle working threads are available to serve requests.When the maximum number of threads is reached, there will not be any thread increment.

Log Debug Message

off

Debug Logging enables administrators to turn on verbose mode for logging.

Filtered Subject Line Prefix

re:,fw:, [fwd:, fwd:

Specify a list of prefixes in the e-mail subject line to indicated that the message subject lines which start with these prefixes should be ignored and not be interpreted as user commands. For example, specify the prefixes Re and Fwd.

System help command

!H

Provides general help on command usage.

Escape command

!E

Clears current form state.

Stop command

!S

Marks the end of a command sequence.

Apps help

Help

Provides service-level help.

Login command

!L

Enables user to sign on to the system with the user name and password.

Logoff command

!O

To sign off a user session.

Command Line Delimiter

;

Command separator for a request with multiple commands.

Command Prefix

.

A symbol indicating that the text immediately after the symbol is an Async short name instead of a parameter value. This is useful when a user wants to escape out of a form state without having to use 'Escape command'. For example, the command .stk orcl with the period (.) as the command prefix.

Help Header

Usage -

The header of the applications help result.

Help Footer


The footer of the applications help result.

Short Name for Default Application


This is a default application to be run when a device user issues a request to services that do not exist.


10.3.6.2 User Customization Parameter

Through the Wireless Customization Portal, users create their own aliases as the short names to invoke Async applications. A user short name can be an alias that points to an application, or it could be an alias representing a sequence of Async short names.

For example, a user may define an alias (s) to represent the string, stk, which is the short name for a stock application. When the user issues an Async message with content, s orcl, to invoke the stock application, they receive a stock quote for Oracle Corporation (orcl is the stock ticker symbol for Oracle Corporation). A string (tw), can be created as the alias for a string value, traffic ny;weather ny, so two applications, traffic and weather, can be invoked by inputting two characters.

10.3.7 Application Invocation Examples

This section provides examples on how to invoke applications.

10.3.7.1 Invoking the Application by the Application Short Name

All Async-enabled applications should be assigned short names to enable end user access. The short name should uniquely identify an application on the entire site. To invoke an application, a message is sent to a site access point, such as info@oraclemobile.com, to which the Async Listener is configured to listen. The command line has the format:

<Svc Short Name> <parm1> <parm2> . . . 

In the following example, a message is sent to the site access point: info@oraclemobile.com, to invoke a stock quote application with the short name, st. The application requires a stock symbol as its parameter (for this example, it is ORCL).

Figure 10-5 Invoking by Service Short Name

Description of Figure 10-5  follows
Description of "Figure 10-5 Invoking by Service Short Name"

10.3.7.2 Invocation through Application-Associated Access Point

Each application may have application access points associated with it. For example, an E-mail address, stock@oraclemobile.com, can be used to identify a stock application. Since the application has been identified in the destination address of the request message, there is no need to specify the application short name in the command line. Only the application parameters, such as the stock symbol, are required in the command line.

All of the system commands (for example, help) can still be issued to the application-associated access point. The Async Listener interprets them in the same way they are sent to the site access point.

Figure 10-6 Invoking by Service-Associated Access Point

Description of Figure 10-6  follows
Description of "Figure 10-6 Invoking by Service-Associated Access Point"

10.3.7.3 Menu Capability

Features are presented similar to the HTTP model. An application invocation may trigger the return of a message with the menu. Each menu item is prefixed with a number. Users are able to make selections by issuing another message whose content contains the menu item number. This extends the application capability and enables improved user interaction. A yellow pages application having a short name of yp expects two user parameters: category and area. Users invoke applications by providing the values, for example, burger and home (a landmark for the user). The application searches for all the hamburger restaurants in the home area. A returned message from the application result contains a name list of burger restaurants. The user then issues another message to get detailed information on selected restaurants.

Figure 10-7 Menu Capability

Description of Figure 10-7  follows
Description of "Figure 10-7 Menu Capability"

10.3.7.4 Form Capability

A form is the result of a application invocation requesting user input. The ideal user interaction for Async is when the user enters the input parameters on the command line instead of having to fill in the form, which requires more message round trips.

Figure 10-8, "Form Capability" demonstrates the possible interaction of a phone book application. The phonedit command, which enables users to search and edit the phone number for a particular user, expects a name as its parameter. (For the following example, jdoe is this parameter) The information of jdoe is returned with a menu, enabling the device user to edit the phone number or remove the user. There are two options for editing the phone number:

  • Make a selection without entering any parameter—this is represented in box 2a. A form is returned prompting the user to enter the new phone number. The device user creates a new message with the message body containing the new phone number.

    Or

  • Enter the selection with the required parameters. Box 2b demonstrates the scenario. The device user is aware that a form should be returned in response to their selection 1 (Change phone). Therefore, the parameter value (phone number) is supplied together with the selection. This saves a message round trip.

Figure 10-8 Form Capability

Description of Figure 10-8  follows
Description of "Figure 10-8 Form Capability"

10.3.7.5 Form Field with Select Options

A form may present fields, which allow users to make either single or multiple selections, similar to the check box or pull-down menu construct for HTML. To simplify selection for the device user, each selection option is prefixed with a number. The user fills in those fields by responding with the number prefix for the items he or she chooses. The field which allows multiple selections is presented with a input marker, [..]. This differentiates this field from a single selection field, which is represented by the single selection marker, []. The values for the user responses should be surrounded with quotation mark if multiple selections are made.

The following figure demonstrates the Select Form fields: Gender, a single selection field and Sports, a multiple selection field.

Figure 10-9 Form Field with Select Options

Description of Figure 10-9  follows
Description of "Figure 10-9 Form Field with Select Options"

10.3.7.6 Current Menu State

Menu navigation is possible since a session is maintained for each user. The term current menu identifies the latest menu that a user received from Async. The state of the current menu is kept in the user session on Async.

A user's menu selection always applies to the current menu. If a menu has not yet been received for the user, then Async attempts to locate an application whose short name is the same as the number provided by the user. An error is returned when no such application is found.

An application invocation through short name or access point automatically cancels the menu state created by the previous application invocation. As illustrated in Figure 10-10, a menu returns as a response to invoking the phonedit application. A message for requesting the stk service is subsequently issued. It clears the menu state created by the invocation of the phonedit application. An attempt to make a menu selection triggers an error message from Async.

Figure 10-10 Current Menu State

Description of Figure 10-10  follows
Description of "Figure 10-10 Current Menu State"

10.3.7.7 Current Form State

A current form state is created in the user session whenever the user receives a form message. Form parameter values can be supplied by subsequent user requests to fill the parameter requested from the previous form message. If the user decides not to fill the form but instead to invoke another application, then the Escape command can be issued to cancel the current form state. Once the form state is clear, any form parameter values issued by the user are considered invalid. An error message should be returned in response to a form parameter value without a current form state. Alternatively, a user can issue a command prefix with a short name as a shortcut to clear the form state followed by the invocation of the service identified by the short name.

Figure 10-11, "Current Form State" illustrates a form state example. The device user invokes the phonedit application without providing any parameters. A form message is returned to the user expecting the user to fill in the search name. If the device user decides to invoke another application (for example stk), the first step is to clear the form state so that Async will not treat the command stk as the name value expected from the phonedit application. Then, a new stk command can be issued. These two steps are combined into one message by separating the two commands with the default command separator (;).

The short name, stk, when issued with the command prefix, such as a period ( . ), clears out the form state with fewer keystrokes.

Figure 10-11 Current Form State

Description of Figure 10-11  follows
Description of "Figure 10-11 Current Form State"

10.3.7.8 Multiple Commands in One Message

Multiple commands can be issued from one message. They can be issued from the same line, each command separated by the configurable command separator (default [;]). Or, commands can be on different lines. The first blank line or stop command (!s) encountered marks the end of the command sequence. No command interpretation will be done on text after the mark.

Figure 10-12 Multiple Commands in One Message

Description of Figure 10-12  follows
Description of "Figure 10-12 Multiple Commands in One Message"

10.3.7.9 Parameter Separator

Async applications can require multiple parameters. The default parameter separator is a blank space. If a parameter value contains space within it, then it can be enclosed by double quotes to represent a single parameter value. The parameter separator is configurable at the application level.

Figure 10-13 illustrates an application that provides directions. This application expects both the from and to (destination) addresses. The from address is provided with double quotes to enclose the whole value. The to is supplied as a landmark, home, from the user profile. The second message sent from the user is to request traffic information application. The application is configured to use a comma (,) as the parameter delimiter; users provide the parameter values with (,) to separate them.

Figure 10-13 Parameter Separator

Description of Figure 10-13  follows
Description of "Figure 10-13 Parameter Separator"

10.3.8 Writing Async Applications

Async applications are developed in the same manner as browser-based applications. An application provider receives user parameters from the device through the HTTP protocol, and responds with the result in OracleAS Wireless XML, XHTML/XForms, or XHTML/MP formats. The requirement on the Async client is low; only the ability to send and receive text messages is needed. Because of this, Async does not support all tags. For details on those Async-specific interpretations of the supported tags, and the ways to author documents for this channel, see Chapter 7, "Authoring Mobile Browser and Voice Applications". See also: Chapter 8, "OracleAS Wireless Developer Kit".

Developers may, at times, need to acquire the device information of a service request for accounting or logging purposes. This information can be located through the HTTP header (if the service is created based on an HTTP adapter). The two relevant user device headers are:

  • x-oracle-user.deviceaddress

  • x-oracle-user.deviceaddresstype

10.4 XMS Message Center (XMSC)

The XMS component includes the MMS Center (MMSC) functionality out-of-the-box, supporting the MM1 message notification protocol. If the recipient device has an MMS browser, a notification message is sent to the browser, and the message is retrieved using HTTP. The content is stored and served out by OracleAS Wireless. To support MMS, the only external component needed is a regular SMSC for transmitting the notification message.

When the MMS browser receives the notification message, it contacts the XMSC using HTTP, as per the MM1 spec. The message is served out in encoded MMS format.

XMSC also supports MO (Mobile Originated) messages to another phone. In that case, the message will be stored in the XMSC and a notification message is sent to the target device as above.

XMSC also supports message storage and notification for other messaging channels. For example, if a user has a device that only has MMS capability. If a message is sent that contains multimedia content, XMS will send a text-only SMS message containing a URL, which the user can input into a regular Web browser in order to view the message.

10.4.1 Configuring the XMSC

In order to use the XMSC functionality, complete the following steps.

10.4.1.1 Server-Side

  • An SMS driver must be set up. See Section 10.6, "Transport Component" for information on how to set up drivers in general. This section also describes the details of configuring the drivers bundled with OracleAS Wireless.

  • Set up the site hostname and port (if not already configured):

    Go to System > Wireless Server > Site Administration > HTTP, HTTPS Configuration.

    Under the URL Section, add the host name and port.

  • If necessary, enable the XMSC (enabled by default):

    Go to System > Wireless Server > Site Administration, and expand Component Configuration. Click XMS Configuration.

    Under the XMS Center Section, mark the Enable XMSC check box.

10.4.1.2 Client (Handset) Side

For Mobile Terminated (MT) messages (messages sent to a device), the above configuration is sufficient. As XMSC is a full MMSC, it also supports MO (Mobile Originated) messages, that is, messages sent from one phone to another using OracleAS Wireless as the intermediary. In this case the phone must be configured as follows:

The MMS browser must be configured to use the OracleAS Wireless instance as the outgoing message server. The exact steps to follow depend on the specific phone. The following are the steps to follow for the Sony Ericsson T68i:

  1. Select Messages

  2. Select MMS (2)

  3. Select Options (5)

  4. Select Message Server (6)

  5. Enter the URL of the MM1 listener servlet. This will be of the form:

    http://<hostname>:<port>/xms/mm1
    
    

    Note:

    You must be able to connect to the hostname from the phone using the dial-up or WAP settings provided in the phone.

10.5 Device Channel Selection

When the recipient is specified as a user name, the XMS runtime will determine what device and channel to use, depending on the user's available devices, as well as the user's current contact rules.

10.5.1 Automatic Device Selection

If the user has a number of different devices, the XMS runtime will select the best device and channel to use. The channel chosen will depend upon the user preference order as well as the content of the message. For example, imagine a user that has a cell phone with both SMS and MMS messaging capability. If a plain text message is sent to the user, the SMS channel will be chosen, as it is sufficient for that message, and since sending messages over SMS is usually cheaper and faster than through MMS. On the other hand, if the message has multimedia content, XMS will try to send the message through MMS.

10.5.2 Presence Integration

In OracleAS Wireless, each user can have a Presence setting, which specifies the user's location and associated contact rule.The contact rule states the user's preferred delivery channel at that point in time. For more information about Contact Rules, see Chapter 16, "Enabling User Customization".

If a user has set a contact rule, that rule will be given preference over the automatic channel selection outlined above. Additionally, a contact rule may specify blackout periods where the user does not wish to receive messages. If the blackout period is set in the contact rule, XMS will delay delivery of the message until after the blackout period.

10.6 Transport Component

The Transport Layer is the foundation of the OracleAS Wireless messaging system. It contains the Transport API, Transport Server and Driver API. This section discusses the prebuilt transport drivers, how to develop new drivers and how to extend the Transport Server.

The current Transport API is compatible with previous releases (new features created in this release are not, of course, available if you are using previous versions); the current, enhanced Driver API is incompatible with previous releases. However, all the prebuilt drivers for previous releases are enhanced accordingly in this release. Previous releases of the prebuilt driver cannot be used with this release of the Transport Server; only use current prebuilt drivers. In addition to interface enhancements, the prebuilt drivers include many new features.

Your own custom-built drivers from previous releases can be upgraded to work with the current Transport Server, provided the driver implements the new driver interface. The driver logic is not significantly changed; the change are confined mainly to the interface.

10.6.1 Prebuilt Drivers

This section describes messaging applications.

10.6.1.1 Nokia MMS Driver

This driver provides the ability to send and receive MMS messages to and from a Nokia MMSC (Multimedia Messaging Service Center). It requires the Nokia MMS Java Library v1.1. The driver opens two TCP connections to the MMSC, one connection for sending and the other for receiving messages.

10.6.1.1.1 Required Third-Party Software

This driver requires the Nokia MMS Java Library v1.1 (MMSLibrary.jar) that is available from Forum Nokia (http://www.forum.nokia.com). You must add this library to the CLASSPATH in ORACLE_HOME/opmn/conf/opmn.xml (UNIX) or ORACLE_HOME\opmn\conf\opmn.xml (Windows).

10.6.1.1.2 Class Name

oracle.panama.messaging.transport.driver.mms.NokiaMMSDriver

10.6.1.1.3 Configuration

mms.nokia.account.id—The Nokia Account ID or Phone Number. This is required.

mms.nokia.mmsc.url—The Nokia MMSC URL. This is required.

mms.nokia.debug—Enable logging extra debug information to a file. Options: true (debug enabled), false OR leave blank (debug disabled).

mms.nokia.log.filename—Log filename for extra debug information. The default filename is NokiaMMSDriver.log.

mms.nokia.receive.host—The logical local hostname or IP address. If not present, it is derived from the local host.

mms.nokia.receive.port—Port for receiving MMS messages from MMSC. The default is 7000.

mms.nokia.receive.mode.async—Set Asynchronous Mode for receiving MMS messages from MMSC. Options: true (enable), false OR leave blank (disable). For further information about asynchronous mode, see the documentation that came with the Nokia MMS Java Library v1.1.

10.6.1.2 CMG MMS Driver

This driver provides the ability to send and receive MMS messages to and from a CMG MMSC (Multimedia Messaging Service Center). The driver has been updated to work with the CMG MMSC API for VAS v1.1.1 library. Since the earlier versions are no longer available from CMG and v1.1.1 is not backward compatible with any earlier versions, you must upgrade to this version.

10.6.1.2.1 Required Third-Party Software

This driver requires the CMG MMSC API for VAS v1.1.1 (mmscapi.jar and mmscapi.war), available from CMG (http://www.cmgwds.com). You must add the mmscapi.jar library to the CLASSPATH in ORACLE_HOME/opmn/conf/opmn.xml (in UNIX) or ORACLE_HOME\opmn\conf\opmn.xml (in Windows).

10.6.1.2.2 Class Name

oracle.panama.messaging.transport.driver.mms.CMGMMSDriver

10.6.1.2.3 Configuration
  • mms.cmg.account.id—The MSISDN of the VAS application, or the short identification number as registered with the CMG MMSC. This is required.

  • mms.cmg.account.alias—The application alias configured in the CMG U-power web interface. This is required.

  • mms.cmg.account.password—The password to authenticate the VAS application as registered with the CMG MMSC. This is required.

  • mms.cmg.config.file—The path to the core configuration file for the CMG MMSC API. This is required. For details regarding the contents of this file, refer to the User Manual that is packaged with the CMG MMSC API distribution. A sample configuration file is included: (ORACLE_HOME\wireless\messaging\drivers\cmg\CMGMMSDriver.cfg) with this driver.

  • mms.cmg.debug—Enable logging extra debug information to the file. Options: true (debug enabled), false, or leave blank (debug disabled).

  • mms.cmg.billing.category—MMSC Billing Category (optional). This value is used to send custom billing category information to the MMSC. For details and examples of the billing category, refer to the User Manual that is packaged with the CMG MMSC API distribution.

  • mms.cmg.billing.price—MMSC Billing Price Value (optional). This value is used to send custom billing price information to the MMSC. For details and examples of the billing price, refer to the User Manual that is packaged with the CMG MMSC API distribution.

10.6.1.2.4 Additional Configuration

To configure the driver to receive MMS messages, you must perform these steps:

  1. Package the mmscapi.war file into a cmgmmsc.ear file as follows:

    1. Unzip ORACLE_HOME\wireless\messaging\drivers\cmg\cmgmmsc.ear.zip into an empty directory. This creates the following directory structure: \META-INF\application.xml, \META-INF\MANIFEST.MF

    2. Copy mmscapi.war into this directory and rename this file to cmgmmsc.war. This creates the final directory structure: \META-INF\application.xml, \META-INF\MANIFEST.MF, \cmgmmsc.war

    3. Zip this directory structure and rename the zip file to cmgmmsc.ear.

    4. Copy cmgmmsc.ear to ORACLE_HOME\wireless\j2ee\applications\

  2. In ORACLE_HOME\wireless\j2ee\config\wireless-web-site.xml, add: <web-app application="cmgmmsc" name="cmgmmsc" root=/"cmgmmsc" load-on-startup="true"/>

  3. In ORACLE_HOME\wireless\j2ee\config\wireless-server.xml, add: <application name="cmgmmsc" path="../applications/cmgmmsc.ear" auto-start="true" />

  4. Start the OracleAS Wireless instance, which will auto-deploy the cmgmmsc.ear file.

  5. After the auto-deploying is complete, in ORACLE_HOME\wireless\j2ee\applications\cmgmmsc\cmgmmsc\WEB-INF\web.xml:

    • Edit the trace directory and filename.

    • Add the following section: <servlet-mapping> <servlet-name> HttpReceive </servlet-name> <url-pattern> /HR </url-pattern></servlet-mapping>

  6. Back up (rename the file's extension to anything except .jar) ORACLE_HOME\wireless\lib\log4j-core.jar and ORACLE_HOME\wireless\lib\log4j.jar. Copy ORACLE_HOME\wireless\j2ee\applications\cmgmmsc\cmgmmsc\WEB-INF\lib\log4j-1.2.5.jar to ORACLE_HOME\wireless\lib\log4j-core.jar.

  7. Restart the OracleAS Wireless instance.

    The servlet HttpReceive runs within the OracleAS Wireless instance, and requires RMI to communicate with the CMGMMSDriver. Further details are provided in the User Manual that is packaged with the CMG MMSC API distribution.

10.6.1.3 MM7 Driver

This driver provides the ability to send and receive MMS messages to and from a MMSC (Multimedia Messaging Service Center) using the MM7 protocol based on the specification of 3GPP TS 23.140 V5.5.0. It also supports delivery reports and read reply reports.

10.6.1.3.1 Class Name

oracle.panama.messaging.transport.driver.mms.MM7Driver

10.6.1.3.2 Configuration

mms.mm7.url—The URL to access the MMSC/MM7. This is required.

mms.local.hostname—The logical local hostname or IP address. If not present, it is derived from the local host.

mms.local.port—The local listening port. The default value is 80.

mms.default.encoding—The default MM7/HTTP encoding format. The default encoding is UTF-8.

debug—Enable logging extra debug information to a file. Options: true (debug enabled), false OR leave blank (debug disabled).

mms.http.user—(Optional) Username for HTTP authentication.

mms.vaspid—(Optional) Password for HTTP authentication.

mms.vaspid—(Optional) Identifier of this application (VASP) for the MMSC.

mms.vasid—(Optional) Identifier of the originating application. Example: News.

10.6.1.4 CIMD Driver

CIMD (Computer Interface to Message Distribution) is an SMS protocol specified by Nokia. The OracleAS Wireless Server product includes a prebuilt implementation of the CIMD driver that is capable of both sending and receiving messages. The driver opens one TCP/IP connection to the SMSC, for sending and receiving messages. This driver can handle sending of text and binary messages (such as vCard, vCalendar.). The driver can receive only text messages.

10.6.1.4.1 Class Name

oracle.panama.messaging.transport.driver.sms.CIMDDriver
10.6.1.4.2 Configuration

The following parameters must be specified while creating the Driver:

  • sms.account.id

    This is the account ID for the SMSC. Generally, it is the short number assigned by the operator. This is required.

  • sms.cimd.system.userid and sms.cimd.system.password

    Along with the short number, the operator provides a User ID and password for you to login to the SMSC. These are required.

  • sms.server.host and sms.server.port

    This information is used by the driver to open a TCP/IP connection to the SMSC.

  • sms.message.maxchunks

    This is the maximum number of chunks allowed for any single message. Chunks after this number are ignored. The default is -1. A negative value means there is no limitation.

  • sms.message.chunksize

    This is the maximum size for each chunk, in bytes. The default is 140.

  • sms.server.default.encoding

    Specify the encoding scheme for text messages. The default is IA-5.

  • sms.window.size

    Specify the window size. If windowing is not supported then set window size = 1.

  • sms.send.alive.packet.interval

    The time interval (in milliseconds) after which alive packet should be sent. Negative value means no alive packets will be sent. This parameter is required to keep the connection to the SMSC alive, because normally the user will be logged out automatically from the SMSC after a specified time interval. Specify a value which is less than that interval.

10.6.1.5 VVSP Driver

This driver provides the ability to send and retrieve SMS and MMS messages to and from the Via Vodafone Services Platform (VVSP). In order to use this driver, you must register it as an application with Vodafone Mobile Office. For details on how to register an application and obtain the necessary credentials to run this driver, contact Vodafone Mobile Office at http://www.mobileoffice.vodafone.com.

10.6.1.5.1 Class Name

oracle.panama.messaging.transport.driver.vvsp.VVSPDriver 

10.6.1.5.2 Configuration

vvsp.sms.address—Comma-separated list of the SMS network IDs (MSISDN or short code).

For example: 8205, 8206

vvsp.sms.country—Corresponding comma-separated list of 2-letter country codes that the SMS network IDs above are registered for with the VVSP. ISO 3166-1-alpha-2 code element conventions apply.

For example: uk, de.

vvsp.sms.url—The URL to the VVSP SMS gateway. The default value is https://vvsp.vodafone.net/gns/sms.

vvsp.sms.id—The SMS Application Instance ID registered with VVSP.

vvsp.sms.password—The SMS Application Instance Password.

vvsp.sms.onetimepassword—The SMS one-time password for password renewal. Use this field only if you are in the testing phase with VVSP, and want to use a fixed OTP. For example, 69696969.

vvsp.mms.address—Comma-separated list of the MMS network IDs (MSISDN or short code).

For example: 8005, 8006

vvsp.mms.country—Corresponding comma-separated list of 2-letter country codes that the MMS network IDs above are registered for with the VVSP. ISO 3166-1-alpha-2 code element conventions apply.

For example: uk, de.

vvsp.mms.url—The URL to the VVSP MMS gateway. The default value is https://vvsp.vodafone.net/gns/mms.

vvsp.mms.id—The MMS Application Instance ID registered with the VVSP.

vvsp.mms.password—The MMS Application Instance Password.

vvsp.mms.onetimepassword—The MMS one-time password for password renewal. Use this field only if you are in the testing phase with VVSP, and want to use a fixed OTP. For example, 69696969.

vvsp.admin.url—The URL to the VVSP Administration gateway. The default value is https://vvsp.vodafone.net/gns/admin.

vvsp.admin.log—The log file to store new passwords issued by the Administration gateway. The default value is VVSPAdmin.log.

vvsp.admin.url—The URL to the VVSP Administration gateway.

vvsp.local.hostname—The logical local hostname/IP to bind to, for receiving notifications from the VVSP. If not present, it is derived from the local host. The complete URL used to receive notifications will be http://vvsp.local.hostname:vvsp.local.port/ (this is an example; not meant to be an actual link).

vvsp.local.port—The local listening port. The default value is 80.

vvsp.ssl.trustStore—The path to the SSL trustStore file (in jks format). If left blank, the built-in VVSP-provided certificate file is automatically loaded. In most cases, you will not need to modify this parameter.

vvsp.ssl.trustPassword—The pass phrase of the trustStore file. Leave blank if none (default).

vvsp.ssl.keyStore—The complete path to the SSL keyStore file (in pkcs12 format). You must provide this path if you have an SSL class 3 client certificate from VVSP.

vvsp.ssl.keyPassword—The pass phrase of the keyStore file. Leave blank if none.

vvsp.default.encoding—The default HTTP encoding format. The default value is UTF-8.

vvsp.sms.maxchunks—The maximum chunks for an SMS message if it exceeds the maximum SMS length. (Note that the per chunk maximum length is 160 chars for text SMS, and 140 chars for binary SMS.). Enter -1 for unlimited chunks. The default value is -1.

vvsp.retrieve.flush.freq—Frequency (in seconds) of periodic polling to retrieve and flush any unretrieved messages waiting at the VVSP due to missed or lost notifications. Enter 0 to disable polling. The default value is 600 seconds.

vvsp.debug—Enable logging extra debug information. Options: true (debug enabled), false OR leave blank (debug disabled).

10.6.1.5.3 Additional Configuration—Password Renewal

If you do not have an SSL class 3 client certificate from the VVSP, your application instance password will be periodically expired by the platform. When the password expires, the VVSP will send an SMS containing a one-time password (OTP) to the registered application operator's handset. The application operator must enter this OTP so that the VVSPDriver can complete the password renewal procedure and receive the new application instance password from the VVSP. A utility has been provided to allow the operator to enter the OTP. It can be found on OTN at http://www.oracle.com/technology/tech/wireless/integration/. You can download and install it on your OracleAS Wireless instance using the instructions provided. Once installed on your instance, the utility can be accessed at http://<instance_hostname>:<instance_port>/vvsp/vvspdriverotp.jsp.

After the operator enters the OTP using this utility, the VVSPDriver renews the password and continues normal operation.

If the operator is unable to enter the OTP within a short time (approximately 4 minutes), the VVSP considers that OTP stale, and the driver reinitiates the password renewal process; the VVSP sends a new and valid OTP to the operator's handset. The operator is then expected to enter this new OTP using the provided utility.


Note:

The VVSPDriver cannot automatically update the new application instance password in the driver instance configuration in OracleAS Wireless Tools. As a result, the new password is lost when the messaging server is restarted. Thus, to ensure normal operation, the VVSPDriver instance configuration must be updated before you restart the OracleAS Wireless instance (or just the messaging server process). The new password along with the corresponding application instance ID is available on the utility you use to enter the OTP, and is also logged to the VVSPAdmin.log file (or the file name you specified in the vvsp.admin.log parameter). The administrator or operator is expected to copy the new password from this file and manually update the password in the VVSPDriver instance configuration. This process will be automated in a future release.

You must get an SSL Class 3 certificate from the VVSP so that you do not have to perform the manual steps involved in periodic password renewal. For more information, refer to the VVSP Gateway Overview Guide available from the Via Vodafone Developer Site at http://www.via.vodafone.com.


Oracle Corporation recommends that you get SSL class 3 certificates from VVSP so that you are not required to do periodic password renewal. For more information, refer to the guides available from Vodafone Mobile Office at http://www.mobileoffice.vodafone.com.

10.6.1.6 WCTP Driver

WCTP (Wireless Communication Transfer Protocol) is specifically aimed at creating a simple means of passing alphanumeric and binary messages between wire line systems and mobile devices. HTTP 1.1 is the recommended transport protocol for WCTP. The built-in driver acts as an Enterprise Host and connects to the WCTP Gateway to send and receive messages. The driver can handle sending and receiving of text messages. The driver implements an HTTP listener to listen to incoming messages. The driver also supports status reporting for the sent messages.

10.6.1.6.1 Class Name

oracle.panama.messaging.transport.driver.sms.WCTPDriver
10.6.1.6.2 Configuration

The following parameters must be specified while creating the Driver:

  • send-host, send-port and send-page

    This is the host, port and page of the WCTP Gateway.

  • receive-host, receive-port and receive-page

    This is the host, port and page at which the HTTP server implemented by the WCTP driver, listens for incoming messages.

  • receive-proxy-host and receive-proxy-port

    This information is required if there is a proxy server. It is required while parsing the WCTP XML messages. These are optional.

  • maxchunks

    This is the maximum number of chunks allowed for any single message. Chunks after this number are ignored. The default is -1. A negative value means there is no limitation.

  • chunksize

    This is the maximum size for each chunk in bytes. The default is 160.

  • notify-when-queued

    Specify true if notification is required when the message has been queued.

  • notify-when-delivered

    Specify true if notification is required when the message has been delivered.

  • notify-when-read

    Specify true if notification is required when the message has been read.

  • multi-recipient-message-support

    Specify true if multiple recipients are sent in a single message. Otherwise a separate message will be sent for each of the recipients in the list.

  • network-connection-test-interval-minutes

    Time interval (in minutes) between successive handshake signals sent to the Gateway in order to keep the connection alive. A negative value means that the feature is disabled. Default value is -1.

  • callback-connection-test-interval-minutes

    Time interval (in minutes) to wait for status callback, before sending "Return to Service" message to the Gateway.Negative value means that the feature is disabled. Default value is -1.

  • connection-retry-count

    Number of times to retry connecting to the Gateway if there is a connection failure. Negative value means there is no limit to the number of tries. The default value is -1.

  • maximum-multiple-recipients

    Maximum number of recipients in a multi-recipient message. Negative value means there is no limitation. The default value is -1.

10.6.1.7 Data Communication Driver

The data communication driver enables OracleAS Wireless to send and receive SMS messages through a Nokia phone. The driver code is capable of sending text and binary messages. Receiving is enabled only for text messages (the driver has been tested for 5110) when connected to a PC through a data cable.

10.6.1.7.1 Setup Details

Follow the procedure below to set up the data communication driver in the Windows platform.

Before you start the setup make sure you have the following:

  • Java communication package—can be downloaded from Sun Microsystem's web site.

  • Nokia cell phone (the driver has been tested for 5100 and 6100 series of phone).

  • Data cable for the Nokia phone (the cable 9-pin RS-232C serial cable DAU-9P is required for 5100/6100 series of phone)

  • Data suite installation CD (if the phone does not have a built-in modem).

The setup procedure is divided into three categories:

  • Installing Java communication package.

  • Installing Data suite.(This step is required only if your phone does not have a built-in modem, such as the Nokia 5110).

  • Configuring OracleAS Wireless messaging server.

The details on each of the above categories are listed below.

  • Installing Java communication package

    Download Javacomm20-win32.zip.

    Follow all the steps given in the file PlatformSpecific.html (which you will get after unzipping the file Javacomm20-win32.zip).

    Try running a sample, which is included in the zip file to confirm that the configuration is complete, and working fine.


    Note:

    In case the sample programs are not listing the serial ports, try copying the file Javax.comm.properties in the directory <Java_HOME>\jre\lib. Where <Java_HOME> is the place where jdk is installed and the Java installed at <Java_HOME>\bin\Java is the one, which will be used to run the OracleAS Wireless components.

  • Installing Data suite

    (This step is required only if the Nokia phone used for the data communication doesn't have in-built modem.)

    Before installing Nokia data suite, go to control-panel -> ports. Note the ports present in your system.

    1. Connect your Nokia cell phone using the appropriate data cable to any of the PC's COM ports.

    2. Install Nokia data suite (typical installation).

    3. After the software is installed successfully, reboot the machine.

    4. Go to control-panel -> ports; an extra port will be listed. For example if the ports listed before installation were COM1 and COM2 then after installation the ports may get listed as COM1, COM2 and COM3. In this case, COM3 is the virtual port, which the data suite has configured for data transfer between the phone and the pc.

10.6.1.7.2 Driver Configuration

Class Name

oracle.panama.messaging.transport.driver.datacommunication.DataCommunicationDriver
10.6.1.7.3 Configuration

·

  • sms.datacommunication.port

    This is the port, which the driver will use to communicate with the phone connected through the cable. Type the name of the port is used to connect the phone to pc using the data cable. In case your phone doesn't have an in-built mode, you will have to type here name of the virtual port, which got created when you installed Data suite. (such as: COM3)

  • sms.datacommunication.phone-no

    This is the phone number of the cell phone, which is connected using the data cable to the computer on which the messaging server is running (for example: 1-650-576-8055).

  • sms.message.maxchunks

    This is the maximum number of message chunks to be sent, if the message size is greater than the chunk size. By default all the chunks will be sent.

  • sms.message.chunksize

    Maximum size of a chunk. Default is 150.

Before you run the messaging server, make sure you have included the path of comm.jar to the CLASSPATH in the file opmn.xml.

10.6.1.7.4 Compatible Devices

Table 10-4 lists devices tested to work with this driver. It is not meant to be an exclusive list of all devices that will work, simply a list of devices tested thus far.

Table 10-4 Data Communication Driver Compatible Devices

Model Tested Sends Messages? Receives Messages? Hardware Required Additional Software Required

Nokia 5110

Yes

Yes

9-pin RS-232C serial cable DAU-9P

Nokia Data Suite 3.0

Nokia 6190

Yes

Yes

9-pin RS-232C serial cable DAU-9P

Nokia Data Suite 3.0

Nokia 7110

Yes

Yes

DLR-3P Data cable

N/A

Nokia 9210

Yes

No

RS232 adapter cable DLR-2L

N/A

Nokia 6210

Yes

Yes

Nokia DLR-3P serial cable

N/A


10.6.1.8 WAP Push PAP Driver

PAP (Push Access Protocol) is a protocol to access a WAP Push gateway. OracleAS Wireless includes a prebuilt implementation of the PAP driver as a driver that is capable of sending WAP pushes.

This driver can handle these content types:

  • ContentTypes.WAP_PUSH—All supported content types by the WAP push gateway.

  • ContentTypes.URL (only if the content type of the related resource is one of the above)—The driver accepts all content types and posts the message to the push gateway.

If the WAP push gateway does not understand the messages posted by the PAP driver, the PAP driver will throw a non-fatal exception to indicate the failure.

10.6.1.8.1 Class Name

oracle.panama.messaging.transport.driver.wap.PAPDriver
10.6.1.8.2 Configuration

  • pap.ppg.url

    The URL of the WAP push gateway. This is required.

  • pap.notifyto.url

    The URL to which notifications can be sent by the WAP push gateway. This is optional.

  • pap.listento.notify

    Value is set to true of false. This flag indicates if this driver listens for notifications.

  • pap.source.reference

    The source reference of this driver to the WAP push gateway.

  • pap.ppg.hostname

    The logical hostname of the PPG gateway; used as the PPG's carrier identification. If not present, it is derived from the PPG URL.

  • pap.local.hostname

    The logical local hostname or IP address. If not present, it is derived from the local notification URL if any, or the local machine.

  • pap.default.encoding

    The default content encoding format; if not set, UTF-8 is used.

  • pap.version

    The PAP version supported by the PPG, must be either 1.0 or 2.0.

10.6.1.9 Instant Messaging (IM) Driver

The Instant Messaging driver provides unidirectional as well as bidirectional access to end-users for accessing OracleAS Wireless applications through real-time instant messaging (IM). The IM driver uses Jabber, an open, XML-based instant messaging platform, which also integrates with proprietary IM networks such as Yahoo, MSN, AOL and ICQ. This driver allows end-users to receive alert notifications and interactively use applications through their IM client of choice.

10.6.1.9.1 About Jabber

Jabber is an open, XML-based protocol for Instant Messaging and presence. Jabber-based software is deployed on thousands of servers across the Internet and is used by over a million people worldwide. Jabber consists of a client-server architecture, which resembles the ubiquitous e-mail network. Jabber servers are completely decentralized, allowing anyone to set up their own server. Messaging is achieved as in the e-mail network, where recipients are addressed by a username and a hostname (for example: username@hostname). In the Jabber network, users are identified by a Jabber ID, which consists of a username and the hostname of the particular Jabber server to which the user connects. An end-user of Jabber connects to a Jabber server using a Jabber client in order to send instant messages to other Jabber users. This, however, is not the only way to achieve instant messaging. Jabber has an extensible and modular architecture. It integrates with proprietary IM networks such as Yahoo, MSN, AOL and ICQ using transport gateways that can connect to these networks. This allows Jabber users to communicate with those on Yahoo, MSN, AOL or ICQ.

In order to use the IM driver in OracleAS Wireless, you must access a Jabber server and a Jabber account for the OracleAS Wireless instance (using the ID that the IM driver will log in to Jabber with, to send to and receive messages from end-users). In addition, the IM driver includes configuration parameters that enable the OracleAS Wireless instance to communicate with users on Yahoo, MSN, AOL or ICQ IM networks. This requires that you additionally have accounts on these proprietary IM networks to which you are connecting using OracleAS Wireless, and thus, allow end-users of those particular networks to communicate with OracleAS Wireless.

10.6.1.9.2 Third-party Jabber Software

The Instant Messaging driver uses the JabberBeans Java library to connect to a Jabber Instant Messaging Server. It requires third-party software listed in Table 10-5.

Table 10-5 Third-Party Software for the Instant Messaging Driver

Name Instructions Version(s)

JabberBeans

OracleAS Wireless includes a copy of JabberBeans (version 0.9.1). If you wish to upgrade to a newer version of JabberBeans, follow these instructions:

Download and copy the latest jabberbeans.jar from http://jabberbeans.jabberstudio.org to $ORACLE_HOME/wireless/lib on UNIX, to %ORACLE_HOME%\wireless\lib on Windows.

0.9.1

Jabber Server (jabberD)

Optional. To download and install your own Jabber server, follow the Jabber server's installation guide on http://www.jabber.org.

1.4.2

Yahoo TransportGateway

Optional. Follow the transport installation guide. Refer to http://yahoo-transport.jabberstudio.org.

2.0.0

MSN Transport Gateway

Optional. Follow the transport installation guide. Refer to http://msn-transport.jabberstudio.org.

1.1.0 or greater

AOL & ICQ Transport Gateway

Optional. Follow the transport installation guide. Refer to http://aim-transport.jabberstudio.org.

0.9.25



Note:

You do not need to install your own Jabber server if you have access to an existing Jabber server. For a list of public Jabber servers, see http://www.jabberview.com.

10.6.1.9.3 Configuring the Messaging Server with the Instant Messaging Driver

Use the OracleAS Wireless Tools to configure the messaging server with the instant messaging driver.

To add/enable the instant messaging driver:

  1. Click the Administration tab.

  2. Expand the Messaging Server section under Special Configuration for Wireless Site. Click Messaging Server Drivers. The Messaging Server Drivers screen appears.

  3. In the Configuration section, click Messaging Server Drivers. The Messaging Server Drivers screen appears.

  4. If you do not see an entry for IMDriver, go to Step 5. If you see an entry for IMDriver, enable the driver as follows:

    1. Select the IMDriver entry and click Edit. This will open the IMDriver Properties screen.

    2. Check the Enabled box and click Apply.

    3. Go to the next section Configuring the Driver Instance.

  5. Click Add Driver. The Add Driver screen appears. Enter only the values noted here; other values are not required.

    1. In the Driver Name field, enter IMDriver.

    2. Select IM from Delivery Category.

    3. From the Speed Level drop-down list, select 8.

    4. From the Cost Level drop-down list, select 1.

    5. From the Capability drop-down list, select BOTH (or only SEND or RECEIVE, if you want unidirectional messaging).

    6. Enter 1 in the Number of Message Queues field.

    7. Check the Enabled box.

    8. In the Driver Class Name field, enter oracle.panama.messaging.transport.driver.instantmessaging.InstantMessagingDriver

    9. Click Add Another Row to add a row for each of the following parameters:

      • For the Jabber server: im.server.host, im.server.port, im.server.username, im.server.password

        To support users of proprietary, IM networks (for example: Yahoo, MSN, AOL or ICQ), add the parameters for each network as follows (Though you must add these parameters, entering values for these is optional when you configure the Driver Instance.):

      • For Yahoo: im.yahoo.enable, im.yahoo.username, im.yahoo.password

      • For MSN: im.msn.enable, im.msn.username, im.msn.password

      • For AOL: im.aol.enable, im.aol.username, im.aol.password

      • For ICQ: im.icq.enable, im.icq.username, im.icq.password

      • To print verbose debug output: im.debug

      • To adjust retry parameters which are used when the driver is disconnected from the Jabber server: im.retry.limit, im.retry.interval


        Note:

        Detailed explanations of these parameters are provided in the Table below.

    10. Click OK to create the driver.

10.6.1.9.4 Configuring the Driver Instance

To configure the instant messaging driver instance:

  1. Click the Wireless Server tab. The Server screen appears.

  2. Click messagingserver1 in the process table. The messagingserver1 process screen appears.

  3. Click Add Driver Instance. The Add Driver Instance screen appears.

  4. Complete the Add Driver Instance screen as follows:

    1. Enter IMDriver Instance in the Driver Instance Name field.

    2. From the Driver Name drop-down list, select IMDriver.

    3. Click Go.

    4. In the Number of Sending Threads field, enter 2.

    5. In the Number of Receiving Threads field, enter 1.

    6. In the Driver Specific Parameter fields, enter values as listed in Table 10-6.

    Table 10-6 Values for Driver Specific Parameters

    For This Parameter Name... Enter this Value

    Parameters for Jabber IM

    Enter these values for Jabber IM.

    im.server.host

    localhost (Replace this value with the hostname of your Jabber server. For multiple servers, use a comma-separated list. If only one hostname is specified, it will be used for all accounts. Example: my1.host.com, my2.host.com.). If the Jabber server is outside your firewall, the IM driver will connect to it using the site-wide HTTP proxy settings configured in your OracleAS Wireless instance.

    im.server.port

    5222(default Jabber port. For multiple servers, provide a corresponding comma-separated list of ports. Example: 5222, 5222.)

    im.server.username

    oracleagent (Replace this value with the Jabber username of the OracleAS Wireless instance). The IM Driver will connect to Jabber with this username. A Jabber ID is of the form username@hostname, and this parameter only requires the username part. For multiple accounts, enter a comma-separated list of Jabber usernames to login as. If you have multiple servers listed above, there must be an equal number of usernames (one username per server). If you have only one server listed above, all usernames listed here will use that server. Example: oracleagent1, oracleagent2). If an account does not exist on the Jabber server, the IM driver will attempt to register it as a new account.

    im.server.password

    test (Replace this value with a corresponding comma-separated list of passwords for each username listed above.)

    Optional Parameters for Yahoo IM

    Enter these values only if you want to connect to Yahoo's IM network

    im.yahoo.enable

    Set im.yahoo.enable to true to enable the Yahoo transport. To disable using Yahoo, leave this field blank, and ignore the username and password fields. If you have multiple accounts specified above, provide a corresponding comma-separated list of values.

    im.yahoo.username

    Enter a comma-separated list of Yahoo account IDs (requires that you already have these IDs registered on Yahoo), for each user account above (leave entries blank for accounts without Yahoo). Entering valid Yahoo account information enables Yahoo users to access OracleAS Wireless applications through Yahoo Messenger.

    im.yahoo.password

    Enter corresponding comma-separated list of Yahoo account passwords.

    Optional Parameters for MSN IM

    Enter these values only if you want to connect to MSN's IM network

    im.msn.enable

    Set im.msn.enable to true to enable the MSN transport. To disable using MSN, leave this field blank, and ignore the username and password fields. If you have multiple accounts specified above, provide a corresponding comma-separated list of values.

    im.msn.username

    Enter comma-separated list of MSN account IDs (requires that you already have these IDs registered on MSN), for each user account above (leave entries blank for accounts without MSN). Entering valid MSN account information allows MSN users to access OracleAS Wireless applications through MSN Messenger.

    im.msn.password

    Enter corresponding comma-separated list of MSN account passwords.

    Optional Parameters for AOL IM

    Enter these values only if you want to connect to AOL's IM network.

    im.aol.enable

    Set im.aol.enable to true to enable the AOL IM (AIM) transport. To disable using AOL, simply leave this field blank, and ignore the username and password fields. If you have multiple accounts specified above, provide a corresponding comma-separated list of values.

    im.aol.username

    Enter comma-separated list of AOL account IDs (requires that you already have these IDs registered on AOL), for each user account above (leave entries blank for accounts without AOL). Entering valid AOL account information enables AOL users to access OracleAS Wireless applications through AOL Instant Messenger.

    im.aol.password

    Enter corresponding comma-separated list of AOL account passwords.

    Optional Parameters for ICQ

    Enter these values only if you want to connect to ICQ's IM network

    im.icq.enable

    Set im.icq.enable to true to enable the ICQ transport. To disable using ICQ, leave this field blank, and ignore the username and password fields. If you have multiple accounts specified above, provide a corresponding comma-separated list of values.

    im.icq.username

    Enter comma-separated list of ICQ account IDs (requires that you already have these IDs registered on ICQ), for each user account above (leave entries blank for accounts without ICQ). Entering valid ICQ account information enables ICQ users to access OracleAS Wireless applications through ICQ Instant Messenger.

    im.icq.password

    Enter corresponding comma-separated list of ICQ account passwords.

    Additional Parameters

    Enter these values for additional configuration

    im.debug

    Set this value to true to enable verbose debug output. This triggers the driver to output additional notification messages, which also requires that you have the Notify log level enabled in your system logging configuration for the OracleAS Wireless instance.

    im.retry.limit

    20 (Number of times the driver should attempt to reconnect when disconnected from a Jabber server. (the default limit is 20.)

    im.retry.interval

    20 Time interval, in seconds, between reconnect attempts. (the default interval is 20 seconds.)


  5. Click OK to create the driver instance.


    Note:

    You must restart the messaging server each time you change the driver-specific attributes.

10.6.1.9.5 Using the IM Driver with the Async Server

The IM driver can be used in conjunction with the Async Server to provide access to async-enabled applications on OracleAS Wireless through Instant Messaging. To enable, configure access points in the Async Server.

To configure the Async Server:

  1. Click the Wireless Server tab.

  2. Click the Administration tab.

  3. Expand the Async Server section under Special Configuration for Wireless Site. Click Access Points. The Access Points screen appears.

  4. Click Add Access Point.

  5. Enter IM entry point in the Name field.

  6. Select IM from Delivery Type.

  7. In the Address field, enter jabber|<Jabber ID> where <Jabber ID> is the ID used by your IM driver (for example, oracleagent@localhost). In other words, the entire address will take the form: <im.server.username>@<im.server.host>).

  8. Check the Allowed to Access All Services box.

  9. Click OK to add the access point.

  10. If you have configured the IM driver for other IM networks such as Yahoo or MSN, you must specifically add an access point for each such network. The address must be of the form <network-name>|<userid>, where <network-name> is yahoo, msn, aim, or icq. For example, if you have configured the IM driver for MSN, you must add an access point with the address msn|<im.msn.username>, where <im.msn.username> is the value of the parameter you configured in the IM driver instance. Likewise, if you have configured the IM driver for AOL IM (AIM), add an access point with the address aim|<im.aol.username>.

This completes the Async Server configuration. To invoke an Async-enabled Application:

  • Depending on which IM systems (such as Jabber, Yahoo, MSN, AOL and ICQ) you have configured the IM driver for, you must add the corresponding user to your IM client's roster or contact list. We refer to this user as the IM Agent.

    Example: You have configured the MSN transport in the IM driver, using msnimdemo@oracle.com as the value of im.msn.username. Now, launch your MSN Messenger client, login as yourself (with your own MSN account) and add the MSN IM Agent msnimdemo@oracle.com to your contact list.

  • Send an instant message to the IM Agent with help as the body of the message. After you send this message, you receive an instant message with the list of applications you can invoke.

    Example: Invoke the hello application by sending a message with the text hello to the IM Agent. The agent will return a simple Hello World response:


    Note:

    The above example assumed that the hello application is async-enabled.

  • For applications that require user input, chat with the agent and enter the necessary values.

    Example: Invoke the Short Messaging application by typing sm. You will receive a menu of options such as 0 Menu, 1 [] Type. Enter 1 to select Type. A list of types to choose from is returned. Type 3 to select Voice. You can enter other fields such as Recipients, Subject and Body in a similar manner, and finally send the message.

10.6.1.9.6 Using the XMS Service

In order to send instant messages using the XMS service, you have two API options, namely XMSSimpleSender and XMSSender:

  • Using XMSSimpleSender:

    To address recipients, prepend the IM: tag to the IM address. In other words, use the following format:

    IM:<address>
    
    

    where <address> is the IM address of the recipient.

    <address> further takes the form:

<network-name>|<userid>, 

where <network-name> is the name of the IM network. For example: jabber, yahoo, msn, aim, icq.

<userid> is the ID of user on that network


Note:

The field separator used is the pipe (|) character.

Some examples are listed in Table 10-7.

Table 10-7 Address Formats for Different IM Addresses

IM Address XMSSimpleSender Address format

Jabber user with ID: foo@jabber.org

IM:jabber|foo@jabber.org

MSN user with ID: foo@msn.com

IM:msn|foo@msn.com

Yahoo user with ID: foo

IM:yahoo|foo

AOL IM user with ID: foo

IM:aim|foo

ICQ IM user with ID: 12345

IM:icq|12345


  • Using XMSSender

    To address recipients, use the address format specified above without the IM: tag (example shown below). Create the addresses as instances of the class IMAddressData, and use the IM transport type. Apart from this, use the XMS client as you would normally. Refer to the XMS examples in Section 10.6.1.10, "XMS Driver".

To create an instance of IMAddressData, you may use one of two constructors:

IMAddressData(String address)

where address has the XMSSimpleSender Address format <address> as shown above.

For example:

IMAddressData("msn|foo@msn.com")
IMAddressData("aim|foo")
IMAddressData(String userid, String network)

where userid is <userid>

network is <network-name>

For example:

IMAddressData("foo@msn.com", "msn")
IMAddressData("foo", "aim")
IMAddressData("foo@jabber.org", "jabber")

Example 10-6 shows a sample XMS client code to show IM addressing using both the constructors.

Example 10-6 Sample XMS client code

// IM recipients
AddressData imRecipients[] = new AddressData[4];
 
/* using the first constructor */
// specify a regular Jabber user
imRecipients[0] = new IMAddressData("jabber|foo@jabber.org");
// specify a Yahoo user (by prepending the "yahoo|" tag)
imRecipients[1] = new IMAddressData("yahoo|foo");
 
/* using the second constructor */
// specify an MSN user
imRecipients[2] = new IMAddressData("foo@msn.com", "msn");
// specify an AOL IM user
imRecipients[3] = new IMAddressData("foo", "aim");
 
// Packet object
Packet pkt = new Packet();
AddressData imSender = new IMAddressData("jabber|oracle@jabber.org");
pkt.setFrom(TransportType.IM, imSender);
pkt.addRecipients(TransportType.IM, imRecipients);
10.6.1.9.7 Standalone test of the IM Driver

To test the IM driver on your local machine, you must perform a few more additional steps, specifically, installing a Jabber server and a Jabber client.


Note:

The following instructions are only meant for testing from a Jabber client. If you wish to test from proprietary networks such as Yahoo or AOL, you must add the appropriate transports to the Jabber server, and install the appropriate IM client (such as Yahoo Messenger or AOL Instant Messenger).

To install Jabber Server on Windows:

  1. Download JabberD from http://jabberd.jabberstudio.org/downloads/JabberD-1.4.2.exe

  2. Open the file to start the installation process. Proceed in the installation with the default values and finish the installation.

  3. Start the Jabber server from Windows Start > Programs > JabberD > JabberD This opens a DOS Command Prompt window, and you will see log output that says [notice] (-internal): initializing server. If you see this message, you have successfully started the Jabber server.

To install Jabber Server on UNIX:

  1. Download the Jabber server:

    Solaris 2.6: http://jabberd.jabberstudio.org/downloads/jabber-1.4.2a-sparc-solaris-2.6.tar.gz

    Solaris 7: http://jabberd.jabberstudio.org/downloads/jabber-1.4.2a-sparc-solaris-7.tar.gz

  2. Extract the tar file.

    # mkdir jabber
    # cd jabber
    # gtar xzvf jabber-1.4.2a-sparc-solaris-<ver>.tar.gz
    
    
  3. Execute jabberd:

    # jabberd/jabberd
     
    
  4. This starts the Jabber server and begins printing log messages such as: [notice] (-internal): initializing server. If you see this message, you have successfully started the Jabber server.

To install Jabber Client on Windows:

  1. Download and install a Jabber client of your choice from http://www.jabber.org/user/clientlist.php. Oracle Corporation recommends Rival (http://rival.chote.net/) for first-time Jabber users.

  2. After installation, configure your client to connect to the Jabber server on localhost. Create a new Jabber account for yourself. Now add to your contact list the Jabber ID of the OracleAS Wireless instance that you configured in the IM driver. For example, if you use the pre-configured default settings in the IM driver, you would add the ID oracleagent@localhost to your contact list.

To install Jabber Client on UNIX:

  1. Download, compile and install a Jabber client of your choice from http://www.jabber.org/user/clientlist.php?Platform=Linux. Not all clients may compile on UNIX; try at your own risk. There are pre-compiled UNIX binaries of Gabber (a popular Linux Jabber client) at: http://prdownloads.sourceforge.net/gabber/gabber0.8.7_solaris.tar.gz.

  2. Once you have a client up and running, follow Step 2 from the Windows section above.

To send a test message to OracleAS Wireless:

  1. From your Jabber client, double-click on the contact you just added (oracleagent@localhost) to send an instant message.

  2. Type help in the body, and send the message. If your IM driver and Async access point are configured correctly, you will receive an instant response from OracleAS Wireless listing the async applications you can invoke.

10.6.1.9.8 Quick-configuring the IM Driver for AOL Instant Messenger

To quick-configure the IM driver for AOL Instant Messenger:

  1. Create AOL screen names.

    You must have two AOL screen names (accounts), one for yourself (referred to here as <my_screenname>), and one for the IM driver (referred to here as <imdriver_screenname>). If you do not already have two screen names, create them at http://www.aim.com.


    Note:

    The AOL web site limits the number of accounts you can create for a given e-mail address or IP address. If you receive an error while trying to create an account, use an alternate e-mail address, or a different machine.

  2. Configure IM Driver and Async Access Point.

    1. Add an IMDriver Instance in the messagingserver1 process. Enter the following values:

      im.server.host = myjabber.net (or any Jabber host that has an AOL IM (AIM) transport)
      im.server.username = <imdriver_screenname>
      im.server.password = <password of imdriver_screenname> (or whatever you want)
      im.aol.enable = true
      im.aol.username = <imdriver_screenname>
      im.aol.password = <password of imdriver_screenname>
      
      
    2. Add an IM access point from Wireless Tools > Site Administration > Component Configuration > Access Point:

      • Enter IM entry for Name.

      • Select IM for Delivery Type.

      • Enter aim|<imdriver_screenname> for Address.

      • Check Allowed to Access All Applications.

      • Restart the messagingserver1 process.

  3. Install AOL Instant Messenger (AIM).

    1. Download and install AIM from http://aim.aol.com/aimnew/NS/congratsd2.adp.

    2. Launch AIM and click Setup. Click Connection to configure HTTP proxy settings (host = www-proxy.us.oracle.com, port = 80, protocol = HTTP).

    3. Sign on to AIM with your screen name <my_screenname>.

    4. Add <imdriver_screenname> to your buddy list and start chatting.

10.6.1.10 XMS Driver

This driver uses a hosted XMS service and by default uses the demonstration service hosted by Oracle Corporation. This driver acts as an XMS client to an OracleAS Wireless server hosted on the Internet, and can be configured to point to any service that supports the OracleAS Wireless XMS Web Service. The XMS driver uses a special protocol, SOAP over HTTP (the OracleAS Wireless XMS Web Service). The Oracle-hosted XMS server does not require any account for access. The XMS uses SOAP over HTTP. For trial purposes, you may use the hosted demonstration OracleAS Wireless instance and use "" (a pair of double quotes) as username and "" as password. This grants you limited usage for sending messages. The URL for it is: http://messenger.oracle.com/xms/webservices.

10.6.1.10.1 Class Name
oracle.panama.messaging.transport.driver.push.PushDriver
10.6.1.10.2 Configuration

  • messaginggatewayURL

    URL to the Hosted XMS Web Service. This parameter is required. For example: http://messenger.oracle.com/xms/webservices

  • username

    Name to use to authenticate against the XMS Service. XMS Web Services can determine whether username and password are required. If username is not required by XMS Web Services, leave blank (empty string). Bad username or password is returned from XMS Web Services if the user name does not exist, or if the password of that username is incorrect.

    Example: messaginguser

  • password

    Password of the user specified in the username field, used to authenticate against the XMS Service. XMS Web Services can determine whether username and password are required. If username and password are not required, leave password blank (empty string). Bad username or password is returned from XMS Web Services if either the user name does not exist, or if the password of that user name is not correct.

    Example: 8Uh42g

The XMS driver can handle all content types. The hosted XMS Web Services determine how to handle them. The driver runs on an HTTP connection; no explicit HTTP proxy setting is needed because the XMS driver inherits the proxy settings of OracleAS Wireless.

This driver sends only. It supports as many transport types as the Hosted XMS Service; the actual types supported are dependent on which Hosted (OracleAS Wireless Instance) service is running. The OracleAS Wireless Service supports an API that describes the exact transports supported by an Instance.

10.6.1.11 E-mail Driver

The e-mail driver supports SMTP in delivering messages, and either IMAP or POP3 in receiving messages. This driver can handle sending and receiving messages. Both IMAP or POP3 protocols are supported for receiving messages.

E-mail Driver SMTP Authentication is new in this release. When configuring an e-mail driver, you are able to add user and password parameters.

10.6.1.11.1 Class Name

oracle.panama.messaging.transport.driver.e-mail.e-mailDriver

10.6.1.11.2 Configuration

  • server.incoming.protocol

    This is the value for the e-mail receiving protocol. The possible values are IMAP and POP3. Required only if e-mail receiving is supported on the driver instance.

  • server.incoming.host

    The host name of the incoming mail server. Required only if e-mail receiving is supported on the driver instance.

  • server.incoming.receivefolder

    The name of the folder the driver is polling messages from. The default value is INBOX.

  • server.incoming.usernames

    The list of user names of the mail accounts the driver instance is polling from. Each name must be separated by a comma, for example, foo,bar. Required only if e-mail receiving is supported on the driver instance.

  • server.incoming.passwords

    The list of passwords corresponding to the user names above. Each password is separated by a comma and must reside in the same position in the list as their corresponding user name appears on the usernames list. Required only if e-mail receiving is supported on the driver instance.

    Example: foopwd,barpwd

  • server.incoming.e-mails

    The e-mail addresses corresponding to the user names above. Each e-mail address is separated by a comma and must reside in the same position in the list as their corresponding user name appears on the usernames list. Required only if e-mail receiving is supported on the driver instance.

    Example: foo@oracle.com,bar@oracle.com

  • server.incoming.checkmailfreq

    The frequency with which to retrieve messages from the mail server. The unit is in seconds and the default value is 5 seconds.

  • server.incoming.deletefreq

    The frequency to permanently remove deleted messages. The unit is in seconds and the default value is 300 seconds. A negative value indicates the messages should not be expunged. For the POP3 protocol, the message is expunged after it is processed.

  • server.incoming.retry.limit

    This value specifies the number of times to retry connecting to the incoming mail server, if the connection is lost due to some reason. The default value is -1 which means no limit to the number of tries.

  • server.incoming.autodelete

    This value indicates if the driver should mark the messages deleted after they have been processed. The value can be true or false and the default value is false. For the POP3 protocol, the messages are always deleted right after they are processed.

  • server.outgoing.host

    The name of the SMTP server. Mandatory only if e-mail sending is required.

    Example: smtp05.oracle.com

  • server.outgoing.username

    The username used for SMTP authentication. Required only if SMTP authentication is supported by the SMTP server.

  • server.outgoing.password

    The password used for SMTP authentication. Required only if SMTP authentication is supported by the SMTP server.

  • default.outgoing.from.address

    The default FROM address (if one is not provided in the outgoing message).

The e-mail driver supports SMTP in delivering messages, and either IMAP4 or POP3 in receiving messages. This driver can handle sending and receiving messages. Both IMAP4 or POP3 protocols are supported for receiving messages.


Note:

Only server.outgoing.host must be configured if the driver is going to be sending only.

10.6.1.12 Voice Driver

The voice driver supports the Out Bound Call protocol supported by VoiceGenie. Currently, it has been tested only to work with the VoiceGenie gateway. This driver handles sending messages only. Although the driver can only send messages, it must be configured to have both sending and receiving capabilities for the driver to work.

This driver can handle:

  • text/plain

  • ContentTypes.MOBILE_XML_URL

  • ContentTypes.MOBILE_XML_URL_REMOTE

  • ContentTypes.MOBILE_XML

  • ContentTypes.URL (only if the content type of the URL resource is one of above)

For other content types, the driver will throw a non-fatal driver exception.

10.6.1.12.1 Class Name

oracle.panama.messaging.transport.driver.voice.Voice GenieDriver

10.6.1.12.2 Configuration

  • voicegenie.outbound.servlet.uri

    URL for the VoiceGenie Outbound Call Servlet. This is required with no default value. Here is a sample:

    http://rossini.us.oracle.com/servlet/com.voicegenie.outboundcallservlet.OutboundCallServlet
    
    

    The driver uses the site level proxy configuration in accessing this URL.

  • voicegenie.outbound.servlet.username

    Username for the VoiceGenie Outbound Call.

  • voicegenie.outbound.servlet.password

    Password for the VoiceGenie Outbound Call.

  • voicegenie.outbound.servlet.dnis

    The phone number to be set as the caller. This is optional. The default value is 12345678.

  • voicegenie.urlservice.path

    Servicepath to the prebuilt VoiceGenie service. This driver depends on an OracleAS Wireless service based on the HTTP adapter. By default the OracleAS Wireless installation has an HTTP Adapter service named VoiceGenieURLService to support this voice driver. This is a required parameter. There is no default value and one must look at a particular OracleAS Wireless installation to obtain a value for it. Here is an sample:

    foo.oracle.com:9000/ptg/rm?PAservicepath=/VoiceGenieURLService&PAsubmit= Submit
    
  • voicegenie.driver.receive.host and voicegenie.driver.receive.port

    These are the IP host and port for the HTTP adapter to get sending content in Mobile XML format. The port should be used by this driver only. These are required.


    Note:

    This driver opens a port (as specified in voicegenie.driver.receive.port) and listens to HTTP traffic. It uses voicegenie.driver.receive.host and voicegeneie.driver.receive.port to compose a URL for OracleAS Wireless HTTP adapter to contact the driver. This is required if you want to send a message that contains OracleAS Wireless XML. Ensure that you provide the correct hostname and unique port number in order for the driver to function.

10.6.1.13 Enhanced Voice Driver

You can configure the VoiceGenie driver to support a simple voice flow or a fully tracking, complex confirmed message delivery voice flow, which both prompts user inputs and provides responses to various user inputs (by default, the simple voice flow is used). The VoiceGenie driver can use only one type of voice flow at a time. Table 10-8 describes the voice flow-related parameters of the VoiceGenie driver. (To view or edit these or other parameters, select the VoiceGenie driver from the Drivers page and then click Edit.).

All voice driver instances inside one messaging server can load balanced. If any driver instance fails, for whatever reason (such as the voice gateway is down), other instances take over and route messages to other gateways. The instance will attempt to function again periodically. Once the temporary problem is gone, the driver instance will work again as normal.

Table 10-8 Voice Flow-Related Parameters of the VoiceGenie Driver

Parameter Description

voice.response.seconds

The interval, in seconds, after which a call hangs up if no one answers. The default value is 60 seconds.This parameter applies to both the simple voice flow and the complex (fully tracking) voice flow.

voice.max.queue.size

The maximum number of messages that the driver can hold in memory. The default is 800 messages.This attribute applies only to the complex (fully tracking) voice flow.

voice.delay.seconds

The delay, in seconds, that the driver waits before checking if the voice gateway is up or down. The default is 40 seconds. This attribute applies only to the complex (fully tracking) voice flow.

voice.calling.threads

The number of actual calling threads. The default is 5. This attribute applies only to the complex (fully tracking) voice flow.

voice.max.retries

The maximum number of retry attempts when the phone or server is busy. The default is 8 retry attempts.This attribute applies only to the complex (fully tracking) voice flow.

voice.flow

Indicates the voice flow for text messages. Enter 1 for the regular text flow; enter 2 for the complex (fully tracking) voice flow. The default is 1 (the simple voice flow).

voice.prompt.alert-notification-1

Part 1 of the prompt alert notification. The default text is "This is an alert notification from Oracle Mobile. If you are...." This attribute applies only to the complex (fully tracking) voice flow (2).

voice.prompt.alert-notification-2

Part 2 of the prompt alert notification. The default text is "...say 'yes' or press 1. Otherwise, say 'no' or press 2. To repeat these options, say 'repeat' or press 3." You can change the prompt, except for the options which must be 'yes', 'no', 'repeat', '1', '2', or '3'. This attribute applies only to the complex (fully tracking) voice flow (2).

voice.prompt.repeat

The prompt for the user to repeat. The default is "I'm sorry, I didn't understand. Please repeat your response." This attribute applies only to the complex (fully tracking) voice flow (2).

voice.prompt.to-confirm

The prompt for the user to confirm his (or her) entries. The default text is "To confirm receipt of this alert notification, say 'confirmed' or press '1'. If you would like to repeat the notification again, say 'repeat' or press '3'. You can change the prompt, except for the options which must be 'yes', 'no', 'repeat', '1', '2', or '3'. This attribute applies only to the complex (fully tracking) voice flow (2).

voice.prompt.good-bye1

The reply to the user confirmation. The default text is "Thank you. Good-bye." This attribute applies only to the complex (fully tracking) voice flow (2).

voice.prompt.good-bye2

The reply if the user does not respond to voice.prompt.to-confirm. The default text is "I was unable to receive your response. Good-bye." This attribute applies only to the complex (fully tracking) voice flow (2).

voice.prompt.alt-name

The prompt for an alternative name. The default text is "...associated with, or employed by, Oracle." This attribute applies only to the complex (fully tracking) voice flow (2).


The Simple Voice Flow

By default, the VoiceGenie driver uses the simple voice flow. When the VoiceGenie driver uses the simple voice flow, a user hears the following upon receipt of a text message:

You have received a message. Sender: <sender>. Subject: <subject>. Message: <body>. You may say 'repeat' to hear the message again or hang up.

The Complex Voice Flow

The complex voice flow uses these prompts:

<voice.prompt.alert-notification-1> <voice.prompt.alt-name> <voice.promt.alert-notification-2>

When you configure the VoiceGenie driver to use the complex (fully tracking) voice flow, a user first hears the following message upon the receipt of a text message:

This is an alert notification from Oracle Mobile. If you are associated with, or employed by Oracle. say 'yes' or press 1. Otherwise, say 'no' or press 2. To repeat these options, say 'repeat' or press 3.

If the user does not reply, says "repeat", or presses 3, the VoiceGenie repeats. After it repeats three times, it continues with

<voice.prompt.good-bye2>

The default script is

I was unable to receive your response. Good-bye.

If the user says something other than "yes", "no", "repeat", or "1", "2", "3", the driver responds with

<voice.prompt.repeat>

The default script is:

I'm sorry, I didn't understand. Please repeat your response.

If the user says "no" or presses 2, the VoiceGenie driver provides the response:

<voice.prompt.good-bye1>

The default script is:

Thank you. Good-bye.

If the user says "yes" or presses 1, the voice flow replies:

Subject: <subject>. Message: <body>. To confirm receipt of this alert notification, say 'confirmed' or press '1'. If you would like to repeat the notification again, say 'repeat' or press '3'.

The voice flow repeats three times if the user does not reply (or says something other than "repeat"), or does not press 3. After three times, the voice flow continues with

<voice.prompt.good-bye2>

By default, this script is:

I was unable to receive your response. Good-bye.

If the user says, "confirmed" or presses 1, then the driver responds (using <voice.prompt.good-bye1>):

Thank you. Good-bye.


Note:

The Messaging Server generates a proper status report for each response if a status listener is registered. All status reports, which notify the sending applications of the status of the sent messages, are saved to the database even if no status listener has been registered.

10.6.1.14 UCP Driver

UCP (Universal Communication Protocol) is one of the most popular GSM SMS protocols. OracleAS Wireless includes a prebuilt implementation of the UCP driver as a driver that is capable of both sending and receiving.

The UCP driver implements EMI/UCP 4.0. It supports both listening mode and non-listening mode. In the non-listening mode, the driver opens one connection to the SMSC. This connection is shared in sending and receiving. UCP driver works with most SMSC in the non-listening mode. In the listening mode, the driver listens to a port. The SMSC opens a connection to the driver to deliver received messages from devices to the driver. The driver opens a HTTP connection on demand to deliver a message to the SMSC for sending to the target device. The HTTP connection is reused if possible.

This driver can handle:

  • text/plain

  • ContentTypes.RING_TONE

  • ContentTypes.GRAPHICS

  • ContentTypes.WAP_SETTINGS

  • ContentTypes.WAP_PUSH

  • ContentTypes.VCARD

  • ContentTypes.E-MAIL_SETTING

  • ContentTypes.VCALENDAR

  • ContentTypes.MM1_NOTIFICATION

  • ContentTypes.EMS

  • ContentTypes.ENCODED_SMS

  • ContentTypes.URL (only if the content type of the related resource is one of above)

For other content types, the driver will throw a non-fatal driver exception.

10.6.1.14.1 Class Name
oracle.panama.messaging.transport.driver.sms.UCPDriver
10.6.1.14.2 Configuration

  • sms.account.id

    This is the account ID for the SMSSC. Generally, it should be the assigned short number by the operator. This is required.

  • sms.account.password

    This is a password assigned by the operator. It is used to open a session to the SMSC with UCP command 60. If the account ID is a Multiple User Large Account (MULA), then you are required to open a session.

  • sms.ucptype

    Specifies which command to use in sending a message. The possible values are 01 and 51. The default value is 51, which means UCP command 51 is used to send a message.

  • sms.server.host and sms.server.port

    SMSC server information the driver uses to open a TCP/IP connection.

  • sms.server.default.encoding

    The default encoding of the text message. The default value is IA5. For multibyte languages (such as Chinese), the attribute must be set to UCS-2. The attribute sms.message.chunksize should be set accordingly (that is, the chunksize should be no more than 160 if the encoding is IA5; no more than 70 if the encoding is UCS-2).

  • sms.local.port

    The local port the driver should use to make the outgoing connection, applicable to the non-listening mode driver.

  • sms.local.address

    The logical hostname or IP address where the driver runs, applicable to the non-listening mode driver.

  • sms.window.size

    The windowing size, applicable to the non-listening mode driver only. The default size is 1. This parameter usually applies to MULAs. Contact the SMSC administrator if you want to set it to a number other than 1.

  • sms.receiver.listener.port

    If the driver is in listening mode, this port is used by the SMSC to initialize the TCP/IP connection to pass received messages to the driver. If the sms.server.url is specified, this one will be used. Otherwise, it will be ignored.

  • sms.server.url

    This is the URL for the driver to access the SMSC to send messages through an HTTP connection. If specified, sms.server.host and sms.server.port will be ignored. If it is not specified, then sms.server.host and sms.server.port are required.

  • sms.bulk.sending

    Determines whether to use command 02 to do bulk sending (if it is possible). The default value is true.

  • sms.message.maxchunks

    This is the maximum chunks for any single message allowed. Chunks after this number are ignored. The default is -1, which means no limit.

  • sms.message.chunksize

    This is the maximum size for each chunk in byte. The default is 160.


    Note:

    • If you have a direct TCP connection to the SMSC, the driver uses Command 60 to start a session with the SMSC. This allows the driver and the SMSC to communicate with one socket connection for sending, receiving and status. In this case sms.server.url is not used.

    • If the connection you have to an SMSC is HTTP-based, then you must provide the value for sms.server.url; this is the URL the driver instance uses to send messages. Also sms.receiver.listener.port must be provided so that the driver instance opens binds to this port for incoming messages. In the HTTP connection case, sms.server.host and sms.server.port are not used.

    • sms.message.chunksize controls the size of each message in case the message total size is bigger than one SMS message. sms.message.maxchunks controls the maximum number of chunks allowed for each message. Those beyond that will be discarded.


  • sms.alert.interval

    The interval (in seconds) at which command 31 is invoked. If it is set to a negative value, command 31 will not be invoked. This command is mainly used as a signal to the SMSC to keep the connection alive when the driver is in non-listening mode.

10.6.1.15 SMPP Driver

SMPP (Short Message Peer-to-Peer) is one of the most popular GSM SMS protocols. OracleAS Wireless includes a prebuilt implementation of the SMPP driver as a driver that is capable of both sending and receiving. The driver opens one TCP connection to the SMSC as a transmitter for sending if the sending feature is enabled, another connection to the SMSC as a receiver for receiving if the receiving feature is enabled. Hence two connections (initiated by the driver) are needed for all communication between the driver and the SMSC if both sending and receiving features are enabled. This driver implements SMPP 3.4. It supports only SMSC which supports SMPP 3.4.

This driver can handle:

  • text/plain

  • ContentTypes.RING_TONE

  • ContentTypes.GRAPHICS

  • ContentTypes.WAP_SETTINGS

  • ContentTypes.WAP_PUSH

  • ContentTypes.VCARD

  • ContentTypes.E-MAIL_SETTING

  • ContentTypes.VCALENDAR

  • ContentTypes.MM1_NOTIFICATION

  • ContentTypes.EMS

  • ContentTypes.ENCODED_SMS

  • ContentTypes.URL (only if the content type of the related resource is one of above)

For other content types, the driver will throw a non-fatal driver exception.

10.6.1.15.1 Class Name
oracle.panama.messaging.transport.driver.sms.SMPPDriver
10.6.1.15.2 SMPP DRIVER--Configuration

  • sms.account.id

    This is the account ID for the SMSSC. Generally, it should be the assigned short number by the operator. This is required.

  • sms.server.host

    SMSC server information the driver uses to open a TCP/IP connection

  • sms.smpp.transmitter.system.id sms.smpp.transmitter.system.type sms.smpp.transmitter.system.password sms.server.transmitter.port

    These attributes depend on your SMSC. Along with the short number assigned to you, the operator may also give you a system ID, type, password and port for you to log in to the SMSC as transmitter (that is, to send SMS).

  • sms.smpp.receiver.system.id sms.smpp.receiver.system.type sms.smpp.receiver.system.password sms.server.receiver.port

    These attributes depend on your SMSC. The operator may also give you a system ID, type, password and port for you to log in to the SMSC as receiver (that is, to receive SMS).

  • sms.server.default.encoding

    The default encoding of the text message. The default value is IA5. For multibyte languages (such as Chinese), the attribute must be set to UCS-2. The attribute sms.message.chunksize should be set accordingly (that is, the chunksize should be no more than 160 if the encoding is IA5; no more than 70 if the encoding is UCS-2).

  • sms.local-sending.port

    The local port the driver should use to make the outgoing sending connection.

  • sms.local-receiving.port

    The local port the driver should use to make the outgoing receiving connection.

  • sms.local.address

    The logical hostname or IP address where the driver runs.

  • sms.server.source.ton

    The TON of the from-address (account id).

  • sms.server.source.npi

    The NPI of the from-address (account id).

  • sms.server.destination.ton

    The TON of the destination address.

  • sms.server.destination.npi

    The NPI of the destination address.

  • sms.window.size

    The windowing size, applicable to the non-listening mode driver only. The default size is 1. This parameter usually applies to MULAs. Contact the SMSC administrator if you want to set it to a number other than 1.

  • sms.bulk.sending

    Whether to use command submit_multi to do bulk sending (if it is possible). The default value is true.

  • sms.payload.sending

    Whether to use message_payload field for sending when short_message field is operational. The default value is false.

  • sms.message.maxchunks

    The maximum chunks a long message can be split into. Chunks after this number are ignored. A negative value means there is no limitation. The default is -1.

  • sms.message.chunksize

    The maximum size for each chunk in bytes. The default is 160.

  • sms.enquire-link.interval

    The interval in seconds that the enquire link is called. This feature is disabled if the interval is less than 0. The default value is -1.

  • sms.throttling.delay

    The delay in seconds that sending re-starts after a throttling error is received from SMSC. This feature is disabled if the delay is less than 0. The default value is 15.

  • sms.extra.error-code

    The list of comma-separated error codes that can be sent by the SMSC that require re-sending of the messages.(for example: 0x45, 0x50). By default if any error code is received as status, the message is discarded.

  • sms.bind.retry.delay

    The delay in seconds, after which the driver will wait for an enquiry link response before trying to rebind with the SMSC. This feature is disabled if the value of this parameter or sms.enquire-link.interval is less than 0. The default value of this parameter is -1.

  • sms.registered.delivery.mark

    The driver may set the registered-delivery flag when sending a message to the SMSC based on the requirement of the application. However, the SMSC may not support all valid flags. In this case, this mark can be used to disable certain flag bits so that the sending request is not rejected by the SMSC.

  • sms.wireless.network

    The type of network used to send SMS. The valid values for this field are GSM or CDMA. The default value is GSM.

  • sms.priority.allowed

    Designates the highest priority allowed for a message. The valid values for this field are from 0 to 3. The default value is 0.

10.6.1.16 Fax Driver (RightFax)

This driver supports Fax messages and supports the RightFax (by Captaris) FAX protocol. The driver depends on the RightFax software package and the availability of a RightFax Fax server to deliver fax messages. This driver is capable of only sending messages.

To use this driver, you must include the RightFax Java library in your classpath. To do so, modify the ORACLE_HOME/opmn/conf/opmn.xml file.Add the RightFax library to the CLASSPATH attribute for the wireless component.

This driver can handle any content type. It recognizes the following MIME types:

  • text/plain

  • application/msword

  • application/msexcel

  • application/msppt

  • application/postscript

  • application/octet-stream

In the case of the ContentTypes.URL, the driver retrieves the content from the specified URL. The content and MIME type returned by this operation become content and MIME type sent to the fax server.

10.6.1.16.1 Class Name

oracle.panama.messaging.transport.driver.fax.RightFAXDriver

10.6.1.16.2 Configuration

  • server.url

    URL to the RightFax server. This is required.

  • server.account

    Account name to the RightFax server. This is required.

All the default attributes below are optional. They are used to customize the cover sheet only.

  • server.coverpage

    The cover page to be used by this driver. If not specified, then the default cover page of the fax gateway will be used.

  • default.sender.name

    The default sender name to be shown on the cover page.

  • default.sender.corporation

    The default sender corporation to be shown on the cover page.

  • default.sender.fax

    The default sender's fax number to be shown on the cover page.

  • default.sender.phone

    The default sender's phone number to be shown on the cover page.

  • default.sender.address

    The default sender's address to be shown on the cover page.

  • default.sender.notes

    The default sender's notes to be shown on the cover page.

  • server.coverpage

    The RightFAX driver requires a coverpage setting to render the coverpage. The coverpage is under a coverpage directory of the RightFAX server. This parameter should be set to the filename of the coverpage you want. If this parameter is not set, the default coverpage of the fax server is used.

10.6.2 How to Develop New Drivers

The driver interfaces are intended for the implementation of drivers for particular protocols. As explained above, drivers can be plugged into the transport system rather easily, extending network protocol support to the base product. A driver is expected to be a very thin layer and handles only the protocol-specific details. It is not designed to handle life cycle, load balancing or scalability issues. The transport system handles these issues.

The transport system initializes and destroys driver instances by respectively calling the init() and destroy() methods as specified in the Interface Driver. The transport system also handles load balancing and concurrence. A driver should just focus on interpreting the semantics of a particular protocol, leaving all others to the transport system.

Figure 10-14 Driver Life cycle

Description of Figure 10-14  follows
Description of "Figure 10-14 Driver Life cycle"

A driver can be capable of only sending, or receiving, or both. To implement the sending semantics, a driver only implements the send() methods as specified in the interface Driver. Receiving is a bit more complex in that the action to receive is driven by the transport. To implement receiving, a driver fills in the logic to receive in the receive() method specified by the Driver interface. The transport will continuously invoke the receive() method throughout the life cycle of the driver instance.

Drivers should be designed to be instance thread safe, or their usage must be clearly conveyed to system administrators so that proper configurations can be set to not thread the driver instance.

The key classes and interfaces required for developing the SMS driver interface to work with OracleAS Wireless are listed below.

10.6.2.1 Class oracle.panama.messaging.transport.TransportLocator

The class TransportLocator defines interfaces that provide initial access to both the messaging interface and the driver interface. Two key methods defined for this class are:

  • getDriverController() returns an instance for the use of the driver interface

  • getMessagingController() returns a Controller instance for the use of the messaging interface

10.6.2.2 Interface oracle.panama.messaging.transport.Driver

This is the main interface for developing drivers for a particular protocol. You develop a driver by implementing the Driver interface. Your component is a qualified OracleAS Wireless driver if it implements this interface.

10.6.2.2.1 The init() and destroy() methods

These methods control the life cycle of the driver instance. The initialization properties passed to the init method are those specified through the OracleAS Wireless Tools configuration framework.

The init() method returns an initialization status, which can be one of:

Driver.FAILED, Driver.SEND, Driver.RECEIVE
Driver.SEND_RECEIVE.

Ensure that the status returned is consistent with those configured through OracleAS Wireless Tools. If different, then the value of the status returned here and that configured through the webtool will be used.

10.6.2.2.2 The send() method

Drivers implement this method to perform whatever is appropriate for their particular protocols to send out messages. The content to be delivered is stored in the Message object passed onto the send() method, while the address parameter specifies one or more recipients to deliver the message to.

Further, the driver is expected to return a unique ID for each message, or identifies one for each of the recipients. These IDs are used by the transport to query the status of the delivery when necessary.


Note:

All classes mentioned below assume that you are using the oracle.panama.messaging.transport package, unless otherwise specified.

The driver must return a null message ID to make the transport retry. Exceptions thrown out of the send method are caught, and logged as sending statuses. If the send () method throws any exception, the transport will not retry. If the send () method throws an exception of the type DriverException, the exception code is checked. If the code of the exception is marked fatal, the sending capability of this driver instance is revoked.

  • If the exception is not marked fatal, the driver will still be used to send other messages.

  • If the exception is not of the type DriverException, the driver will be used to send other messages as well.

Before a driver throws a non-fatal DriverException, the driver will try to recover. For example, if a TCP/IP connection is dropped, the driver tries to reconnect it without throwing an exception. If the driver does throw a non-fatal exception without trying to recover, the transport will keep sending messages, which will fail since the error is not recovered. This will decrease performance of the system, especially when the load is heavy.

10.6.2.2.3 The receive() method

Drivers implement this method to perform whatever is appropriate for their particular protocols to receive messages and/or status reports.

As mentioned above, the transport drives the operation. Normally the driver is expected to return from this method once a message is received. Controlled is yielded back to the transport regularly so that the transport can evaluate the next best step.

The receive() method is called continuously by the transport. Hence it is preferable the receive() method blocks if it does not receive any messages. However it should not block indefinitely otherwise it will be considered a runaway operation and the thread that calls the receive will be terminated. The elapsed time for runaway threads can be configured by setting Maximum Execution Time per Request under runtime configuration (default is 60 second). When a message is received, it should call the onMessage method of the Message Listener to submit the message (or, the onStatus callback on the Status Listener if the message was a status report). The method can throw an exception of type DriverException and mark it as fatal to request that the transport stop calling the receive () method. The reason for this design is to simplify the logic and thread control of the driver.

10.6.2.2.4 The getStatus() method

The transport calls this method in an attempt to retrieve delivery status for a particular message when necessary.

10.6.2.2.5 The queryTracking() and queryNotifying() methods

With some protocols, an active poll to the external service must be performed to check the status of messages previously sent. These methods are called by the Transport to determine whether a getStatus() must be issued to retrieve status, or the driver would pass status back to Transport without such call (typically the driver calls onStatus() inside receive() ).

10.6.2.3 Interface oracle.panama.messaging.transport.DriverController

Provides an entry point into other driver-related utilities and interfaces such as Message Listener. You can get an instance of the DriverController by calling the getDriverController() method of the Locator.

Figure 10-15 Flow of Message and Status

Description of Figure 10-15  follows
Description of "Figure 10-15 Flow of Message and Status"

10.6.2.3.1 The getMessageListener() and getStatusListener() methods

These methods return the Transport callback instances for the receiving messages or status. You typically call the onMessage() or onStatus() methods within your implementation of the receive() method in the Driver interface to pass on messages and status to the Transport system respectively.

10.6.2.4 Interface oracle.panama.messaging.transport.GSMSmartMSGEncoder

If your implementation must process GSM smart message delivery (such as OTA WAP provisioning, ring-tone, graphics), you will find this interface useful. OracleAS Wireless includes a default implementation of this interface, which can be located by getting the value for the property wireless.messaging.gsmsms.encoder.class. The default implementation handles OTA WAP provisioning, ringtone, and graphics for Nokia and Ericsson handsets.

If you would want to extend the base capability, you can do so by developing your own implementation by extending this interface. Once done, you should configure the transport property wireless.messaging.gsmsms.encoder.class to include the value of the class of your implementation.

10.6.2.4.1 The encode() method

This is the only method needed for the interface. The parameters indicate the type (ringtone, graphics), model (Nokia, Ericsson) and all the attributes relevant to the requested type.

You process the information and return encoded messages in a form of GSMSmartMsg, which is the fragments for the message and some specific smart message information.

It might happen that either the type, model or other item are not supported by your implementation. In this case, you have two choices:

  • Throw a Transport exception when you know how to handle it and are sure that user data are corrupted or improper. In this case, the smart messaging process (not the physical Java process) terminates.

  • Do not throw an exception, just return null when you do not know how to handle it.

In this case, the prebuilt SMS drivers (such as UCP driver, SMPP driver) will fall back to the default implementation of the GSMSmartMsgEncoder to see if it can handle the situation. This depends on whether a driver is developed with the correct semantics. If you are focused on extending the capabilities of the GSMSmartMsgEncoder, follow this convention to allow maximum utilization of your development.

10.6.2.5 Interface oracle.panama.messaging.transport.MessageListener and StatusListener

You obtain instances of these interfaces by calling the appropriate methods in the DriverController interface.

They are typically used within your implementation of the receive() method in the Driver interface to inform the availability of messages or status to the Transport system.

10.6.2.6 Class oracle.panama.messaging.common.Message

The message class is used to capture the content to be delivered or received. It is comprehensive, and has an expressive power similar to e-mail. It supports multi-part messages and allows mime types to be associated with the content.

However, how to deal with the particular parts or MIME types is left for the implementation of the drivers.

You will find the header of the message a good place to pass information from your application to the driver if such information is not passed to the driver through the driver interface.

10.6.2.7 Class oracle.panama.messaging.common.ContentTypes

This class is not a class only for drivers. It specifies a few content types (MIME types) in addition to the standard MIME types. As driver implementers, you might encounter these MIME types. How to deal with these MIME types is left to the individual driver, but it is critical that you are aware of them.

10.6.2.8 Properties of the driver

While adding a driver to the OracleAS Wireless using OracleAS Wireless Tools, a set of properties must be specified, as listed in Table 10-9.

Table 10-9 Driver properties

Name Description

NameRequired property

A discretionary name for the driver.

ClassRequired property

The class that implements the driver.

Delivery CategoryRequired properties

The supported categories of transport it supports, such as SMS, e-mail.

Protocol

The particular protocol the driver transmits, such as SMPP or UCP. This is optional. Default is "*", meaning all of the possibilities.

Carrier

The carrier the driver can support, such as Cingular, Telia. This makes sense particularly in the SMS area and is optional. Default is "*", meaning all the possible carriers.

Speed

Speed of the driver. This can be used to improve load balancing. This is optional, with possible value ranging from 0-10. Default is 0 (slowest).

Cost

Cost to use this driver. This can be used to improve load balancing. This is optional, with possible value ranging from 0-10. Default is 0 (most inexpensive).

Capabilities

Whether the driver can send, receive or both. This is optional defaulted to send only.

Encoding, locale

Not used.


10.6.2.9 Custom properties for a driver

When installing a driver, custom properties can be specified for the driver to function. For example, for an e-mail driver to work, it might need to have a property for the imap hostname. The driver can be coded to expect a property of, say, name imap.hostname. When adding a driver through OracleAS Wireless Tools, one can specify any number of property names. When creating the driver instances, the specific values of such a property can be provided. For example, out of the same driver code, one can install two e-mail driver instances, each provided with imap hostnames to two distinct IMAP servers.

These custom properties are passed into the driver instance when init() is called. Example 10-7shows an example. In addition to the set of custom properties, some OracleAS Wireless site-level properties are also passed implicitly, they are:

  • wireless.log.directory

  • wireless.firewall.http.use.proxy

  • wireless.firewall.http.proxy.host

  • wireless.firewall.http.proxy.port

  • wireless.firewall.http.non.proxy.hosts

  • wireless.firewall.ftp.use.proxy

  • wireless.firewall.ftp.proxy.host

  • wireless.firewall.ftp.proxy.port

  • wireless.firewall.authentication.set

  • wireless.firewall.authentication.username

  • wireless.firewall.authentication.password

Example 10-7 Sample Driver

// Copyright (c) 2001 Oracle Corporation. All rights reserved.
package oracle.panama.messaging.transport.driver.sample;
/**
* A SimpleDriver class.
* <P>
* @author Oracle Corporation
*/
import Java.util.Properties;
import Java.net.ServerSocket;
import Java.net.Socket;
import Java.io.BufferedReader;
import Java.io.PrintStream;
import Java.io.InputStreamReader;
import Java.io.IOException;
import Java.io.PrintWriter;
import Java.io.FileOutputStream;
import Java.text.SimpleDateFormat;
import oracle.panama.messaging.transport.*;
import oracle.panama.messaging.common.*;
import oracle.panama.model.DeliveryType;
import oracle.panama.util.MessageCatalog;
import oracle.panama.core.admin.L;
 
/**
* A Simple driver
*
* @author ashah, jxiang
*/
public class SimpleDriver implements Driver {
private String mCompanyName;
private String mDeliveryType;
private String mVersion;
private PrintWriter log = null;
 
/**
* Initialize the driver.
*
* @param properties the driver's properties.
* @return the initialization status.
*/
public int init(Properties properties) {
// get the locator instance and various listeners
TransportLocator locator = TransportLocator.getInstance();
DriverController manager = locator.getDriverController();
mMessageListener = manager.getMessageListener();
mStatusListener = manager.getStatusListener();
// read pr operties
mCompanyName = properties.getProperty("company-name");
// delivery type is needed. Use SMS
mDeliveryType = DeliveryType.SMS.getName();
mVersion = "1.0";
int status = Driver.FAILED;
try {
String logName = properties.getProperty("logfile");
if (logName == null)
logName = new String("SimpleDriver.log");
log = new PrintWriter(new FileOutputStream(logName, true ) );
} catch(Exception e) {
e.printStackTrace();
return status;
}
log ("initialized: " + new Java.util.Date());
mPort = Integer.parseInt(properties.getProperty("port"));
mDelay = 20000; // 20 seconds
mMessage = new Message();
mSemaphore = new Object();
status = Driver.SEND_RECEIVE; // TODO - verify the return code
mStatus = new Status();
log ("init complete");
return status;
}
 
/**
* Destroy the driver.
*/
public void destroy() {
try {
log ("destroy");
mServerSocket.close();
mReader.close();
mWriter.close();
log ("destroy comp lete");
}
catch (Exception e) {
}
}
 
/**
* Get the accepted attributes of the driver.
*
* @return the accepted attributes of the driver.
*/
public Parameter[] getParameters() {
Parameter[] parameters = new Parameter[3];
parameters[0] = new Parameter("company-name", "a company name", true, null);
parameters[1] = new Parameter("logfile", "the log file name", false, "SimpleDriver.log");
parameters[2] = new Parameter("port", "the listening port of the driver", true, null);
return parameters;
}
 
/**
* Get the version of the driver.
*
* @return the version of the driver.
*/
public String getVersion() {
return mVersion;
}
 
/**
* Get additional information of the listener.
*
* @return the information of the listener.
*/
public String getInfo() {
return "Simple Driver";
}
 
/**
* Send a message to a single address with this driver.
*
* @param address the address to send to.
* @param encoding the encoding of the device.
* @param tracking the tracking level.
* @param expiration the expiration time.
* @param reliability the reliability level.
* @param priority the priority level.
* @param fromAddr the from-address.
* @param replyToAddr the reply-to-address.
* @param mid a unique message id can be used to generate return message id.
* @param message the message to send.
* @return a unique message id, null if failed.
*/
public String send(String dtype, String address, int mode, String encoding,
int tracking, int expiration, int reliability, int priority, String fromAddr,
String replyToAddr, String mid, Message message) {
log ("send: " + address + " => " + message.getContent());
String id = null;
try {
id = mid + ':' + address;
mWriter.println(id);
mWriter.println(message.getContent());
mWriter.flush();
}
catch (Exception e) {
// no t synchronized, it works for this toy.
mWriter = null;
mReader = null;
id = null;
}
log ("sent id: " + id );
return id;
}
/**
* Send a message to a list of addresses with this driver.
*
* @param addresses the addresses to send to.
* @param encoding the encoding of the device.
* @param tracking the tracking level.
* @param expiration the expiration time.
* @param reliability the reliability level.
* @param priority the priority level.
* @param fromAddr the from-address.
* @param replyToAddr the reply-to-address.
* @param mid a unique message id can be used to generate return message id.
* @param message the message to send.
* @return a list of unique message ids, null if failed.
*/
public String[] send(String dtype, String[] addresses, int[] modes, 
String encoding, int tracking, int expiration, int reliability,
int priority, String fromAddr, String replyToAddr, 
String mid, Message message) {
String[] ids = null;
log ("send: mult iple => " + message.getContent());
try {
int count = addresses.length;
ids = new String[count];
String id = mid + ':' + addresses[0];
ids[0] = id;
mWriter.print(id);
for (int i=1; i<count; i++) {
id = mid + ':' + addresses[i];
ids[i] = id;
mWriter.print(',' + id);
}
mWriter.println();
mWriter.println(message.getContent());
mWriter.flush();
}
catch (Exception e) {
// no t synchronized, it works for this toy.
mWriter = null;
mReader = null;
ids = null;
}
log ("sent multiple");
return ids;
}
 
/**
* Send a message to a list of addresses with this driver.
*
* @param dtypes the delivery types for all destinations
* @param addresses the addresses to send to.
* @param modes the delivery modes
* @param encoding the encoding of the device.
* @param tracking the tracking level.
* @param expiration the expiration time.
* @param reliability the reliability level.
* @param priority the priority level.
* @param fromAddr the from-address.
* @param replyToAddr the reply-to-address.
* @param mid a unique message id can be used to generate return message id.
* @param message the message to send.
* @return a list of unique message ids, null if failed.
*/
public String[] send(String[] dtypes, String[] addresses, int[] modes,
String encoding, int tracking, int expiration, int reliability, 
int priority, String fromAddr,String replyToAddr, String mid,
Message message) throws DriverException {
String[] ids = null;
int count = addresses.length;
log (" send: " + count + " recipients : " + message.getContent());
ids = new String[count];
for (int i=0; i<count; i++) {
ids[i] = send(dtypes[i], addresses[i], modes[i], encoding, tracking,
expiration, reliability, priority, fromAddr,
replyToAddr, mid, message);
}
return ids;
}
 
/**
* Get the sending status of a message. The
* status got by this call should be reported
* the transport system via the driver listener
* onStatus callback.
*
* @param mid the id of the message.
*/
public void getStatus(String mid) {
}
 
/**
* Get the sending statuses of a list of messages.
* The statuses got by this call should be reported
* the transport system via the driver listener
* onStatus callback.
*
* @param mids the ids of these messages.
*/
public void getStatus(String[] mids) {
}
 
/**
* Check if query is required to get the notification.
*
* @return true if required, false otherwise.
*/
public boolean queryNotifying() {
return false;
}
 
/**
* Check if query is required to track the
* sending status.
*
* @return true if required, false otherwise.
*/
public boolean queryTracking() {
return false;
}
 
/**
* Receive a message/status. If any message/status
* is received, the driver should use the onMessage/
* onStatus callbacks of the driver listener (got
* via the controller) to report it to the transport
* system. This method should do something if the
* initization status has the RECEIVE ability.
*/
public void receive() {
log ("receive started");
synchronized (mSemaphore) {
try {
if (mServerSocket == null) {
try {
mServerSocket = new ServerSocket(mPort);
mServerSocket.setSoTimeout(mDelay);
}
catch (IOException ioe) {
mServerSocket = null;
mSocket = null;
throw ioe;
}
}
if (mSocket == null) {
try {
mSocket = mServerSocket.accept();
mSocket.setSoTimeout(mDelay);
}
catch (IOException ioe) {
mSocket = null;
throw ioe;
}
}
if (mReader == null) {
mReader = new BufferedReader(
new InputStreamReader(mSocket.getInputStream()));
mWriter = new PrintStream(mSocket.getOutputStream());
}
String buf = mReader.readLine();
log ("receive read: " + buf);
if (buf.charAt(0) == '*') {
String address = buf.substring(1);
mMessage.setContent(mReader.readLine());
DeviceInfo info = new DeviceInfo();
info.setDeliveryType(mDeliveryType);
info.setEncoding("7b");
String from = "FROM-ME-TODO";
mMessageListener.onMessage(from, info, address, mMessage);
log ("message sent to message listener");
}
else {
mStatus.setContent("received");
mStatusListener.onStatus(buf.substring(1), mStatus);
log ("status sent to status listener");
}
}
catch (IOException ioe) {
mReader = null;
mWriter = null;
}
}
}
 
/**
* write to message log
*
* @param message string
*/
void log(String message) {
if( log != null ) {
synchronized( log ) {
String currentTime = new SimpleDateFormat(
"yyyy-MM-dd HH:mm:ss").format( new Java.util.Date() );
log.println(currentTime + " " + message);
log.flush();
}
}
}
 
private Socket mSocket;
private Object mSemaphore;
private ServerSocket mServerSocket;
private MessageListener mMessageListener;
private StatusListener mStatusListener;
private BufferedReader mReader;
private PrintStream mWriter;
private Message mMessage;
private Status mStatus;
private int mDelay;
private int mPort;
}

10.6.3 Upgrading OracleAS Wireless 9.0.2x Drivers

Since the OracleAS Wireless 9.0.2x driver interface is not compatible with the 9.0.4 driver interface, 9.0.2x drivers must be upgraded to work with the 9.0.4 Transport Server (9.0.4 drivers must be downgraded to work with the 9.0.2x Transport Server.). The included prebuilt drivers have been upgraded and work with the current release. Only customer-developed, 9.0.2x drivers are affected. This section shows you how to upgrade your 9.0.2x drivers.

The main differences between the 9.0.2x driver interface and 9.0.4 driver interface are:

  • one method getParameter() was added

  • all three send() methods are changed

  • several new attributes were added to the parameter list

10.6.3.1 New and Changed Methods

  • The getParameter() method

    This method lists the attributes the driver accepts. It can be called to get the accepted attributes information dynamically.

  • The send() methods

    These methods are enhanced to pass more parameters from the Transport to the driver; none of the original parameters have been removed, making it very easy to upgrade the 9.0.2x drivers. The newly-added parameters are useful, but they are not required. The newly added parameters include priority, message ID (mid), and expiration. The priority is the priority level of the message. Its possible values are defined in MessageInfo as constants. The message ID is a unique message ID that can be used as a seed by the driver to generate unique return message IDs. Generally, the driver can use this message ID (appended with the destination address) as the return message ID. The expiration is the time in seconds when the message will expire. If the value is less than or equal to zero (0), the message will not expire. See the Java doc of the new driver interface more information on the newly added parameters.

To upgrade your 9.0.2x driver, you just must:

  1. Add the new getParameter() method.

  2. Modify all three of your send() methods to use the latest signatures.

10.6.4 Customizing (Extending) the Transport Server and Hooks

Applications can install hooks that are invoked during message sending and receiving depending on the type of hook. All hooks are optional. Typically the hooks are passed all of the information the application specifies and can do what ever is appropriate. Hooks are useful in providing routing information, and perform other custom logic in some cases.

There are two main categories of hooks:

  • Named hooks--only at most one hook for each kind, and can be added only through OracleAS Wireless Tools configuration.

  • General hook--There are four kinds of general hook. They are: pre-send, post-send, pre-receive, post-receive. There can be none or multiple hooks for each kind and they can be added and removed either through the OracleAS Wireless Tools or programmatically through methods available on the Messenger interface.

No default hook is provided for the product.

10.6.4.1 Named Hooks

  • DriverFinder--(interface oracle.panama.messaging.transport.DriverFinder). The expected semantics of this hook is to fill in the driver name for a delivery request.

  • CarrierFinder--(interface oracle.panama.messaging.transport.CarrierFinder). This hook is a named hook that can be configured through OracleAS Wireless Tools. The expected semantics of this hook is to locate a carrier for a given device address. The carrier information is then used by the DriverFinder or the transport system to perform routing. It is generally called once per message. There can be only one hook of this kind.

  • SmartMsgEncoder (interface oracle.panama.messaging.transport.SmartMsgEncoder). This hook is used to encode GSM and/or CDMA smart messages. In 9.0.2.x releases, this hook is called GSMSmartMsgEncoder. It supports GSM smart message encoding only. This interface is extended in this release to support both GSM and CDMA smart messages; however, the semantics are unchanged. If a hook can not encode a message, it should return null to indicate this fact so that other encoders will be invoked until a proper encoder is found. The previously-shipped encoder will be upgraded to the new interface. To upgrade your implementation from 9.0.2.x to this release, change the class definition from implements oracle.panama.messaging.transport.GSMSmartMsgEncoder to extends oracle.panama.messaging.transport.SmartMsgEncoder, and change the method name encodeSmartMsg to encodeGSMSmartMsg.

10.6.4.1.1 OracleAS Wireless Messaging System

  • FailOverHook--(interface oracle.panama.messaging.transport.FailOverHook). This hook is for future use.

10.6.4.2 General Hooks

  • PreSendingHook (interface oracle.panama.messaging.transport.GeneralHook). This hook is called before sending any message.

  • PostSendingHook (interface oracle.panama.messaging.transport.GeneralHook). This hook is called after sending any message.

  • PreReceivingHook (interface oracle.panama.messaging.transport.GeneralHook). This hook is called before passing any received message to the listener.

  • PostReceivingHook (interface oracle.panama.messaging.transport.GeneralHook). This hook is called after passing any received message to the listener.

10.7 Supporting Premium SMS and Reverse Charge SMS

SMS phones are one of the major devices Async is targeted to serve. Within the SMS segment, a popular billing model is Premium SMS. It is similar to the 900 model of voice phone translated into SMS. SMS phones send a message (with all the service-required information) to a short number (termed as Large Account). The message is routed to the content provider, which has their system set up to listen to the SMS message sent to the number. The user request is processed and the result is sent back to the device. The end-user is charged a service premium rate on top of the typical SMS transport rate for the request message issued from the mobile device. The premium varies depending on the types of service to be invoked. The request charge is reflected on the subscriber's existing SMS phone bill. At the end of the billing cycle, the premium will be split between the Carrier (Premium SMS operator), and the content provider. Figure 10-16, "Premium SMS Process" illustrates the process.

Figure 10-16 Premium SMS Process

Description of Figure 10-16  follows
Description of "Figure 10-16 Premium SMS Process"

To access a Premium SMS service, a mobile user sends a message to a Large Account (Async address in OracleAS Wireless terminology) with a keyword (Async short name in OracleAS Wireless terminology) to identify the service. A predefined service premium (associated with the Large Account) is charged to the mobile subscriber when the request message is sent from the device to the network of the Premium SMS operator. The content provider invokes the corresponding service identified by the service keyword once it receives the message. The service result is sent back to the mobile subscriber through another SMS message.

Figure 10-17 Reverse Charge SMS

Description of Figure 10-17  follows
Description of "Figure 10-17 Reverse Charge SMS"

Reverse Charge SMS is a billing model which charges the service premium to the mobile subscriber on the Result SMS message. The service premium of the request depends on which service a mobile user accesses. Each service has a tariff class associated with it. Once the Service Provider generates the service result, it also supplies the Reverse Charge SMS operator with the required information so the operator is able to record the billing transaction correctly.

10.7.1 Premium SMS and Reverse Charge New Features

To properly support the Premium SMS and Reverse Charge model on OracleAS Wireless, the following new features have been added:

  • A grouping object, named Service Category, has been created to classify services. This group represents a set of services which share some logical similarities. For example, Premium SMS services having the same premium level can be put into a Service Category.

  • Each Access Point (for example: Async address) can be optionally associated with one or more Service Categories. This binds an OracleAS Wireless access point to the set of services it allows access to. Any attempt to invoke a service outside the access point associated with the service set introduces a service invocation failure. In the case of Premium SMS, an Async address representing a Large Account can be mapped to a set of Service Categories which reflect the premium level of the Large Account. This association provides the model for request authorization based on premium levels between the services and the access point. A request sent to a Large Account having a premium level of 10 cents, will not be allowed to access a service that has a higher premium. The creation of a Service Category, and the association of services and access points can be done through OracleAS Wireless Tools.

  • A set of Routing Information Parameters have been added as part of Async application attributes. Billing information (such as Large Account) can be associated with the service so the value is sent back (as the message header) with the result message. The information is carried over to the Messaging driver, and eventually to a Premium SMS or Reverse Charge SMS operator so the message will be charged through the correct account.

  • The Routing Information is implemented as a Preset. A pre-seeded Preset Definition, called _MESSAGE_ROUTE_, is included with a standard installation. The administrator is able to edit the Preset Definition to add, modify or remove fields to custom fit their own requirements. This gives users added flexibility to define result message attributes.

10.7.2 Enabling Premium SMS Services

To make an OracleAS Wireless service Premium SMS-enabled, follow the steps below. For a more detailed step-by-step walk-through, see OracleAS Wireless Administrator's Guide.

  1. Create an Access Point using Enterprise Manager with the flag Allowed to Access All Applications unchecked. The address value of the Access Point should be the Large Account provided by the Premium SMS operator.

  2. Create a Service Category using OracleAS Wireless Tools, and associate it with the Access Point created above. This object groups all the services that are accessible to the Access Point.

  3. Assign all Async applications (accessible to the access point) to the newly created Service Category.

  4. Optionally, edit the pre-seeded _MESSAGE_ROUTE_ Preset Definition so that each portal is able to customize the message headers to be sent to the SMS driver as the billing information for the result message. For instance, the description of ROUTE_COST_LEVEL can be changed from Cost level to Tariff class. Those meta fields can also be added or deleted.

    By default, the values of the two fields, ROUTE_CHANNEL and ROUTE_REV_CHANNEL, are set to From and ReplyTo fields of the result message. This allows the information to be passed to the Premium SMS operator without requiring a custom-built driver. If the administrator needs to change the mapping, he should modify the two attributes, wireless.async.routeinfo.to and wireless.async.routeinfo.replyto.

  5. Using Content Manager, add SMS routing information to all Premium SMS-enabled applications. A typical example is to assign the value of the Large Account, which the reply message should be charged on, to the Channel field.