Docstoc

05-WAP

Document Sample
05-WAP Powered By Docstoc
					                  Wireless Application Protocol
                                     Matthieu Weber (mweber@mit.jyu.fi), 2008



Plan
  • The WAP Architecture
  • WAP Gateways
  • WML
  • WAP 2.0

                                      The WAP Architecture
History
  • Wireless Application Protocol (WAP)
  • 1997: Phone.com, Ericsson, Motorola and Nokia form the WAP Forum (600 members nowadays)
  • Goal: create a standardized solution for accessing Internet from a mobile phone
  • 1999: First WAP phones

Why a WAP Forum?
  • cHTML in Japan, HDML in USA ⇒ multiplication of technologies
  • One standard gives higher profit than several competing private technologies

Old WAP, New WAP
  • WAP version < 1.2 are “old model”
  • WAP version 2.0 is the newer model, closer to Internet standards
  • WAP 2.0 is backward compatible with 1.X
  • WAP 1.X and 2.0 cohabit nowadays
  • WAP 1.X is disappearing

WAP Contains...
  • session
  • transaction
  • security
  • transport protocol layers
  • markup language
  • complementary applications (gateway, push, WTA)

WAP Gateway
  • Wireless protocols have different requirements than wired protocols
  • WAP uses 2 different protocols:
       – WAP on the wireless network
       – IP on the wired network
  • The WAP gateway bridges the two networks

WAP Clients
  • Main components:
       – WAP stack
       – Wireless Application Environment (WAE) User Agent (browser)
       – Wireless Telephony Applications (WTA) User Agent


MW/2008/ITKS545/WAP                                                                           1
WAP Stack
  • Application layer (WAE)
  • Session layer (WSP)
  • Transaction layer (WTP)
  • Security layer (WTLS)
  • Transport layer (WDP)
  • Various bearers protocols (network-dependent)

WAE
  • Consists of WML, WMLScript and WTA (implementations?)
  • No indication on how to implement those


WSP (1)
  • Comparable to a “binary version” of HTTP
  • Provides connection oriented and connectionless sessions
  • Connection oriented session services (uses WTP)
       – reliable data transmission
       – session can be interrupted and resumed
       – supports push (confirmed/unconfirmed)


WSP (2)
  • Connectionless session services (uses WDP)
       – unreliable data transmission
       – supports unconfirmed push
  • A session can exist even if the underlying connection is broken, and be continued using a new connection

WTP
  • 3 classes of transactions:
       – Unreliable requests (no ACK)
       – Reliable requests (with ACK)
       – Reliable requests with 1 result message (result as implicit ACK, and ACK back)


WTLS
  • Optional layer
  • Based on TLS 1.0 (based on SSL 3.0)
  • Ensures privacy, client and server authentication and data integrity
  • The WAP gateway bridges WTLS with SSL (Internet): weak point in the network

WDP
  • Wireless Datagram Protocol
  • Hides the bearers from the upper layers

Bearer Protocols
  • SMS, CSD, USSD, DECT, CDMA
  • Depends on the network, on the operator’s capabilities




MW/2008/ITKS545/WAP                                                                                            2
WAP Session
  • WSP connects to the gateway
  • Request for WML sent to the gateway
  • Translated to HTTP, sent to the server
  • Server sends the resource back to the gateway
  • Gateway translates the response to a WSP response

WAP Portals
  • Typing a URL into a mobile phone is tedious
  • WAP portal as default starting point
  • Contains links to selected WAP sites

Portals: Pros & Cons
  • Pros:
       – Easy access to numerous sites
  • Cons:
       – Not the user’s choice
       – Non-conventional sites are not referenced


                                             WAP Gateways
What For?
  • Used in WAP 1.X
  • Bridges a wireless network and an IP network
  • TCP/IP is not well suited for wireless (lot of overhead, high latency of some bearers)

Functionality
  • WAP stack
  • Access control, security
  • WSP ↔ HTTP conversion
  • Domain name resolution
  • HTML → WML conversion
  • WML content encoding, WMLScript compilation
  • Content caching

WAP Stack
                                                      WAE

                                                      WSP

                                                      WTP

                                                     WTLS

                                             WDP               UDP

                                                                IP

                                                     Bearers




