Constructing a PAP control entity
A PAP control entity is an XML document which contains the control information that is required by the Push Access Protocol. When a PAP control entity is included in a multipart message, as in a push request, it must be the first entity in the message.
The BlackBerry MDS Connection Service supports three request types: a push request, a cancellation request, and a status-query request. These request types each correspond to a different PAP control entity: the push message control entity, the cancellation message control entity, and the status-query message control entity.
All PAP control entities have three common document elements: the XML declaration, the DOCTYPE declaration, and a root <pap> element. Because the BlackBerry MDS Connection Service supports only WAP PAP version 2.0, the DOCTYPE declaration included in all PAP control entities must specify supported version information.
Code sample: Formatting a PAP control entity to send to the BlackBerry MDS Connection Service
<?xml version="1.0"?> <!DOCTYPE pap PUBLIC "-//WAPFORUM//DTD PAP 2.0//EN" "http://www.openmobilealliance.org/tech/DTD/pap_2.0.dtd" [<?wap-pap-ver supported-versions="2.0"?>]> <pap> <-- message-specific elements go here --> </pap>
For more information about PAP control entities, see the Push Access Protocol specification at http://www.openmobilealliance.org.
Was this information helpful? Send us your comments.