Wireless Messaging
API (WMA)
for Java™ 2 Micro Edition
Version 1.0
JSR 120 Expert Group
JSR-120-EG@JCP.ORG
Java Community Process (JCP)
ii
Copyright © 2002 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto, California 94303, U.S.A. All
rights reserved.
Sun Microsystems, Inc. has intellectual property rights relating to technology embodied in the product that is
described in this document. In particular, and without limitation, these intellectual property rights may include
one or more of the U.S. patents listed at http://www.sun.com/patents and one or more additional patents or
pending patent applications in the U.S. and in other countries.
This document and the product to which it pertains are distributed under licenses restricting their use, copying,
distribution, and decompilation. No part of the product or of this document may be reproduced in any form by
any means without prior written authorization of Sun and its licensors, if any.
Third-party software, including font technology, is copyrighted and licensed from Sun suppliers.
Sun, Sun Microsystems, the Sun logo and Java are trademarks or registered trademarks of Sun Microsystems,
Inc. in the U.S. and other countries.
Federal Acquisitions: Commercial Software - Government Users Subject to Standard License Terms and
Conditions.
DOCUMENTATION IS PROVIDED "AS IS" AND ALL EXPRESS OR IMPLIED CONDITIONS,
REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF
MERCHANTABILITY, FITNESS FOR FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE
DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY
INVALID.
-----------------------------------------------------------------------------------------------------------------
Copyright © 2002 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto, California 94303, Etats-Unis.
Tous droits réservés.
Sun Microsystems, Inc. a les droits de propriété intellectuels relatants à la technologie incorporée dans le
produit qui est décrit dans ce document. En particulier, et sans la limitation, ces droits de propriété intellectuels
peuvent inclure un ou plus des brevets américains énumérés à http://www.sun.com/patents et un ou les brevets
plus supplémentaires ou les applications de brevet en attente dans les Etats - Unis et dans les autres pays.
Ce produit ou document est protégé par un copyright et distribué avec des licences qui en restreignent
l’utilisation, la copie, la distribution, et la décompilation. Aucune partie de ce produit ou document ne peut être
reproduite sous aucune forme, parquelque moyen que ce soit, sans l’autorisation préalable et écrite de Sun et de
ses bailleurs de licence, s’il y ena.
Le logiciel détenu par des tiers, et qui comprend la technologie relative aux polices de caractères, est protégé par
un copyright et licencié par des fournisseurs de Sun.
Sun, Sun Microsystems, le logo Sun et Java sont des marques de fabrique ou des marques déposées de Sun
Microsystems, Inc. aux Etats-Unis et dans d’autres pays.
LA DOCUMENTATION EST FOURNIE "EN L’ÉTAT" ET TOUTES AUTRES CONDITIONS,
DECLARATIONS ET GARANTIES EXPRESSES OU TACITES SONT FORMELLEMENT EXCLUES,
DANS LA MESURE AUTORISEE PAR LA LOI APPLICABLE, Y COMPRIS NOTAMMENT TOUTE
GARANTIE IMPLICITE RELATIVE A LA QUALITE MARCHANDE, A L’APTITUDE A UNE
UTILISATION PARTICULIERE OU A L’ABSENCE DE CONTREFAÇON.
iii
Contents
Preface ............................................................................................................ v
Overview ......................................................................................................... 1
javax.microedition.io ..................................................................................... 5
Connector .................................................................................................................................................... 6
javax.wireless.messaging ............................................................................. 11
BinaryMessage .......................................................................................................................................... 13
Message ..................................................................................................................................................... 15
MessageConnection .................................................................................................................................. 17
MessageListener ........................................................................................................................................ 22
TextMessage ............................................................................................................................................. 25
Appendix A. GSM SMS Adapter ............................................................... 27
Appendix B. GSM Cell Broadcast Adapter .............................................. 37
Appendix C. CDMA IS-637 SMS Adapter ................................................ 39
Almanac ........................................................................................................ 43
Index ............................................................................................................. 45
Contents
iv
v
Preface
This book provides information on the messaging API which is included in the JSR 120 Wireless Messaging
API (WMA) specification. It also describes Sun Microsystem’s reference implementation (RI) of the API.
Who Should Use This Book
This book is intended primarily for those individuals and companies who want to implement WMA, or to port
the WMA RI to a new platform.
Before You Read This Book
This book assumes that you have experience programming in the C and Java™ languages, and that you have
experience with the platforms to which you are porting the RI. It also assumes that you are familiar with the
Mobile Information Device Profile (MIDP), the Connected, Limited Device Configuration (CLDC), and the
Connected Device Configuration (CDC).
Familiarity with multimedia processing recommended, but not required.
References
GSM 03.40 v7.4.0 Digital cellular telecommunications system (Phase 2+); Technical realization of the Short
Message Service (SMS). ETSI 2000
TS 100 900 v7.2.0 (GSM 03.38) Digital cellular telecommunications system (Phase 2+); Alphabets and
language-specific information. ETSI 1999
Mobile Information Device Profile (MIDP) Specification, Version 1.0 , Sun Microsystems, 2000
GSM 03.41, ETSI Digital Cellular Telecommunication Systems (phase 2+); Technical realization of Short
Message Service Cell Broadcast (SMSCB) (GSM 03.41)
Wireless Datagram Protocol , Version 14-Jun-2001, Wireless Application Protocol WAP-259-WDP-20010614-
aWAP (WDP)
TIA/EIA-637-A: Short Message Service for Spread Spectrum Systems (IS637)
Connected Device Configuration (CDC) and the Foundation Profile, a white paper, (Sun Microsystems, Inc.,
2002)
J2ME™ CDC Specification, v1.0, (Sun Microsystems, Inc., 2002)
Porting Guide for the Connected Device Configuration, Version 1.0, and the Foundation Profile, Version 1.0;
(Sun Microsystems, Inc., 2001)
Related Documentation
The Java™ Language Specification by James Gosling, Bill Joy, and Guy L. Steele (Addison-Wesley, 1996),
ISBN 0-201-63451-1