9.4 SMS from the Back EndThe WMA enables mobile Java peers to communicate with each other via SMS. SMS is also often used to deliver enterprise information from backend servers to mobile users. For example, a stock price monitoring server could send price alerts to mobile subscribers. In some countries (e.g., China), SMS has become a major micro-payment mechanism for mobile commerce services and small scale Web sites. SMS-based transactions can be traced to individual phones and users. The wireless carriers can act as the middleman to provide user authentication and billing services.To handle SMS on server computers, we could develop a J2SE/J2EE WMA implementation that uses a modem or TCP/IP connection to interact with a wireless carrier's SMS Center (SMSC). In fact, the "Generic Connection Framework Optional Package for J2SE" (JSR 197) provides a GCF implementation for J2SE and hence allows the WMA to be ported to Java platforms beyond J2ME.But such an enterprise server-compatible WMA implementation is not available today. The following sections briefly introduce you to two Java SMS tools that are already available for enterprise markets. 9.4.1 The jSMS APIObject XP's jSMS (v1.6) package provides an easy-to-use Java SMS API. It runs on a J2SE computer (a standard PC). In order for the PC to send and receive any SMS message, it has to be connected to a general mobile phone network using one of the two following techniques:
9.4.2 The Simplewire Java SMS SDKSimplewire is a leading wireless messaging solution provider. The Simplewire Wireless Messaging Protocol Server relays messages between your server application and wireless networks. Those servers provide such enterprise features as logging, monitoring, and caching. They are also highly extendible.You can purchase and run your own messaging protocol servers. But most users can simply use the servers from Simplewire's Wireless Messaging Network, which have access to carriers of over 300 networks in 118 countries. The Wireless Messaging Network charges a usage fee that varies based on SMS message volumes.Simplewire's client SDK (v2.4) contains the necessary library and interfaces to interact with its messaging protocol servers. The SDK is available on multiple programming platforms, including Java. Please refer to the Simplewire Web site (see "Resources") for more information and code examples. 9.4.3 The Nokia Mobile Server Services SDKIf you are interested in sending and receiving MMS messages from the back end, the Nokia Server Services SDK (v1.2) is the perfect tool. The SDK include the following components.Nokia Mobile Server Services Emulator: This is a J2EE-based (JBoss, Tomcat and Axis) PC emulator for Nokia mobile servers for wireless carriers. The emulated services are the MMSC Server, Delivery Server, Presence Server and Terminal Management Server. The MMSC server is responsible for MMS messaging. This tool is essential for development since wireless carriers rarely open their live servers to developers.Nokia Mobile Server Services API and Library: This is a set of Java API libraries to access Nokia mobile servers. For the MMSC server library, it supports both Nokia's External Application InterFace (EAIF) and the 3GPP standard MM7 protocol. The API supports message composition, sending and receiving.MMS Terminal Emulator Support: This tool emulates MMS handsets on PCs. It allows developers to test MMS applications without the expensive live network.Nokia Mobile Server Services Documentation: It contains installation instruction, configuration guide and JavaDoc for the emulators and Java API libraries. Listings 9.6 and 9.7 illustrate how to send and receive MMS messages from a backend Java application. Listing 9.6. Sending an MMS message using the Nokia Java library
Listing 9.7. Receiving an MMS message using the Nokia Java library
9.4.4 Standardize the Serverside Messaging APIThe "Server API for Mobile Services: MessagingSAMS: Messaging" (JSR 212) is a community effort led by Nokia to standardize serverside SMS/MMS APIs. Its goal is to develop a high-level, protocol-independent J2SE/J2EE API for mobile messaging. Due to the abstract nature of the API, its implementation must provide a plugin framework (Service Provider Interface, SPI) that allows carriers and vendors to supply their own proprietary protocol and message handlers. The reference implementation of this specification will be provided by Nokia and licensed free of charge. The reference implementation will support common standard SMS/MMS protocols by default. This is definitely an important JSR to watch out for. |