MW/2008/ITKS545/WAP                                                                          3
WAP Gateway
                             Client                      Gateway                        Web Server

                              WAE

                              WSP                    WSP                                  HTTP
                                                              HTTP
                              WTP                    WTP

                              WDP                    WDP       TCP                         TCP

                             Bearer                 Bearer         IP                       IP


WAP Over SMS
                              Client                    Wireless                        Gateway
                                                        Operator
                              WAE                                                        WAE

                              WSP                                                        WSP

                               WTP                                                       WTP

                              WDP                                                        UDP

                               SMS                Radio if    Network                   Network


WAP Over CSD
                             Client         Wireless                     ISP              Gateway
                                            Operator
                             WAE                                                            WAE

                             WSP                                                            WSP

                             WTP                                                            WTP

                             UDP                                                            UDP

                              IP                                         IP                  IP

                              PPP                                  PPP
                                                    PSTN       PSTN
                            Radio if   Radio if     circuit                   Network      Network
                                                               circuit


Access Control
  • Restricts specific content (subscription services, company intranet)
  • Based on phone number (SMS bearer), IP or X.25 address (CSD, GPRS)
  • Possible user authentication (like HTTP or proxy authentication)

WSP ↔ HTTP Conversion
  • WSP supports HTTP/1.1 functionality
  • But WSP is a tokenized version of HTTP:
       • Common strings are replaced by pre-defined byte token
       • Examples:
          Accept: ↔ 0x80
          text/plain ↔ 0x83
       • Other strings remain as is




MW/2008/ITKS545/WAP                                                                                  4
Domain Name Resolution
  • Translates domain names to IP addresses
  • Done by the Web browser in a desktop, but would induce overhead on a mobile device
  • Optional if the gateway uses an HTTP proxy

HTML to WML Conversion
  • Allows to access the WWW from a Wap device
  • Does usually not give good results (unless the HTML page is designed with translation in mind)
  • How does the average web site look in a text-only browser?
  • Optional, probably not widely used

Encoding WML Content
  • WML is text (XML)
  • Encoded to a compact form before sending to the mobile device
  • Tokenization, like in HTTP ↔ WSP conversion
  • Works only with well-formed XML documents (error message otherwise)

WMLScript Compilation
  • WMLScript is compiled into a bytecode (similar to Java’s bytecode)
  • Bytecode interpreter in the mobile device
  • Compilation errors result in a simple error message

Security
  • Providing WTLS is optional
  • WTLS ↔ SSL conversion in the memory of the gateway software (no writing of the data on the disk, for
    security reasons)

Data Caching
  • Similar to proxy servers

Position of the WAP Gateway
  • Network operator’s gateway
  • Content provider gateway
  • Internet Service Provider gateway

