![]() |
XML for wireless devices | Table of contents | Indexes | Data gathering using wireless technologies | ![]() |
|||
Mobile commerce and WML |
| Rytkönen, Kimmo |
| Kimmo Rytkönen |
| Consultant |
Finland ![]() Kuopio TietoEnator Oyj | TietoEnator Oyj,
Teletie 4 Kuopio 1779 Finland Phone: +358 17 6850 303 Fax: +358 17 6850 105 email: kimmo.rytkonen@tietoenator.com web site: www.tietoenator.com |
| Biography |
| VTT | Kimmo Rytkönen - is a consultant at TietoEnator Services / Wireless Solution unit carrying out development projects in the fields such as XML technology, information security, mobile and Internet techniques. For the past ten years he has worked in various SGML/XML projects atVTT with the main focus on making the SGML/XML technology available to various industries, e.g. forest, metal, energy, process, telecommunications, publishing, aviation and pharmaceutical industries. Before joining TietoEnator he worked at Nokia Networks where he participated in customer documentation development projects as an SGML specialist and a project manager. |
| Kimmo Rytkönen has spoken at the following SGML/XML conferences: SGML Europe'96; SGML Europe'97; SGML Finland'96; SGML Finland'97 and XML Finland'98. |
| Abstract |
WAP ![]() | The enabling technology to bring Internet content and services to mobile phones and other wireless terminals is calledWAP . The similar technology in Japan is called iMode. The WAP is a global industry standard published by the WAP Forum. People have compared WAP to the World Wide Web. It enables the information content to be distributed and displayed in mobile terminals such as World Wide Web enabled the access to Internet. |
WML ![]() | This article describes the basics how a person can access Web content or any knowledge base on Internet using a mobile phone. The basics of theWML language is also presented. |
Mobile commerce |
| Potential markets for wireless services and applications are huge, not only in Finland. Every Internet service provider could establish a service platform that serves Web content to mobile users. It is said that every company will have an own WAP home page as they have now a home page in the Web. |
Technology behind mobile commerce |
| GPRS, General Packet Radio Service | The ever-developing mobile infrastructure is bringing new business possibilities. The new technologies such asGPRS andUMTS supports increased data transmission capacity in the enhanced mobile infrastructure. The current GSM based transmission capacity of 9.6Kbit/s is suitable only for text based transmissions such asSMS . This is not enough for any multimedia data transmission. The GPRS technology allows 114Kbit/s and UMTS allows up to 2Mbit/s data transmission speed. The third generation technology supports faster transmission speed and therefore any multimedia data can be transmitted over wireless network. This technology enables completely new services for mobile phone users. For example, the Internet services can be accessed using mobile terminals such as mobile phones orPDA devices through wireless connections. |
PDA ![]() SMS UMTS | Wireless services - what they could be? |
| Wireless services could be targeted for any kind of user profile, application or interest area. Mobile phones and mobility enables nowadays something else than just making calls. The value-added services for consumer utilizes the data transmission capability of a mobile phone. The decision to purchase a mobile phone is not based entirely on phone call features but more on value-added services that the current technology supports. According to a market study for value-added mobile services , the long-run demand for mobile services can be categorized into entertainment, infotainment and transaction services and applications ( ): |
bank |
dictionary |
phonebook |
pizza order |
e-mail |
news items |
city navigation |
travelling businessman |
remote control |
gambling |
ringing tones |
stock info |
|
What is WAP? |
| The WAP is an evolving standard that accelerates mobile commerce markets. With a WAP capable mobile device someone can do business transactions like shopping, banking operations, reservations in Internet. The WAP stands for Wireless Application Protocol. WAP is a result of specification work done in WAP Forum, that is an organization represented by telecommunication and wireless technology companies that are responsible for developing and specifying protocols and guidelines to WAP application environment. WAP is an industry standard developed by a group of telecom manufactures (e.g. Nokia, Ericsson, Motorola, ...), telecom operators (Deutche Telecom, France Telecom, AT&T, ...), software companies and service providers (Microsoft, IBM, RSA, Unwired Planet, Symbian, ...). The total number of members in the WAP Forum exceeds 200. |
| SSL | WAP has been developed only for narrow-bandwith applications on wireless world. It is based on Internet standards such as XML,SSL , TCP/IP, ... It is not defined to any particular device or carrier network. At the moment of writing this article, the WAP specification 1.2 is the latest approved version. |
Development of WAP |
| A couple of years ago WAP was one proposal among many other XML applications. The technology development has enabled the WAP to become real life. The target of WAP was to bring out Web content to wireless applications. The content is encoded with a WML language. The usage of WML on mobile applications is one of the newest and promising application areas of XML and, a mobile access to company's information systems offers lots of new business opportunities. WAP can be seen as a completely new information channel for service providers and information consumers. |
Someone may ask: "We already had an HTML to represent data on the Web. Why we could not use that for data encoding in WAP applications?" There were several reasons why not to use HTML:
|
WAP architecture |
WML ![]() | How can a mobile phone user access Internet-based services? The information is transmitted between a WAP client and a WAP server. The WAP server acts as a gateway to Internet. The client (mobile terminal) and the server (WAP Server) transmits all the information in aWML format. It is an XML conforming application. The WAP client and server encodes the WML data according to a WML document type definition (DTD). The WML code may contain WMLScript as HTML code may contain JavaScript. The WMLScript language is based on the JavaScript language. |
| The mobile phone user makes a connection between the WAP client and the server through wireless digital network. The WAP client and server are responsible for establishing the session. The WAP server is responsible for managing connection requests, making requests to the Web content servers and responding to the original requests by returning the requested information back to a mobile phone user. The Web and WAP server processes, validates, and transforms the data before it is transmitted to a WAP client. The WAP client contains a WAP micro-browser that processes the WML data and displays it on mobile phone's screen. The WAP specifications does not define how the WML data is processed and rendered, it is up to device vendor's implementation ( ). |
| In addition to standard netcentric stuff like Web servers, Web applications servers, enterprise application servers, middleware solutions and, data repositories; WAP architecture needs only an access server to connect mobile network to Internet. The WAP gateway (synonym to WAP server) acts as an access server. The WAP architecture describes how WAP clients connect to Internet and how enterprise systems are accessed through Internet using wireless terminals. The WAP client makes a request to Web resources by assigning a URL to it. The request is transmitted through mobile network usingWAP protocols . The WAP client sends the request to teleoperator's remote access server that forwards the request to company's WAP gateway on Intranet or the WAP client connects to company's dial-up service that forwards the request to local WAP gateway. The WAP gateway transforms the URL request and forwards it to Web server using the HTTP protocol. The Web server interpret the request and returns the response in WML format via WAP gateway, that transforms it into binary format to a WAP client. |
Company's existing Web application service needs minor changes to support wireless access. The Web applications should adapt to client type (e.g. Web browser or WAP device) and serve content as appropriate. There are different techniques to convert data from HTML or from other legacy system format to WML. One possible solution is to use XML/XSL processing applications. To put it simply, the WAP capable environment consists of the following components:
|
WAP protocols |
WAP consists of a set of protocols. The protocols are the following (
):
|
| CDMA, Code Division Multiple Access CDPD, Cellular Digital Packet Data PDC-P USSP WDP |
|
WAP application environment |
| WAE | WAP specifiesWAE
that leverages existing Internet technology and wireless protocols. WAE is an application development and execution environment. To do that, WAE defines the following objectives
:
|
| WBMP WTAI | The logical model of WAE |
| The logical model of WAE capable environment consists of user agents, content generators and content encoders/decoders. The processing of WAP data takes place in WAE user agents. A user agent provides the end-user functionalities such as rendering data on the screen. WAE does not limit user agents only for WML and WTAI user agents but allows integration of any domain-specific agents. Also WAE does not specify the implementation of any user agent, it is vendor's responsibility. A user agent is a client-side in-device software in a mobile phone such as a microbrowser that interprets WAP messages that are constructed from WML and WMLScript. A content generator is an application on server-side that produces data to the response from a user agent in a content format that is processable by a user agent. WAE does not specify content generators. A content encoder/decoder is responsible for encoding compressed WML, bytecoded WMLScript and, WBMP image format ( ). |
|
WML and WMLScript languages |
| HDML, Handheld Device Markup Language | WML is an XML language derived fromHDML specification (version 2) by Unwired Planet. WML is designed for wireless Web environment and it does not take care of any specific device type. The language is compact and the user interface model of WML is dedicated to small screens with few press buttons. WML can be said to be a display language. WMLScript is a scripting language that can be mixed with WML to provide functionalities in the WAP application like JavaScript in HTML. |
| WML language functionalities are used for screen management of text and graphics, data input control, hyperlinks, navigation and, international support. The WML data is encoded as card entities (elements) within a one deck. The deck is said to be WML document's logical root element. It means that all data is capsulated into card elements and there may be several cards within a one deck. This card-based metaphor means also that all user interactions are split into cards and navigation occurs between cards, not between documents as happens in HTML. User navigates between cards using links between cards and one card is displayed at a time. The card contains actual data and user interface elements. The WAP client downloads a deck at a time and therefore, navigation between cards does not require server access as every HTML page. One deck with as much as possible cards minimizes the network traffic and reduce downloads ( ). |
|
Syntax of WML and WMLScript languages |
| The purpose of this article is not to introduce a WML DTD, but instead to describe the main functionalities in WML and WMLScript languages. Refer to for full description of WML DTD and for full description of WMLScript. WML syntax follows mostly the syntax in the XML specification. The syntactical constructs used in the WML are character entities, elements, attributes, comments, variables and CDATA sections. |
What type of element categories WML language consists of? |
MMI ![]() | The building blocks and functionalities of WML language can be divided into four categories: formatting, linking, input and, task properties. In the following subsections, the basics of WML language is described with code andMMI examples. MMI is described as screen captures card by card. |
Formatting properties |
| A WML page consists of a logicaldeck entity that has at least onecard element. One card element is displayed at a time and it containsid attribute for linking and navigating betweencard elements. Acard element has also atitle attribute that is displayed on the screen. |
| For text formatting there are elements like: ap element for paragraphs, atable element for tables, animg element for graphics, abr element for line breaks, anem element for italic text, astrong element for "strong" effect, ani element for italic text, au element for underlined text, abig element for bigger size text and asmall element for smaller size text. See example code and MMI ( ). |
Linking properties |
| For linking decks, there is ana element and ananchor element. The semantics of ana element is similar to HTML, but in ananchor element you may use either ago (href attribute defines the destination) or aprev (goes to previouscard element) subelement to define the link destination. See example code and MMI ( ). |
|
<?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> <!-- FILE: Formatting.wml --> <!-- Text formatting and card linking properties --> <wml> <card id="formatting" title="Formatting"> <do type="Next page"> <go href="#table"/> </do> <p align="left"> <em>WAP Toolkit</em><br/> <strong>WAP Toolkit</strong><br/> <b>WAP Toolkit</b><br/> <i>WAP Toolkit</i><br/> <u>WAP Toolkit</u><br/> <big>WAP Toolkit</big><br/> <small>WAP Toolkit</small><br/> </p> </card> <!-- Table and card linking properties --> <card id="table" title="Table"> <do type="Next page"> <go href="#graphics"/> </do> <do type="Previous page"> <go href="#formatting"/> </do> <p align="center"> <table columns="3"> <tr><td>11</td><td>12</td><td>13</td></tr> <tr><td>21</td><td>22</td><td>23</td></tr> <tr><td>31</td><td>32</td><td>33</td></tr> </table> </p> </card> <!-- Graphics, task and linking properties --> <card id="graphics" title="Graphics"> <p align="left"> Bitmap image: <img src="sunny.wbmp" alt="sunny day"/><br/> <a href="Input.wml">Input properties</a><br/> <anchor>Variable properties <go href="Variable.wml"/></anchor> <anchor>Previous page<prev/></anchor> </p> </card> </wml> |
Input and select properties |
| For enabling user input, there is aninput element, that can be used for user input. A user may also select from a pre-defined selection list using aselect element. Thename attribute ofinput andselect elements can be used as a variable across a deck or it can be given as a parameter to a link destination definition ina orgo elements. The input formatting properties can be modified with variousinput element's attributes liketype ,format andmaxlength . A different look and feel is possible with afieldset element. See example code and MMI ( ). |
|
<?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> <!-- FILE: Input.wml --> <!-- Input and linking properties --> <wml> <card id="input1" title="Input"> <do type="Next input properties"> <go href="#input2"/> </do> <do type="Task properties"> <go href="Task.wml"/> </do> <p align="left"> CD: <input name="Cd" size="12"/><br/> Artist: <input name="Artist" size="12"/><br/> Price: <input name="Price" size="12"/><br/> </p> </card> <!-- Input, card and deck linking and select properties --> <card id="input2" title="Input"> <do type="Previous input properties"> <go href="#input1"/> </do> <do type="Variable properties"> <go href="Variable.wml"/> </do> <p align="left"> Artist: <input name="Artist" title="Artist:" size="12"/><br/> Type: <select name="type" value="double" title="Type:"> <option value="single">Single CD</option> <option value="double">Double CD</option> </select> </p> </card> </wml> |
Task properties |
| The task properties are used when a certain event occurs like entering a new card or selecting a link. Typical task-type elements arego ,prev ,refresh (currentcard element is reread) andnoop (means that nothing is done). With atimer element orcard element'sontimer attribute, the page can be frozed for a defined period before further actions. Common tasks to a certaincard element is defined in ado element and common tasks to a whole deck is defined in atemplate element. See example code and MMI ( ). |
|
<?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> <!-- FILE: Variable.wml --> <!-- Variable properties --> <wml> <card id="variable" title="Variable" ontimer="WMLScript.wml"> <timer value="5"/> <p align="left"> Wait for 5 seconds ... </p> </card> </wml> |
Example of WMLScript |
| The following WAP application uses WMLScript to convert currency ( ). |
|
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<!-- FILE: WMLScript.wml -->
<!-- A WMLScript example -->
<wml>
<card id="wmlscript" title="Currency convertor">
<p>
Amount: <input format="*N" name="amount" title="Amount:"/>
From: <select name="from" value="USD" title="From:">
<option value="DEM">German Mark</option>
<option value="FRF">French Franc</option>
<option value="USD">US Dollar</option>
</select>
To: <select name="to" value="FRF" title="To:">
<option value="DEM">German Mark</option>
<option value="FRF">French Franc</option>
<option value="USD">US Dollar</option>
</select><br/>
= <u>$(conversion)</u>
</p>
<do type="accept" label="Calculate">
<go href="currency.wmls#convert('conversion','$(from)',
'$(to)',$(amount))"/>
</do>
</card>
</wml>
/* FILE: Currency.wmls
* Calculate the exchange rate
* @param varName - the variable to store the results
* @param amount - the amount to convert
* @param from - the original currency
* @param to - the currency to convert to
* @return a string containing the converted amount
*/
extern function convert(varName,from,to,amount) {
var multiplier = 0.0;
var returnString = "Not Available";
var result;
if (from == "DEM") {
var DEM_FRF = 0.298331;
var DEM_USD = 1.653500;
if (to == "DEM")
multiplier = 1.0;
else if (to == "FRF")
multiplier = DEM_FRF;
else if (to == "USD")
multiplier = DEM_USD;
} else if (from == "FRF") {
var FRF_DEM = 3.351981;
var FRF_USD = 5.542500;
if (to == "FRF")
multiplier = 1.0;
else if (to == "DEM")
multiplier = FRF_DEM;
else if (to == "USD")
multiplier = FRF_USD;
} else if (from == "USD") {
var USD_DEM = 0.604778;
var USD_FRF = 0.180424;
if (to == "USD")
multiplier = 1.0;
else if (to == "FRF")
multiplier = USD_FRF;
else if (to == "DEM")
multiplier = USD_DEM;
}
if (multiplier != 0.0) {
/* Make the calculation*/
result = amount / multiplier;
returnString = String.toString(result);
returnString = String.format("%.2f", returnString);
}
/*Return the results to the browser*/
WMLBrowser.setVar(varName,returnString);
WMLBrowser.refresh();
}
|
Conclusions |
| The success of WAP is based on available working applications, low cost WAP devices and, services that are not high-charged. Before consumers decide to purchase a WAP phone, there should be interesting services available at a low cost to serve as add-on-value services to traditional mobile phones services. It seems to that corporations should first adapt WAP technology in their business. Corporations could build mobile portals that enable employees to access corporate applications and knowledge bases anytime and anywhere. |
| The corporate portal solutions could satisfy communication needs such as e-mail services, news services and, directory services. The user may connect to content services to request specific content or information about stock markets, weather, traffic schedules or news. Company employees may access corporate knowledge bases to find information in maintenance, sales and, training support duties. |
The WAP services can be argued with the following benefits:
|
Usability issues |
WAP devices have a limited capacity and performance in memory, bandwidth and CPU processing, but there are applicable if application developers are aware the technical limitations. The technology is evolving and new improved solutions in mobile phones as well as WAP services platform area are coming.
|
| The WAP standard does not say anything how WML data should be located or rendered in a MMI. Some mobile device may process WML data differently; either not supporting certain structures such as tables or rendering same elements differently. WAP specifications do not define certain MMI link properties such asback ,forward andhome as Web browsers do. The programmer should implement that. |
The WAP protocol is limited. For example, once a user has connected to a WAP service (compare to a Web home page), he/she cannot move to an another WAP service without closing the current session and establishing a new connection manually to an another WAP service. In practis,e this means that WAP services provided by teleoperators and companies are isolated from each other and, cannot be accessed such like Web home pages.
|
| Bibliography |
|
|
|
|
![]() |
XML for wireless devices | Table of contents | Indexes | Data gathering using wireless technologies | ![]() | |||