04-10-2013 03:52 PM
Why does it say <?wap-pap-ver supported-versions="2.1"?> in the built message but 2.0 in the code? It should be 2.0.
Also, X-Wap-Application-Id should be a header in your content that you're pushing. For some reason, it's not there in the built message you show.
There also are some restrictions on the new line characters you have to use and where to put them in the PAP request as well. I'll double check those for you first thing tomorrow morning.
04-10-2013 04:03 PM
Oh yeah, the 2.1 thing was something I saw on a blog post, I forgot to change it before I copied and pasted it. The built message is correct, and is the one i sent to BES. As for the X-Wap-Application-Id, I added it using the HttpWReq.Headers.Add("X-Wap-Application-Id",appid)
In terms of the new line characters, I had a feeling that they might be a problem. However, I couldn't find any particular resource which helps me identify the places where I should put the new line characters.
Thanks for your help.
04-11-2013 09:01 AM
The X-Wap-Application-Id header is only needed in the content of the push.
I think the PAP spec outlines where new line characters are needed, but it can be tricky so I went back to our SDK code to see what was done to help give you an example.
Here's an example with the new line characters explicitly shown to help you to know where to put them.
Content-Type: application/xml; charset=UTF-8\r\n\r\n
<!DOCTYPE pap PUBLIC "-//WAPFORUM//DTD PAP 2.0//EN" "http://www.wapforum.org/DTD/pap_2.0.dtd" [<?wap-pap-ver supported-versions="2.0"?>]>\r\n
<push-message push-id='some_push_id' deliver-before-timestamp='2013-04-11T10:19:55Z'>\n
<address address-value='some_PIN' />\n
Hope that helps!
04-11-2013 11:43 AM
Hi Matt. I am getting a 2002 error. Which is "The specified PIN is not recognized." I double checked my device PIN and the appid, and both are correct. My device is also registered on the BES server. I am not sure why I am getting the error.
This is my server log.
PapServlet: request from [XX.XX.XXX.XXX 608 bytes] >
<2013-04-11 11:31:28.662 EDT>::<xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>:<DEBUG>:<LAYER = SCM, , EVENT = PAP request, content-type = multipart/related;type="application/xml";boundary=
<2013-04-11 11:31:28.673 EDT>::<xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>:<DEBUG>:<LAYER = SCM, Mapping PAP request to push request for pushID:abcdefg>
<2013-04-11 11:31:28.674 EDT>::<xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>:<DEBUG>:<LAYER = SCM, PushServlet: POST request from [UNKNOWN @ XX.XX.XXX.XXX] to [PAPDEST=DEVICE_PIN&PORT=7874&REQUESTURI=/]>
<2013-04-11 11:31:28.674 EDT>::<xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>:<DEBUG>:<push id: abcdefg>
<2013-04-11 11:31:28.675 EDT>::<xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>:<D
<2013-04-11 11:31:28.681 EDT>::<xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>:<
Is there anything else I have to subscribe to on the device besides being on BES for me to be able to receive PUSH notifications?
04-11-2013 12:15 PM
The address tag was wrong in the example I sent you (I was adapting a BIS example).
Try this for your address tag in your request:
Replace some_pin with your device's PIN.
04-11-2013 02:28 PM
That's strange. I am getting an exception on my server logs:
SendPushMessages Exception: Application with ID = alphanumeric_string not found for destination: device_pin>
PAP push-id abcdefg returned status code 3012>
Don't know if app ids are all the same lenghts, but my application id is 27 characters long.
I double checked the app id and it is the one found on the manage applications screen.
I know it's for BES 6, but a lot of it are similar, however, it left the X-Wap-application-Id part blank except the /. I have tried putting the / behind and infront of the app id, to no avail.
04-11-2013 02:44 PM
The error you're geting - 3012 means this (pulling the error code description from our SDK):
* <b>This is an enterprise/BDS status code only.</b> The PPG could not deliver the message because there is no application
* with the application id specified. The BDS server will validate the application id being pushed to is in fact installed on
* the device. For an enterprise (BDS) push, you must use the application package identifier as the application id or if you
* want to use a content provider custom application id you must turn off application id validation by configuring the
* property <code>push.application.validation=false</code> located in the <code>rimpublic.properties</code> of the BDS/MDSCS. <br/>
* <b>Status code:</b> 3012
* @since 1.2
public static final StatusCode PUSH_APPLICATION_NOT_INSTALLED = new StatusCode("3012",
"The PPG could not deliver the message because there is no application with the application id specified.");
BES 10 behaves slightly different for push than BES 6 did so you can't really go by those docs.
Could you send me a screenshot in a private message of the spot you're getting the application ID from?