Network Operator’s Gateway (1)
                                      Mobile Switch


                                                         1 1
                                                         0 0
                                                         1 1
                                                         0 0
                                                         00000
                                                         11111
                                                         1 1
                                                         0 0
                                                         11111
                                                         00000
                                                         0 0
                                                         1 1
                                                         1 1
                                                         0 0
                                                         11111
                                                         00000
                                                         0 0
                                                         1 1
                                                         11111
                                                         00000
                                                         0 0
                                                         1 1
                                                         11111
                                                         00000
                                                         1 1
                                                         0 0
                                                         00000
                                                         11111
                                                         0 0
                                                         1 1
                                                         11111
                                                         00000
                                                         1 1
                                                         0 0
                                                         1 1
                                                         0 0
                                                         1 1
                                                         0 0                      Internet
                                                         1 1
                                                         0 0
                                                         11111
                                                         00000
                                                         0 0
                                                         1 1
                                                         11111
                                                         00000
                                                         1 1
                                                         0 0
                                                         11111
                                                         00000
                                                         0 0
                                                         1 1
                                                         00000
                                                         11111
                                                         0 0
                                                         1 1
                                                         11111
                                                         00000
                                                         0 0
                                                         1 1
                                                         11111
                                                         00000
                                                         1 1
                                                         0 0
                                                         00000
                                                         11111
                                                         1 1
                                                         0 0
                                                         00000
                                                         11111
                                                         0 0
                                                         1 1


                                                        WAP Gateway
                                                                                    1 1
                                                                                    0 0
                                                                                    1 1
                                                                                    0 0
                                                                                    00000
                                                                                    11111
                                                                                    1 1
                                                                                    0 0
                                                                                    11111
                                                                                    00000
                                                                                    0 0
                                                                                    1 1
                                                                                    1 1
                                                                                    0 0
                                                                                    11111
                                                                                    00000
                                                                                    1 1
                                                                                    0 0
                                                                                    11111
                                                                                    00000
                                                                                    0 0
                                                                                    1 1
                                                                          HTTP      11111
                                                                                    00000
                                                                                    1 1
                                                                                    0 0
                                                                                    11111
                                                                                    00000
                                                                                    0 0
                                                                                    1 1
                                                                                    11111
                                                                      Origin Server 00000
                                                                                    1 1
                                                                                    0 0
                                                                                    0 0
                                                                                    1 1
                                                                                    0 0
                                                                                    1 1
                                                                                    1 1
                                                                                    0 0
                                                                                    11111
                                                                                    00000
                                                                                    1 1
                                                                                    0 0
                                                                                    00000
                                                                                    11111
                                                                                    1 1
                                                                                    0 0
                                                                                    11111
                                                                                    00000
                               Base Station Subsystem                               0 0
                                                                                    1 1
                                                                                    11111
                                                                                    00000
                                                                                    1 1
                                                                                    0 0
                                                                                    11111
                                                                                    00000
                                                                                    0 0
                                                                                    1 1
                                                                                    11111
                                                                                    00000
                                                                                    0 0
                                                                                    1 1
                                                                                    00000
                                                                                    11111
                                                                                    1 1
                                                                                    0 0
                                                                                    00000
                                                                                    11111
                                                                                    1 1
                                                                                    0 0



Network Operator’s Gateway (2)
  • Pro: single gateway to access the whole Internet
  • Con: WTLS/SSL conversion is not controled by the content provider


