06-29-2012 11:25 AM
@user17
Are you using the production or eval server/service? If production then you should push to a URL such as:
https://cpXXX.pushapi.eval.blackberry.com
Note that this is HTTPS and the 'XXX' should be replaced by the CP ID provided when registering.
If pushing to Eval then you should push to:
https://pushapi.eval.blackberry.com
Still HTTPS in this case.
Let us know if the server now starts receiving these pushes as expected (leave the device side out for now). Once that is confirmed we can start troubleshooting why the device is not receiving the data (including verifying BIS access).
Regards,
06-30-2012 02:07 AM
Hi Garett Beukeboom,
Thank you for your response, Iam using eval service https://pushapi.eval.blackberry.com
So still iam getting error while registering time. I used https://cpXXX.pushapi.eval.blackberry.com
that time also i getting error " Request to register failed. Caused by java.lang.illegalArgumentException".
@ Chris,
could you please provide your code....
Thanks in advance.
07-03-2012 08:00 AM
Could you post the snippet of code resulting in this error message?
07-04-2012 12:05 AM
Hi gbeukeboom,
I using the code from push sdk,I don't know exact which code i have to give many files i am using in that. In their pushconfig file Iam setting the values;
private int port = portno;
private String appId = "appId";
private String bpsUrl = "https://pushapi.eval.blackberry.com";
private String contentProviderUrl = "content provider url";
private boolean isEnterprise;
In ContentProviderProtocol file contains:
String url = PushConfig.getContentProviderUrl();
final String cmdName;
switch( cmd )
{
case CMD_SUBSCRIBE:
url += SUBSCRIBE_URL;
cmdName = "Subscribe";
break;
case CMD_UNSUBSCRIBE:
url += UNSUBSCRIBE_URL;
cmdName = "Unsubscribe";
break;
case CMD_SUSPEND:
url += SUSPEND_URL;
cmdName = "Suspend";
break;
case CMD_RESUME:
url += RESUME_URL;
cmdName = "Resume";
break;
default:
return;
}
// append username, password and other parameters
url += USERNAME_PARAM + username;
url += PASSWORD_PARAM + password;
url += APP_ID_PARAM + PushConfig.getAppId();
url += PIN_PARAM + Integer.toHexString( DeviceInfo.getDeviceId() );
//#ifdef HANDHELD_VERSION_42
url += OS_PARAM + "4.2.0";
//#else
url += OS_PARAM + DeviceInfo.getSoftwareVersion();
//#endif
url += MODEL_PARAM + DeviceInfo.getDeviceName();
url += TYPE_PARAM + ( isEnterprise ? CLIENT_TYPE_ENTERPRISE : CLIENT_TYPE_PUBLIC );
// append a user defined parameter
url += USER_DEFINED_PARAM + new Random().nextInt( 1000 );
String response;
try {
response = PushUtils.request( url, tx );
} catch( IOException e ) {
// subscription failed
if( !tx.isCancelled() ) {
Logger.warn( "Content Provider network command [" + cmdName + "] failed, caused by " + e.getMessage() );
throw new IOException( "Network operation [" + cmdName + "] failed. Make sure that Content Provider URL is accessible." );
}
return;
}
checkResult( response );
Please give me instruction is it any worng, or any other code better than this please help me.
Thank you
07-04-2012 07:32 AM
From the device side everything should be done using HTTP, not HTTPS.
From the server-side everything should be done using HTTPS, not HTTP.
Please switch the bpsUrl to HTTP then see if it allows you to subscribe successfully. If this still fails then please message me all other values you are setting for the registration (appId, port, isEnterprise etc).
07-13-2012 04:48 AM
Hi All,
I tested with different contentprovider url in that only 1 url is working that means using that url i can register the username and password in bb push server. Sometime this also not working , I don't know why it happening like this?
I checked every url in device browser that time i can access that url.
Thanks
07-13-2012 07:23 AM
Could you provide some details on what you mean by "not working"?
What different content provider URLs would you be testing? There should only be 1 that you need to use and it would have been provided when you received your registration email.
07-13-2012 07:41 AM
Hi gbeukeboom,
Thank you for your response, Iam using serverside push config page as content provider URL for eg:
'http://abc.xyz.com/index.php?Service=blackberrySen
Thanks
07-13-2012 07:46 AM
I'm afraid you will need to provide clarification.
Where are you using this URL?
What is happening when it does not work? Are there exceptions?
Are you trying to subscribe the same device multiple times?
Overall what are you trying to do (send a message to the target device? subscribe the device?)? What is happening?
07-13-2012 08:23 AM
Hi gbeukeboom,
I will tell you the scenarios:
Iam using push services for different projects, In first project it is working fine ; second project also i got push credentials, if iam using for these details to register push server iam getting like this message: 'Request to register failed. Caused by java.io.IOException: Network operation [Subscribe] failed. Make sure that Content Provider URL is accessible'; so i used i first project content provider url that time it is registering push server; i can send the push message also. so why second project content provider url is not working while registering time?; i can access second content provider url through device browser.
eg : private String contentProviderUrl = "http://abc.abc.com/index.php?Service=blackberrySen
Thanks