59
APPENDIXC
Connecting to the Wireless Toolkit’sWMA Emulation Environment
The J2ME WirelessToolkit supports the Wireless Messaging API (WMA), which
enables you to send and receive SMS or CBS messages. The WirelessToolkit’s
support for messaging includes automatically assigning phone numbers to
emulators and routing messages between them. Youcan develop and test WMA
applications entirely within the WTK environment. For information on the WMA,
see http://java.sun.com/products/wma.
However,if you want to send or receive WMA messages to programs outside of
the WirelessToolkit environment, you can use the extension API that is provided
by the WirelessToolkit. By using the extension API, you can:
Send or receive SMS or CBS messages from the emulation environment in the
WirelessToolkit to or from J2SE programs outside the Wireless Toolkit
environment. This enables you to communicate through WMA messages
between MIDlets within the WirelessToolkit emulators and an external J2SE
program. This external program can provide whatever functionality you
program it to have, for example, imitating a service that responds to WMA
messages.
Create a component that acts as a messaging gateway.You can write your own
J2SE program that registers itself with the WirelessToolkit as a default gateway.
The WirelessToolkit will forward all messages from within the Wireless Toolkit
environment that do not have a recognized destination phone number to the
default gateway.This enables you to extend the Wireless Toolkit WMA
environment to other message routing environments, for example, an actual
Short Message Service Center (SMSC).
Forinformation on the extension API, see the {j2mewtk.dir }\docs\wtk\wmaBridge
directory.