I am trying to develop a standalone application to push data using Push Essentials. I tried to use the example in the Webcast from April 13 but Pages 27 and 28 of the slides I downloaded seem to be duplicates and the code is incomplete.
As an alternative I tried to directly telnet to pushapi.eval.blackberry.com and issue my request as follows:
POST /mss/PD_pushRequest HTTP/1.1
Host:xxx.xxx.xxx.xxUser-Agent: Pana.ma BB Push Server 1.0
Authorization:Basic [base 64 encoded app credentials]
Content-Type: multipart/related; type=application/xml; boundary=PMasdfglkjhqwert
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Content-Type: application/xml; charset=UTF-8
This is a sample message
I used the app id / Pwd (as indicated in the section Application Credentials of the registration email I received - I think in the web cast you said to look near the field Source but I do not see anything there).
However, I invariably get a 400 error:
HTTP/1.1 400 Bad Request
Date: Tue, 27 Apr 2010 15:05:34 GMTServer: Apache/2.2.3 (Linux/SUSE)
Connection: closeContent-Type: text/html; charset=iso-8859-1
Your browser sent a request that this server could not understand.
Request header field is missing ':' separator.
Many thanks in advance for reading this.
"I tried to use the example in the Webcast from April 13 but Pages 27 and 28 of the slides I downloaded seem to be duplicates and the code is incomplete." I saw this error too, can RIM update the PDF file with complete sample code?
I also got same HTTP/1.1 400 Bad Request with standalone push requests.
Could you send the example in the Webcast to me please?
I am looking for the standalone server-side push example, but I didn't attend the Webcast at April 13,2010.
This initial problem was because you were missing the ":" between the username and password. In your HTTP BasicAuthorization you need to first formulate your string pushserviceidassword then base64 encode it and add it to your HTTP request.