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.

inside custom component

BlackBerry Push Development

Reply
Contributor
mtarkowski
Posts: 15
Registered: ‎09-14-2011
My Device: blackberry 6

Re: Invalid or missing attribute address-value

Great idea . . . if anyone can think of a command or app that will cpature the actual XML request on Linux please let me know.

Retired
marco_dicesare
Posts: 76
Registered: ‎08-08-2012
My Device: BlackBerry Z10

Re: Invalid or missing attribute address-value

The XML you posted in your previous reply had an iPhone tag in it can you explain more of what that is exactly?

 

Where in your application do you create the PAP push request to HTTP POST to the BlackBerry Push Server? Are you able to capture the XML therebefore you HTTP POST it to a log file?

Contributor
mtarkowski
Posts: 15
Registered: ‎09-14-2011
My Device: blackberry 6

Re: Invalid or missing attribute address-value

We have made some progress.  In our server logs we now see "Successfully received the message by BlackBerry server", but the BB device is still not receiving the Push message.

 

Before when I registered for BB Push service I used:

 

Configuration properties for the Push Initiator (server application)
Name: Vehicle Auth

 

However within our application, our appid is: tvauth and App Name is: Vehicle Auth

 

Question - when I register for BB Push and they ask me for a Name, are they referring to "App Name" or "App ID"? 

 

Does the BB name on the BB Push request form need to be used during device registration or message Push to the device?

Retired
marco_dicesare
Posts: 76
Registered: ‎08-08-2012
My Device: BlackBerry Z10

Re: Invalid or missing attribute address-value

When you register to use push at BlackBerry.com you will be emailed your credentials for pushing. This includes a push service id/push application id. This ID is need when you register from your device side application to the BlackBerry Push Service and is also used when you initiate a push from your server-side application to the BlackBerry Push Service.

 

What language are you writing your device side applicaion in? Cascades, WebWorks or AIR?

Contributor
mtarkowski
Posts: 15
Registered: ‎09-14-2011
My Device: blackberry 6

Re: Invalid or missing attribute address-value

When I send a message to the BB Push server I get an accepted response but my BB device does not receive the Push message.

 was able to capture the output from my server that is going to the BB Push server. 

 

Any suggestions as to what is wrong with the XML would be greatly appreciated.

 

 

POST /kpns/console/pushMessage/pushMessageAction?groups= HTTP/1.1

Host: kpns_partner2.meap.me

Accept: application/json, text/javascript, */*; q=0.01

Cookie: JSESSIONID=<removed from post>; countrytabs=0

Origin: http://kpns_partner2.meap.me

Referer: http://kpns_partner2.meap.me/kpns/console/pushMessage/home

Connection: Keep-Alive

User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.22 (KHTML, like Gecko)

Chrome/25.0.1364.97 Safari/537.22

Content-Type: text/xml

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3

Content-Length: 368 Accept-Encoding: gzip,deflate,sdch

Accept-Language: en-US,en;q=0.8

X-Requested-With: XMLHttpRequest

 

<?xml version='1.0' encoding='UTF-8'?>

<messageRequest appId="tvauth">

<messages>

<message type="PUSH" startTimestamp="1362081780000"  expiryTimestamp="1362081780000">

<subscribers>

<subscriber ksid="25"/>

</subscribers>

<platformSpecificProps>

</platformSpecificProps>

<content>

<mimeType>text/plain</mimeType>

<data>miket7</data>

</content>

</message>

</messages>

</messageRequest>

 

Retired
marco_dicesare
Posts: 76
Registered: ‎08-08-2012
My Device: BlackBerry Z10

Re: Invalid or missing attribute address-value

If you are getting back a response from the BlackBerry Push Server of 1001 - Accepted for processing then your server-side push initaiting code is working as expected.

 

The push may not be delivered because your device may not have subscribed with the BlackBerry Push Server. Did the application on the BlackBerry device register successfully?

 

What environment are you developing your application for: <= BBOS 7 or BB10?

 

Contributor
mtarkowski
Posts: 15
Registered: ‎09-14-2011
My Device: blackberry 6

Re: Invalid or missing attribute address-value

Yes, getting back 1001.

 

Device appears to register with BB Push server, I'm getting back device ID.

 

The BB OS 5, 6, and 7

Retired
marco_dicesare
Posts: 76
Registered: ‎08-08-2012
My Device: BlackBerry Z10

Re: Invalid or missing attribute address-value

Are you using the push APIs in the JDE 5.0, 6.0 and 7.0 to register your application for push? After you call PushApplicationRegistry.registerApplication(pad); you should get a successful status code in the PuPushPushApplication.onStatusChange(PushApplicationStatus)callback.

http://www.blackberry.com/developers/docs/7.0.0api/

 

There is a developer guide here:

http://developer.blackberry.com/java/documentation/developing_push_enabled_app.html

 

And a pre-compiled sample application (with source code) here:

http://developer.blackberry.com/devzone/develop/platform_services/push_apps.html

 

I would suggest you try pushing to the sample application to see if you receive the push message. If not there may be an issue with your device setup.