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
Highlighted
Contributor
Posts: 21
Registered: ‎02-17-2011
My Device: Not Specified
Accepted Solution

BES Push Notification to HTTPS

[ Edited ]

Hi,

 

I have a complete (server and device) push solution for the enterprise (BES). Our application successfully creates and sends push messages to the devices. But I never receive a confirmation. For the server side application we use the BlackBerry Push SDK 5.0 high level API (without subscriptions).

 

The problem: The BES/MDS cannot call my notification URL. The MDS log says after a push:

LAYER = SCM, Notifying to URL = https://<server dns name>:<port>/webApp/notification?appid=<AppId>, pushId = <pushid>, destination = <pin>, result code = 1000>

SCM, Push notification failed with error:net.rim.shared.command.f: could not connect to https://<server dns name>:<port>/webApp/notification?appid=<AppId>>

 

I can access the URL from my PC with a browser and also local on the BES (the application server runs on the BES server, so it should be found and able to connect). When I directly enter the URL (copy it from the log) I got a 500 Error, saying "java.lang.IllegalArgumentException: Push Id was null.". I think this is OK, because that would be contained in the headers or post data (headers I think, because we use 5.0 rim push).

 

My question is: Why can't the BES connect to my notification URL? Is HTTPS not possible?

 

 

For our application this is a major problem, because we want to use reliable push and depend on the confirmation by the device.

 

 

Edit: Also the IP 127.0.0.1 isn't working as notification URL Smiley Sad

Contributor
Posts: 21
Registered: ‎02-17-2011
My Device: Not Specified

Re: BES Push Notification

I now changed to plain HTTP for testing... And it works! But this is not possible for production.

 

Why is the HTTPS connection refused? Must the certificate be trusted (in the JVM keystore) or is HTTPS just not possible?

 

Will try some other things, but it would be nice to know what I'm doing wrong Smiley Wink

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: BES Push Notification

Long shot.  Have you specified the HTTPS port in the URL?

Contributor
Posts: 21
Registered: ‎02-17-2011
My Device: Not Specified

Re: BES Push Notification

[ Edited ]

Yes, I set the port (it's not the default port). The problem was the certificate. After adding our certificate to the MDS the notification arrived successfully per HTTPS. It would have been nice if the error message in the MDS log has stated why the connection failed.

 

Solution: You need to import your https certificate into the Java keystore used by the MDS Connection Service as described here:

http://www.blackberry.com/btsc/KB11623

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: BES Push Notification

Glad you figured it out and thanks for posting the fix.