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

Web and WebWorks Development

Reply
New Developer
yadavtarun03
Posts: 7
Registered: ‎11-28-2009
My Device: Not Specified
Accepted Solution

Need help running Push Widget sample for Widget SDK

Hello,

 

The Widget SDK is my first foray into developing for the BlackBerry.

 

I've downloaded the installer that bundles the Eclipse IDE (because I was having problems with the Eclipse update) from http://na.blackberry.com/eng/developers/browserdev/eclipse.jsp The simulator that runs when I run a widgets indicates that it is BlackBerry Smartphone Simulator 2.13.0.56

I was trying to run the sample (found on http://docs.blackberry.com/en/developers/subcategories/?userType=21&category=BlackBerry+Widgets&subC...). I've got the widget running in the simulator and the Swing app that runs the server side code running as well but the messages do not get pushed to the device.

 

Here's some issues & information:

 

1. The documentation for this sample seems to assume a standalone MDS and not one as an IDE plug-in - it talks about port 8080 however I found that my instance of the MDS is listening at 28080

 

2. Acessing localhost at 28080 shows me the MDS status which reports

Build number  :     93
Build version  :     5.0.0.93
Build Date      :     2009/08/12

 

3. The instructions for the sample say:

Open the rimpublic.property file, which is located in the MDS\config subdirectory of your BlackBerry Email and MDS Services Simulators installation directory.   Ensure the "push.application.reliable.ports=100" line is NOT commented out.

 

I didn't find this line (I found the MDS folder with the file with this name under <Eclipse-Dir>\plugins\net.rim.browser.tools.wcpc_1.0.0.200910291414-35\wcpc\mds\config) so I added it myself.

 

4. I'm running Win 7 Ultimate and tried this after allowing MDS access by adding an exception and later by completely disabling the firewall.

 

5. For the RIM option in the push server code, I get the following exception in the console:

 

Sending to http://localhost:28080/push?DESTINATION=2100000A&PORT=100&REQUESTURI=localhost
java.io.IOException: Server returned HTTP response code: 400 for URL: http://localhost:28080/push?DESTINATION=2100000A&PORT=100&REQUESTURI=localhost

 

 

 

6. For PAP, I see:

 

[B@186d4c1
[B@186d4c1
sending PAP request to http://localhost:28080/pap; pushId = pushID:64424432
--asdlfkjiurwghasf
Content-Type: application/xml; charset=UTF-8

<?xml version="1.0"?>
<!DOCTYPE pap PUBLIC "-//WAPFORUM//DTD PAP 2.0//EN"
"http://www.wapforum.org/DTD/pap_2.0.dtd"
[<?wap-pap-ver supported-versions="2.0"?>]>
<pap>
<push-message push-id="pushID:64424432" ppg-notify-requested-to="http://localhost:7778">

<address address-value="WAPPUSH=2100000A%3A100/TYPE=USER@rim.net"/>
<quality-of-service delivery-method="confirmed"/>
</push-message>
</pap>
--asdlfkjiurwghasf
Content-Type: text/plain

pap
--asdlfkjiurwghasf--



[B@f9f9d8
[B@f9f9d8
[B@15b7986
[B@15b7986

 

 

7. On the console for MDS, I see:

 

<2009-11-28 03:49:48.683 EST>:[115]:<MDS-CS_MDS>:<DEBUG>:<LAYER = SCM, EVENT = P
apServlet: request from 127.0.0.1 559 bytes...>
<2009-11-28 03:49:48.694 EST>:[116]:<MDS-CS_MDS>:<DEBUG>:<LAYER = SCM, EVENT = M
apping PAP request to push request for pushID:pushID:64424432>
<2009-11-28 03:49:48.697 EST>:[117]:<MDS-CS_MDS>:<DEBUG>:<LAYER = SCM, EVENT = P
ushServlet: POST request from [UNKNOWN @ 127.0.0.1] to [PAPDEST=WAPPUSH%3D210000
0A%253A100%2FTYPE%3DUSER%40rim.net&PORT=100&REQUESTURI=/]>
<2009-11-28 03:49:48.697 EST>:[117]:<MDS-CS_MDS>:<DEBUG>:<push id: pushID:644244
32>
<2009-11-28 03:49:48.698 EST>:[118]:<MDS-CS_MDS>:<DEBUG>:<LAYER = SCM, EVENT = s
ubmitting push message with id:pushID:64424432>
<2009-11-28 03:49:48.702 EST>:[119]:<MDS-CS_MDS>:<DEBUG>:<LAYER = SCM, EVENT = E
xecuting push submit command for pushID:pushID:64424432>
<2009-11-28 03:49:48.704 EST>:[120]:<MDS-CS_MDS>:<DEBUG>:<LAYER = SCM, EVENT = P
AP push-id pushID:64424432 returned status code 3007>
<2009-11-28 03:52:49.193 EST>:[121]:<MDS-CS_MDS>:<DEBUG>:<LAYER = SCM, EVENT = A
dmin. Task- refresh media management>

 

8. After a while, when using PAP, the Eclipse console shows 'Notification connection timeout. Restarting...' and this message keeps repeating.

 

 

So if someone could point me in the right direction for getting this to work or give me some idea of what I'm doing wrong, that'd be great! I really don't know too much about BlackBerry development or MDS or push so I'm not sure where to start.

 

Thanks!

Please use plain text.
Retired
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Need help running Push Widget sample for Widget SDK

Hi There,

 

First of all, thank you for all of the diagnostic information, that is definitely going to help :smileyhappy:

 

Currently we do not support Windows 7 as an official supported OS.  However, there were some issues with the push sample that were provided and we have had an update waiting to go up on the web and are awaiting the web site team to publish it.  That may be the source of your problems, or Windows 7 may be.

 

In either case, we will have the Eclipse tooling team take a look at your scenario to see if they can get the corrections to the push sample for you.  I know our Team Lead of the Eclipse web development team did make the changes to the push example after he found similar issues.  So we should be able to get you going in the right direction.

 

Stay tuned...

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
New Developer
yadavtarun03
Posts: 7
Registered: ‎11-28-2009
My Device: Not Specified

Re: Need help running Push Widget sample for Widget SDK

Thank you, I'll keep an out for updates :smileyhappy: and in the meantime have a go at this on a friends machine with Vista (x86) and see how that works out

 

Also, just in case someone comes around to this thread again, I forgot to mention earlier, that I'm running the x86 version of Win 7.

Please use plain text.
Retired
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Need help running Push Widget sample for Widget SDK

Hi There,

 

Turns out that there is a known issue in the MDS connection services where to emulate the push environment you have do a few steps.

 

Once you have the simulator open, you need to have the device simulator connect through the MDS a couple of times so that it knows that it is actually there.

 

What we have seen that works, is to open up the browser and go to a link such as http://www.google.com a couple of times and then try the push.

 

some of our developers have seen that it can sometimes take a few tries in order for the MDS to detect the simulator.  We have a bug logged with the MDS team on this topic.

 

Tim

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
New Developer
yadavtarun03
Posts: 7
Registered: ‎11-28-2009
My Device: Not Specified

Re: Need help running Push Widget sample for Widget SDK

Brilliant! That got it running, thanks!

Please use plain text.
Developer
Zodiacal
Posts: 144
Registered: ‎06-23-2009
My Device: Not Specified

Re: Need help running Push Widget sample for Widget SDK

Do you know when this bug will be fixed. What if im running an old BES 4.1.6? How would i apply this fix?  it seems like i have to make a http connection before each push for mine to work.

Please use plain text.
Retired
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Need help running Push Widget sample for Widget SDK

Hi Zodiacal,

 

The bug is in just in the development environment only when testing.  On an actual BES it will work just fine.  No fix is needed there.

 

 

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
Developer
Zodiacal
Posts: 144
Registered: ‎06-23-2009
My Device: Not Specified

Re: Need help running Push Widget sample for Widget SDK

I'm on a real BES 4.1.6 and the bug is happening...

Please use plain text.