WAP Bookmark can be used to send a location of a WAP site to a mobile phone. A WAP Bookmark is basically a specially encoded message which includes a link to a WAP or WWW address. WAP Bookmark is specified on top of WDP (WAP Datagram Protocol, resembled the UDP protocol in the Internet); as such, it can be delivered over any WDP-supported bearer, such as GPRS or SMS.
WAP Bookmark messages are encoded as XML. Because the XML format is not suitable for low bandwidth applications such as SMS, the messages are encoded using WBXML which stands for WAP Binary XML. When a message is encoded using this standard, common tags and attribute values are replaced with a single byte.
The full specification of this format van be found at www.w3.org.
Sample of a WAP Bookmark message in XML:
<?xml version="1.0"?> <!DOCTYPE si PUBLIC "-//WAPFORUM//DTD SI 1.0//EN" "http://www.wapforum.org/DTD/si.dtd"> <CHARACTERISTIC-LIST> <CHARACTERISTIC TYPE="BOOKMARK"> <PARM NAME="NAME" VALUE="yahoo"/> <PARM NAME="URL" VALUE="http://wap.yahoo.com"/> </CHARACTERISTIC> </CHARACTERISTIC-LIST>
The same WAP Bookmark message in WBXML (excluding the WSP header) :
0x45 <CHARACTERISTIC-LIST> 0xC6 <CHARACTERISTIC 0x7F TYPE="BOOKMARK" ( application/x-wap-prov.browser-bookmarks ) 0x01 > 0x87 PARAM 0x15 NAME="NAME" 0x11 VALUE 0x03 String value follows 0x57 'W' 0x61 'A' 0x70 'P' 0x20 ' ' 0x42 'B' 0x6F 'o' 0x6F 'o' 0x6B 'k' 0x6D 'm' 0x61 'a' 0x72 'r' 0x6b 'k' 0x20 ' ' 0x4D 'M' 0x65 'e' 0x73 's' 0x73 's' 0x61 'a' 0x67 'g' 0x65 'e' 0x00 end of string value 0x01 </PARAM> 0x08 <PARAM? 0x17 NAME="URL" 0x11 VALUE 0x03 String value follows 0x68 'h' 0x74 't' 0x74 't' 0x70 'p' 0x3A ':' 0x2F '/' 0x2F '/' 0x77 'w' 0x61 'a' 0x70 'p' 0x2E '.' 0x79 'y' 0x61 'a' 0x68 'h' 0x6F 'o' 0x6F 'o' 0x2E '.' 0x63 'c' 0x6F 'o' ox6D 'm' 0x00 end of string value 0x01 </PARAM> 0x01 </CHARACTERISTIC> 0x01 </CHARACTERISTIC-LIST>
WAP Push messages can be send using a SMPP connection, HTTP connection or GSM phone or modem. The message has to be encoded as an eight bit message. You should also set the 'UDH' indication bit of the SMS message.