Troubleshooting guide
226
BlackBerry Java Development Environment Development Guide
Create a PAP push request
See “Appendix: XML control entity attributes” on page 275 for more information about XML control entity
attributes.
Task Steps
Push content to one or multiple
BlackBerry® device users using PAP.
1. To push data to a single BlackBerry device user using PAP, send an HTTP POST request using the
following format:
http://<mdsServer>:<web server listen port>/pap - The URL to send the PAP
push to.
The request is a MIME multipart message, which consists of the following items:
• XML document specifying the control entity
• push content
The following example shows a PAP push request:
Content-Type: multipart/related; type="application/xml";
boundary=asdlfkjiurwghasf
X-Wap-Application-Id: /
--asdlfkjiurwghasf
Content-Type: application/xml
<?xml version="1.0"?>
<!DOCTYPE pap PUBLIC "-//WAPFORUM//DTD PAP 2.0//EN" "http://
www.wapforum.org/DTD/pap_2.0.dtd">
<pap>
<push-message push-id="a_push_id" ppg-notify-requested-to="http://
foo.rim.net/ReceiveNotify">
<address address-value="WAPPUSH=aisha.wahl%40blackberry.com%3A7874/
TYPE=USER@rim.net"/>
<quality-of-service delivery-method="unconfirmed"/>
</push-message>
</pap>
--asdlfkjiurwghasf
Content-Type: text/html
<html><body>Hello, PAP world!</body></html>
--asdlfkjiurwghasf--
2. To push content to multiple recipients using PAP, add multiple address tags to the post request. For
example:
<address address-value="WAPPUSH=user1%40rim%2ecom%5B%3A7874/
TYPE=USER@rim.net"></address>
<address address-value="WAPPUSH=user2%40rim%2ecom%5D%3A7874/
TYPE=USER@rim.net"></address>
Push content to a group using PAP. > In the recipient addresses part of the push submission, prefix the group name with the $ character.
In the following example, the $ character is URL encoded. An address element is used to push to a
group named IT using PAP:
<address address-value="WAPPUSH=%24IT/TYPE=USER@rim.net"/>