MW/2008/ITKS545/WAP                                                                                        5
Content provider’s Gateway (1)
                                   Mobile Switch

                                                                           1 1
                                                                           0 0
                                                                           1 1
                                                                           0 0
                                                                           00000
                                                                           11111
                                                                           1 1
                                                                           0 0
                                                                           11111
                                                                           00000
                                                                           0 0
                                                                           1 1
                                                                           0 0
                                                                           1 1
                                                                           11111
                                                                           00000
                                                                           1 1
                                                                           0 0
                                                                           11111
                                                                           00000
                                                                           0 0
                                                                           1 1
                                                                           11111
                                                                           00000
                                                                           0 0
                                                                           1 1
                                                                           00000
                                                                           11111
                                                     Public Switched       0 0
                                                                           1 1
                                                                           11111
                                                                           00000
                                                                           0 0
                                                                           1 1
                                                                           0 0
                                                                           1 1                        Internet
                                                       Telephone           0 0
                                                                           1 1
                                                                           0 0
                                                                           1 1
                                                                           11111
                                                                           00000
                                                                           0 0
                                                        Network            1 1
                                                                           00000
                                                                           11111
                                                                           0 0
                                                                           1 1
                                                                           11111
                                                                           00000
                                                                           0 0
                                                                           1 1
                                                                           00000
                                                                           11111
                                                                           0 0
                                                                           1 1
                                                                           11111
                                                                           00000
                                                                           0 0
                                                                           1 1
                                                                           11111
                                                                           00000
                                                                           0 0
                                                                           1 1
                                                                           11111
                                                                           00000
                                                                           0 0
                                                                           1 1
                                                                           11111
                                                                           00000
                                                                           0 0
                                                                           1 1

                                                                       Remote Access Server




                                                                                              0 0
                                                                                              1 1                1 1
                                                                                                                 0 0
                                                                                              0 0
                                                                                              1 1
                                                                                              11111
                                                                                              00000              0 0
                                                                                                                 1 1
                                                                                                                 11111
                                                                                                                 00000
                                                                                              0 0
                                                                                              1 1
                                                                                              00000
                                                                                              11111              0 0
                                                                                                                 1 1
                                                                                                                 00000
                                                                                                                 11111
                                                                                              0 0
                                                                                              1 1                0 0
                                                                                                                 1 1
                                                                                                                 0 0
                                                                                              0 0
                                                                                              1 1                1 1
                                                                                                                 00000
                                                                                                                 11111
                                                                                              00000
                                                                                              11111
                                                                                              1 1
                                                                                              0 0                0 0
                                                                                                                 1 1
                                                                                                                 11111
                                                                                                                 00000
                                                                                                                 0 0
                            Base Station Subsystem                                            11111
                                                                                              00000
                                                                                              0 0
                                                                                              1 1                1 1
                                                                                                                 11111
                                                                                                                 00000
                                                                                                                 1 1
                                                                                                                 0 0
                                                                                              00000
                                                                                              11111
                                                                                              0 0
                                                                                              1 1                11111
                                                                                                                 00000
                                                                                                                 1 1
                                                                                                                 0 0
                                                                                              11111
                                                                                              00000
                                                                                              0 0
                                                                                              1 1                11111
                                                                                                                 00000
                                                                                                                 1 1
                                                                                                                 0 0
                                                                                              00000
                                                                                              11111
                                                                                              0 0
                                                                                              1 1                0 0
                                                                                                                 1 1
                                                                                              1 1
                                                                                              0 0                0 0
                                                                                                                 1 1
                                                                                              1 1
                                                                                              0 0                0 0
                                                                                                                 1 1
                                                                                              0 0
                                                                                              1 1
                                                                                              00000
                                                                                              11111              00000
                                                                                                                 11111
                                                                                                                 0 0
                                                                                                                 1 1
                                                                                              0 0
                                                                                              1 1
                                                                                              00000
                                                                                              11111              00000
                                                                                                                 11111
                                                                                                                 0 0
                                                                                                                 1 1
                                                                                              0 0
                                                                                              1 1
                                                                                              11111
                                                                                              00000              11111
                                                                                                                 00000
                                                                                                                 0 0
                                                                                                                 1 1
                                                                                              0 0
                                                                                              1 1
                                                                                              11111
                                                                                              00000              00000
                                                                                                                 11111
                                                                                                                 1 1
                                                                                                                 0 0
                                                                                              0 0
                                                                                              1 1
                                                                                              00000
                                                                                              11111
                                                                                              0 0                11111
                                                                                                                 00000
                                                                                                                 0 0
                                                                                                                 1 1
                                                                                              1 1
                                                                                              00000
                                                                                              11111
                                                                                              0 0                00000
                                                                                                                 11111
                                                                                                                 1 1
                                                                                                                 0 0
                                                                                              1 1
                                                                                              11111
                                                                                              00000              00000
                                                                                                                 11111
                                                                                                                 1 1
                                                                                                                 0 0
                                                                                              0 0
                                                                                              1 1
                                                                                              00000
                                                                                              11111
                                                                                              0 0                11111
                                                                                                                 00000
                                                                                                                 1 1
                                                                                                                 0 0
                                                                                              1 1
                                                                                                                     HTTP
                                                                                          WAP Gateway
                                                                                                                 Origin Server




Content provider’s Gateway (2)
  • For Intranets and security-demanding applications (banking...)
  • Pro: Provider controls the security
  • Con: Users must configure/use extra gateways

                                                                 WML
WML
  • Wireless Markup Language
  • Part of the WAP specifications
  • XML-base language

WML vs. HTML
  • HTML is presented in one page
  • WML is presented as a deck of cards

WML Document Structure
  • Header: XML declaration and WML’s DTD
    <!DOCTYPE wml PUBLIC
    "-//WAPFORUM//DTD WML 1.3//EN"
    "http://www.wapforum.org/DTD/wml13.dtd">
  • Body: root element is wml, contains at most one head element and at least one card element

The head Element
  • Contains e.g. meta elements (specifying caching behavior, encoding...)

The card Element
  • Contains the description of one card
  • Main attributes:
    id   : identifier of the card in the deck, fragment part of an URL
    title : title of the card (not necessarily displayed)


Text Formatting
  • Paragraphs with the p element
  • Style elements: b, i, u, em, strong, big, small




MW/2008/ITKS545/WAP                                                                                                              6
Anchors
  • 2 equivalent syntaxes for hyperlinks:
      <anchor><go href="x.wml"/>Some text</anchor>

      <a href="x.wml">Some text</a>
  • Going to the previous card: prev element inside an anchor

