WAP
TM
WSP
WAP-230-WSP
Approved Version 5-July-2001
Wireless Application Protocol
Wireless Session Protocol Specification
A list of errata and updates to this document is available from the WAP Forum™ Web site, http://www.wapforum.org/,
in the form of SIN documents, which are subject to revision or removal without notice.
© Copyright Wireless Application Protocol Forum, Ltd. 2001
All rights reserved.
WAP-230-WSP-20010705-a, Approved Version 5 July 2001
Page
2(131)
© Copyright Wireless Application Protocol Forum, Ltd. 2001
All rights reserved.
© 2001, Wireless Application Forum, Ltd. All rights reserved.
Terms and conditions of use are available from the WAP Forum Web site at
http://www.wapforum.org/what/copyright.htm.
You may use this document or any part of the document for internal or educational purposes only, provided you do not
modify, edit or take out of context the information in this document in any manner. You may not use this document in
any other manner without the prior written permission of the WAP Forum™. The WAP Forum authorises you to copy
this document, provided that you retain all copyright and other proprietary notices contained in the original materials on
any copies of the materials and that you comply strictly with these terms. This copyright permission does not constitute
an endorsement of the products or services offered by you
.
The WAP Forum™ assumes no responsibility for errors or omissions in this document. In no event shall the WAP
Forum be liable for any special, indirect or consequential damages or any damages whatsoever arising out of or in
connection with the use of this information.
WAP Forum™ members have agreed to use reasonable endeavors to disclose in a timely manner to the WAP Forum the
existence of all intellectual property rights (IPR's) essential to the present document. The members do not have an
obligation to conduct IPR searches. This information is publicly available to members and non-members of the WAP
Forum and may be found on the "WAP IPR Declarations" list at http://www.wapforum.org/what/ipr.htm. Essential IPR
is available for license on the basis set out in the schedule to the WAP Forum Application Form.
No representations or warranties (whether express or implied) are made by the WAP Forum™ or any WAP Forum
member or its affiliates regarding any of the IPR's represented on this list, including but not limited to the accuracy,
completeness, validity or relevance of the information or whether or not such rights are essential or non-essential.
Document History
WAP-203-WSP-20000504-a Approved
WAP-203_001-WSP-20000620-a SIN
WAP-203_003-WSP-20001218-a SIN
WAP-230-WSP-20010118-p Proposed
WAP-230_002-WSP-20010702-a SCD
WAP-230-WSP-20010705-p Proposed
WAP-230-WSP-20010705-a, Approved Version 5 July 2001
Page
3(131)
© Copyright Wireless Application Protocol Forum, Ltd. 2001
All rights reserved.
Contents
1 SCOPE...........................................................................................................................................................................6
2 DOCUMENT STATUS................................................................................................................................................7
2.1 C
OPYRIGHT
N
OTICE
.................................................................................................................................................7
2.2 E
RRATA
...................................................................................................................................................................7
2.3 C
OMMENTS
..............................................................................................................................................................7
3 REFERENCES .............................................................................................................................................................8
3.1 N
ORMATIVE
R
EFERENCES
.......................................................................................................................................8
3.2 I
NFORMATIVE
R
EFERENCES
.....................................................................................................................................9
4 DEFINITIONS AND ABBREVIATIONS................................................................................................................10
4.1 D
EFINITIONS
..........................................................................................................................................................10
4.2 A
BBREVIATIONS
....................................................................................................................................................11
4.3 D
OCUMENTATION
C
ONVENTIONS
..........................................................................................................................12
5 WSP ARCHITECTURAL OVERVIEW..................................................................................................................13
5.1 R
EFERENCE
M
ODEL
...............................................................................................................................................13
5.2 WSP F
EATURES
....................................................................................................................................................14
5.2.1 Basic Functionality.......................................................................................................................................14
5.2.2 Extended Functionality.................................................................................................................................15
6 WSP ELEMENTS OF LAYER-TO-LAYER COMMUNICATION .....................................................................16
6.1 N
OTATIONS
U
SED
..................................................................................................................................................16
6.1.1 Definition of Service Primitives and Parameters..........................................................................................16
6.1.2 Time Sequence Charts ..................................................................................................................................16
6.1.3 Primitives Types............................................................................................................................................17
6.1.4 Primitive Parameter Tables..........................................................................................................................17
6.2 S
ERVICE
P
ARAMETER
T
YPES
.................................................................................................................................18
6.2.1 Address ......................................................................................................................................................... 18
6.2.2 Body and Headers ........................................................................................................................................ 18
6.2.3 Capabilities...................................................................................................................................................18
6.2.4 Push Identifier (Push Id)...............................................................................................................................18
6.2.5 Reason ..........................................................................................................................................................18
6.2.6 Request URI..................................................................................................................................................19
6.2.7 Status ............................................................................................................................................................19
6.2.8 Transaction Identifier (Transaction Id)........................................................................................................ 19
6.3 C
ONNECTION
-
MODE
S
ESSION
S
ERVICE
..................................................................................................................19
6.3.1 Overview.......................................................................................................................................................19
6.3.2 Capabilities...................................................................................................................................................20
6.3.3 Service Primitives.........................................................................................................................................23
6.3.4 Constraints on Using the Service Primitives ................................................................................................36
6.3.5 Error Handling.............................................................................................................................................40
6.4 C
ONNECTIONLESS
S
ESSION
S
ERVICE
.....................................................................................................................40
6.4.1 Overview.......................................................................................................................................................40
6.4.2 Service Primitives.........................................................................................................................................40
6.4.3 Constraints on Using the Service Primitives ................................................................................................42
6.4.4 Error Handling.............................................................................................................................................43
7 WSP PROTOCOL OPERATIONS...........................................................................................................................44
7.1 C
ONNECTION
-M
ODE
WSP..................................................................................................................................... 44
WAP-230-WSP-20010705-a, Approved Version 5 July 2001
Page
4(131)
© Copyright Wireless Application Protocol Forum, Ltd. 2001
All rights reserved.
7.1.1 Utilisation of WTP........................................................................................................................................44
7.1.2 Protocol Description ....................................................................................................................................44
7.1.3 Protocol Parameters.....................................................................................................................................49
7.1.4 Variables.......................................................................................................................................................49
7.1.5 Event Processing ..........................................................................................................................................50
7.1.6 State Tables...................................................................................................................................................51
7.2 C
ONNECTIONLESS
WSP......................................................................................................................................... 66
8 WSP DATA UNIT STRUCTURE AND ENCODING.............................................................................................67
8.1 D
ATA
F
ORMATS
.....................................................................................................................................................67
8.1.1 Primitive Data Types....................................................................................................................................67
8.1.2 Variable Length Unsigned Integers..............................................................................................................67
8.2 P
ROTOCOL
D
ATA
U
NIT
S
TRUCTURE
......................................................................................................................68
8.2.1 PDU Common Fields....................................................................................................................................68
8.2.2 Session Management Facility....................................................................................................................... 69
8.2.3 Method Invocation Facility...........................................................................................................................71
8.2.4 Push and Confirmed Push Facilities ............................................................................................................75
8.2.5 Session Resume Facility................................................................................................................................75
8.3 C
APABILITY
E
NCODING
.........................................................................................................................................76
8.3.1 Capability Structure......................................................................................................................................76
8.3.2 Capability Definitions...................................................................................................................................77
8.3.3 Capability Defaults.......................................................................................................................................81
8.4 H
EADER
E
NCODING
...............................................................................................................................................81
8.4.1 General......................................................................................................................................................... 81
8.4.2 Header syntax...............................................................................................................................................83
8.4.3 Textual Header Syntax.................................................................................................................................. 98
8.4.4 End-to-end and Hop-by-hop Headers ..........................................................................................................99
8.5 M
ULTIPART
D
ATA
.................................................................................................................................................99
8.5.1 Application/vnd.wap.multipart Format ........................................................................................................99
8.5.2 Multipart Header.......................................................................................................................................... 99
8.5.3 Multipart Entry...........................................................................................................................................100
APPENDIX A ASSIGNED NUMBERS..........................................................................................................................101
APPENDIX B HEADER ENCODING EXAMPLES ....................................................................................................112
B.1 H
EADER VALUES
.................................................................................................................................................112
B.1.1 Encoding of primitive value........................................................................................................................112
B.1.2 Encoding of structured value......................................................................................................................112
B.1.3 Encoding of well-known list value..............................................................................................................112
B.1.4 Encoding of date value ............................................................................................................................... 112
B.1.5 Encoding of Content range.........................................................................................................................113
B.1.6 Encoding of a new unassigned token..........................................................................................................113
B.1.7 Encoding of a new unassigned header field name......................................................................................113
B.1.8 Encoding of a new unassigned list-valued header......................................................................................113
B.2 S
HIFT HEADER CODE PAGES
.................................................................................................................................113
B.2.1 Shift sequence .............................................................................................................................................113
B.2.2 Short cut......................................................................................................................................................113
APPENDIX C IMPLEMENTATION NOTES ..............................................................................................................114
C.1 C
ONFIRMED
P
USH AND
D
ELAYED
A
CKNOWLEDGEMENTS
...................................................................................114
C.2 H
ANDLING OF
R
ACE
C
ONDITIONS
........................................................................................................................114
C.3 O
PTIMISING
S
ESSION
D
ISCONNECTION AND
S
USPENSION
.....................................................................................115
C.4 D
ECODING THE
H
EADER
E
NCODINGS
..................................................................................................................115
C.5 A
DDING
W
ELL
-
KNOWN
P
ARAMETERS AND
T
OKENS
............................................................................................115
C.6 U
SE OF
C
USTOM
H
EADER
F
IELDS
........................................................................................................................115
WAP-230-WSP-20010705-a, Approved Version 5 July 2001
Page
5(131)
© Copyright Wireless Application Protocol Forum, Ltd. 2001
All rights reserved.
APPENDIX D STATIC CONFORMANCE REQUIREMENT ...................................................................................117
D.1 C
LIENT
/S
ERVER
M
ODE
........................................................................................................................................117
D.2 C
ONNECTION
-O
RIENTED
C
LIENT
.........................................................................................................................118
D.3 C
ONNECTIONLESS
C
LIENT
...................................................................................................................................123
D.4 C
ONNECTION
-O
RIENTED
S
ERVER
........................................................................................................................125
D.5 C
ONNECTIONLESS
S
ERVER
..................................................................................................................................129
APPENDIX E HISTORY AND CONTACT .................................................................................................................. 131