07-12-2012 07:48 AM
Hello everybody.
I'm trying to solve a problem implementing a Blackberry Push Service in java. I've downloaded the SDK (without TomCat because I already have one) and I started the "sample-push-initiator" locally.
Before you ask I've installed the DB and I see a "push application" at bpss_push_application table. The registry in DB contains this:
id=[my app id]
name=[my app name]
lowername=[my app name] in lower case
version=1.0
username=[my app name] I've user this because I don't know what to use...
public_password=null
enterprise_password=[Pwd field in PDF delivered by Blackberry with my credentials]
description=Sample Push Initiator
max_daily_quota=1000
status=ACTIVE
store_push_requests=F
bypass_subscription=F
start_date=2012-07-12 11:35:41
expiry_date=2013-07-12 11:35:41
created_date=2013-07-12 11:35:41
modified_date=2013-07-12 11:35:41
modified_by=SamplePushInitiator
push_live_time=28800
application_reliable=T
service_level=Push Essentials
last_notification_enabled=F
auto_delete_requests=F
type=Enterprise Push
The two things that I don't understand are: dates are all the same and store_push_requests is false. There is some problem here?
All the other tables are empty except bpss_push_stats that have a row with my app id.
When I'm trying to subscribe with my Blackberry I get an error. I saw in the log the url that I'm sending and is this one: http://[my server]:8090/sample-push-initiator/subscribe?usern
When I put this in my local computer I get the same error (rc=10026) so the problem is not in the connection. This error means "Authentication of the subscriber, based on the username and password they passed in, failed." what is weird because I'm giving the same username and password that I have on the database.
Thanks in advance,
Tiago Ribeiro.
Solved! Go to Solution.
07-12-2012 11:14 AM
07-12-2012 12:26 PM
Hello.
Thanks for your fast reply.
My configurations locally are the same that in the first post. When I access http://localhost:8090/sample-push-initiator/main and click on "Start General Push" I got "ERROR: There are no active subscribers.".
So I tried to subscribe with my Blackberry. My settings are:
Port: [the one supplied in PDF from Blackberry]
App Id: [my app id]
Push Initiator application URL: http://pushapi.eval.blackberry.com
App Acknowledgment: Checked
Use enterprise (BES) network
When I make "Register" it ask me for Username & Password. With both filled or with Username empty the result is the same: "Request to register failed. Caused by java.lang.IllegalArgumentException".
Do you have a clue of what it can be?
Thanks in advance.
Best regards,
Tiago Ribeiro.
07-12-2012 01:09 PM
07-13-2012 04:44 AM
Good morning. Thanks for your answer.
I'm trying to test with BES because with BIS the Blackberry phone need another URL that I don't know what is.
My application will run in a TomCat AS accessible from the web. It's this that you are asking for?
Thanks in advance.
Tiago Ribeiro.
07-13-2012 07:27 AM
To test with BIS you need to send the push to the MDS-CS simulator instance which should be running on port 8080 by default.
Note that in order to use BES in a production environment you would need to have a BlackBerry Enterprise Server set up and your devices would need to be Enterprise Activated on these servers.
If you would like to use BIS, good for commercial applications, then I would suggest signing up for Push Services where you will receive credentials so you can test pushing to BIS enabled devices:
https://developer.blackberry.com/devzone/services/
07-13-2012 07:54 AM
Hello Garett.
I already have that credentials. I just want to try my connection between a message send by my server to be received by my Blackberry phone.
What I understand by your words is that I've to user "publicpush" application type right? I'm using the sample-push-initiator provided by Blackberry so in sample-push-initiator.properties I've to write:
application.port=8080
application.type=publicpush
application.service.level=pushessentials
application.public.password=[my password]
application.public.notify.url=pushapi.eval.blackbe
BTW with this configurations I've "Start General Push" and I'm receiving "Accepted for processing.".
Now I've to configure my Blackberry phone to access this. I'm gonna use BIS as you said and test if it works now.
Thanks.
07-13-2012 07:59 AM
The issue was that when using BES push you would need to have a real BES set up in order to receive the push at an actual device. BIS is typically a much simpler scenario to test if you do not already have a BES et up.
Let us know how you manage using BIS!
07-13-2012 08:10 AM
Yep. I understood that. Thanks very much.
I'm trying to configure my Blackberry but when I register it returns an error "Request to register failed. Caused by java.lang.IllegalArgumentException".
My settings are:
Port: the Push Port in section Configuration properties for the push-enabled application (client application) provided in the PDF
App ID: The Application ID in the same place
BPS server URL: I used https://pushapi.eval.blackberry.com but I also tried with http version and I've got the same error
Push initiator application URL: http://pushapi.eval.blackberry.com
App Acknowledgment checked
Use public (BIS) network choosen
When I make "Register" I need to provide Username and Password. I tried both empty, only password, username (I've user Company Name once and Application Name another time) and password (Pwd field in section Configuration properties for the Push Initiator (server application) provided in the PDF) filled. The error is always the same:
Request to register failed. Caused by java.lang.IllegalArgumentException
Do you have a clue of what can be?
Thanks in advance.
07-13-2012 08:14 AM
The port being used should be the one assigned to you when you registered for Push Services, which PDF are you referencing?
From the server (push initiator) side you should always use HTTPS, from the device (smartphone) side you should always use HTTP.
Where are you setting these values?