Interactions (1)
  • The do element associates actions to the soft buttons
  • Attributes:
      type : accept, prev...
      label : label for the soft button
  • Several do in a row form an “option menu” assigned to a soft button

Interactions (2)
  • Option list inside a card: select
  • Events: onevent (attribute type, values onenterforward, onenterbackward, onpick, ontimer
  • Timers: timer element

Templates
  • template element between head and the first cart
  • The template’s content is inserted into each card of the deck

Variables
  •   The setvar elements sets the value of a variable (weakly typed)
  •   Variables’ names made of letters, digits and “_”
  •   Content retrieved with $(variable_name)
  •   Scope: global to the WML browser environment
  •   Use case: select can set a variable

Input
  • The input element lets the user type a value
  • Sets a variable (named after the name attribute of the input)
  • Example:
      <input name="bar"/>
      sets the bar variable to the content of the input field

Posting Data
  • Use the postfield element inside a go:
      <anchor>
        Click here
        <go method="post" href="...">
        <postfield name="foo" value="$(bar)"/>
        </go>
      </anchor>

Images
  • Black and white bitmaps, WBMP
  • Header: type, fixed header, width, height
  • Body:
        – each row is a sequence of octets
        – each bit represents one pixel (0 = black, 1 = white)


MW/2008/ITKS545/WAP                                                                            7
                                                WAP 2.0
Summary
  • Added support for IP, TCP, TLS and HTTP
  • Wireless Profiled TCP, TLS and HTTP
  • Uses XHTML as markup language, and CSS
  • Still compatible with WAP 1.X
  • Compatible with i-Mode

XHTML Mobile Profile
  • Based on XHTML Basic, plus specific features (for WML1)
  • Modularized: more advanced UA can use extra modules (features)
  • Style sheets: Mobile Profile of CSS
  • Backward compatible with WML1 and XSL-T conversion utility

WAP Gateway
  • Not mandatory anymore in WAP 2.0
  • A WAP proxy can be used to add mobile service enhancements (location, privacy, presence-based services)
  • WAP proxy still necessary for WAP Push

New WAP Protocols
  • Wireless Profiled HTTP (WP-HTTP): compatible with HTTP, message body compression, secure tunnels
  • Wireless Profiled TLS: offers end-to-end security
  • Wireless Profiled TCP (WP-TCP): compatible with TCP, based on IETF’s Performance Implications of Links
    Characteristics (PILC) research

WAP Proxy
                              Client              WAP Proxy              Web Server

                              WAE
                                                                            HTTP
                           WP−HTTP            WP−HTTP     HTTP

                           WP−TCP             WP−TCP      TCP               TCP

                                IP                IP       IP                IP

                             Wireless          Wireless   Wired             Wired


WAP Proxy with TLS Tunneling
                              Client              WAP Proxy              Web Server

                              WAE
                                                                            HTTP
                              HTTP

                               TLS                                          TLS

                           WP−TCP             WP−TCP      TCP               TCP

                                IP                IP       IP                IP

                             Wireless          Wireless   Wired             Wired


User Agent Profile (1)
  • Mechanism describing the capabilities of UAs and preferences of users to an application server (UAProf)
  • Based on W3C’s Composite Capabilities / Preference Profiles (CC/PP)


MW/2008/ITKS545/WAP                                                                                           8
User Agent Profile (2)
  • Sends client and user information with the request ⇒ the server can adapt the response accordingly
  • Adaptation services can also be provided by proxies
  • User control over the submitted personal information (Privacy)

External Functionality Interface
  • Interface between WAE and external components ⇒ “plugins”
  • Examples: smart cards, GPS devices, health care devices, digital cameras
  • Extensibility of the WAP devices in the future

Other New Features
  • Persistent Storage Interface (handling data stored in the device)
  • Data synchronization (SyncML over WSP and HTTP/1.1)
  • Multimedia Messaging Service (MMS)
  • Provisioning (common tools to provide technical information to the device on how to operate on the network)
  • Pictogram (smileys)

Conclusion
  • WAP is clearly designed towards wireless communications
  • Not compatible with Internet protocols ⇒ need for gateways
  • Later versions of WAP (2.0) converge to TCP/IP




MW/2008/ITKS545/WAP                                                                                           9

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:1
posted:12/16/2011
language:
pages:9