Welcome!

Welcome to the Official BlackBerry Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
Developer
mikes2002
Posts: 18
Registered: ‎02-10-2009
Accepted Solution

PAP Status Query Issue

I have successfully sent a PAP message and want to query for the status using <statusquery-message>.  However when I send the message, the MDS simulator gives an error "bad PAP message: invalid push submission".  I am not sure what the deal is.  Does anyone have an idea what the issue is?  Here is a snipet of my code making the call.  Of course I actually use a valid push-id and address_value.

 

.... HttpURLConnection MDS_CONN = (HttpURLConnection) MDS_HOST_URL.openConnection(); MDS_CONN.setRequestProperty("Content-Type", "multipart/related; type=\"application/xml\"; boundary=" + boundary); MDS_CONN.setRequestProperty("X-Wap-Application-Id", "/"); MDS_CONN.setRequestProperty("X-Rim-Push-Dest-Port", DEVICE_PORT); MDS_CONN.setRequestMethod("POST"); MDS_CONN.setAllowUserInteraction(false); MDS_CONN.setDoInput(true); MDS_CONN.setDoOutput(true); String Message = ""; Message += "Content-Type: application/xml\r\n\r\n"; Message += "<?xml version=\"1.0\"?>\r\n"; Message += "<!DOCTYPE pap PUBLIC \"-//WAPFORUM//DTD PAP 2.0//EN\" \"http://www.wapforum.org/DTD/pap_2.0.dtd\">\r\n"; Message += "<pap>\r\n"; Message += "<statusquery-message push-id=\"a_push_id\">\r\n"; Message += "<address address-value=\"WAPPUSH=aisha.wahl%40blackberry.com%3A7874/TYPE=USER@rim.net\"/>\r\n"; Message += "</statusquery-message>\r\n"; Message += "</pap>\r\n"; .... This is what the message looks like: 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> <statusquery-message push-id="123@wapforum.org"> <address address-value="WAPPUSH=aisha.wahl%40blackberry.com%3A7874/TYPE=USER@rim.net"/> </statusquery-message> </pap>

 

Please use plain text.
Administrator
MSohm
Posts: 12,956
Registered: ‎07-09-2008
My Carrier: Bell

Re: PAP Status Query Issue

[ Edited ]
The message looks valid.  What version of MDS Simulator are you testing on?  Are you able to query a pap push using the browserpushdemo included with the BlackBerry JDE?
Message Edited by MSohm on 04-15-2009 04:41 PM
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Found a bug? Report it using the Issue Tracker
Please use plain text.
Developer
mikes2002
Posts: 18
Registered: ‎02-10-2009

Re: PAP Status Query Issue

Thanks I figured it out.  Here is how it should look instead of my original code that I posted.

 

HttpURLConnection MDS_CONN = (HttpURLConnection) MDS_HOST_URL.openConnection(); MDS_CONN.setRequestProperty("Content-Type", "application/xml"); MDS_CONN.setRequestMethod("POST"); MDS_CONN.setAllowUserInteraction(false); MDS_CONN.setDoInput(true); MDS_CONN.setDoOutput(true); String Message = ""; Message += "<?xml version=\"1.0\"?>\r\n"; Message += "<!DOCTYPE pap PUBLIC \"-//WAPFORUM//DTD PAP 2.0//EN\"\r\n \"http://www.wapforum.org/DTD/pap_2.0.dtd\"\r\n [<?wap-pap-ver supported-versions=\"2.*,1.*\"?>]>\r\n"; Message += "<pap>\r\n"; Message += "<statusquery-message push-id=\"" + pushId + "\">\r\n"; Message += "<address address-value=\"WAPPUSH=" + PinID + "%3A100/TYPE=USER@rim.net\" />\r\n"; Message += "</statusquery-message>\r\n"; Message += "</pap>\r\n

 

Please use plain text.
New Developer
ssanthosh
Posts: 13
Registered: ‎01-08-2009

Re: PAP Status Query Issue

Only at RIM can they get away with this

Please use plain text.
New Contributor
nishi_nkm
Posts: 2
Registered: ‎10-13-2010

Re: PAP Status Query Issue

Can you please tell me exact MDS_HOST_URL. 

Please use plain text.