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
Developer
lgdito
Posts: 66
Registered: ‎09-04-2008
My Device: Z10

Problem: Get a HTTP 400 Error when initiating HTTP-Push

Hi all,

 

after upgrading vom Eclipse Plugin 1.1 (beta5) to the actual final Plugin 1.1 my push out of my GWT Application is getting an HTTP response Error Code 400.

 

This is the Error out of the GWT Console:

 

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

 

I can confirm that the Server IP is correct, Port 100 is configured and my simulator has the PIN 2100000A.

Also MDS-CS is running and i have internet access from the device Simulator (Bold 9700).

 

Any tips where i can search for more Informations to solve this problem - or perhaps any "golden" hint?

 

I think this must be a very simple thing (hopefully) maybe only a small parameter or something else?

Has anything changed to the HTTP Push with this last upgrade?

 

Thanks a lot for help

 

Best Regards

Lars.

---

My Twitter:
http://twitter.com/lgentz
Please use plain text.
Developer
ekke
Posts: 1,476
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: Problem: Get a HTTP 400 Error when initiating HTTP-Push

can confirm that the HTTPPushDemo from Eclipse Plugin 1.1 also fails:

 

using *rim getting error 400

using *pap nothing happens

 

the client app gets nothing

port 100 is set in MDS properties, Browser was opened before

 

perhaps the 'old' way doesn't work anymore and the new API's from Push Service SDK have to be used.

 

unfortunately there's no simple stand-alone example for client / server using http -PAP - pushes.

(as I learned from the webinar yesterday this will com "in near future")

 

ekke

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
International Development Mobile Apps BlackBerry 10 Cascades
Cascades - Workshops / Trainings / Bootcamps

Open Source Enthusiast
blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner
bb10-development: http://appbus.org Twitter: @ekkescorner
Please use plain text.
Developer
idonen
Posts: 43
Registered: ‎10-03-2008
My Device: Not Specified

Re: Problem: Get a HTTP 400 Error when initiating HTTP-Push

Try a higher port number. I was having problems too using port 100, but when I changed it to 10000 it worked.

Please use plain text.
Developer
ekke
Posts: 1,476
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: Problem: Get a HTTP 400 Error when initiating HTTP-Push

thx for the tip.

I tried port 10000 instead of 100

same results:

 

------------------- PUSH from server (RIM method)

 

Server logs:


Sending to http://192.168.100.46:8080/push?DESTINATION=2100000A&PORT=10000&REQUESTURI=192.168.100.11

Waiting for notification on port 7778...

java.io.IOException: Server returned HTTP response code: 400 for URL: http://192.168.100.46:8080/push?DESTINATION=2100000A&PORT=10000&REQUESTURI=192.168.100.11

Notification connection timeout.

 

Device - MDS-SC_MDS logs:

PushServlet: FAILED - the specified delivery method is not possible

 

if I paste the URL into Browser at the server machine:

http://192.168.100.46:8080/push?DESTINATION=2100000A&PORT=10000&REQUESTURI=192.168.100.11

 

Device:

now gets the message received (but of course no data)

 

------------------- PUSH from server (PAP method)

 

Server logs:

HTTP Response Code:202 (Accepted)

so it looks good from server side, but....

 

Device:

NO message comes ups :smileysad:

 

this time MDS-SC_MDS logs at device site:

 

PapServlet: request from 192.168.100.11 568 bytes...

PapServlet senderAddress = http://EKKEE88C:8080/pap

Mapping PAP request to push request for pushID:smileytongue:ushID:-210232049

PushServlet: POST request from [UNKNOWN @ 192.168.100.11] to [PAPDEST=WAPPUSH%3D

2100000A%253A100%2FTYPE%3DUSER%40rim.net&PORT=10000&REQUESTURI=/] : -1 bytes...

submitting push message with id:smileytongue:ushID:-210232049

Executing push submit command for pushID:smileytongue:ushID:-210232049

PAP push-id pushID:-210232049 returned status code 3007

 


 

so the connection between server and device works

 

all with 5.0, plugin 1.1

 

if anyone else have a tip - THX

OR

if anyone else got the new PushServiceSDK using PAP in BES/Enterprise mode running

 

thx

 

ekke

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
International Development Mobile Apps BlackBerry 10 Cascades
Cascades - Workshops / Trainings / Bootcamps

Open Source Enthusiast
blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner
bb10-development: http://appbus.org Twitter: @ekkescorner
Please use plain text.
New Contributor
hacker
Posts: 2
Registered: ‎04-27-2010
My Device: Onyx
My Carrier: Rogers

Re: Problem: Get a HTTP 400 Error when initiating HTTP-Push

[ Edited ]

Device - MDS-SC_MDS logs:

PushServlet: FAILED - the specified delivery method is not possible

 

Seems like you didn't do the following steps after you changed the port #:


 1) 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.


Note: Step 1 is necessary to ensure application-level reliability for the device-side
HTTP Push Demo, since it listens on port 100.

 

If this step is not done then you'd get this error.

Make sure you update the property to

push.application.reliable.ports=100,10000

or

push.application.reliable.ports=10000

Please use plain text.
Developer
ekke
Posts: 1,476
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: Problem: Get a HTTP 400 Error when initiating HTTP-Push

I did this:

 

push.application.reliable.ports=100,110,10000

 

tried with port 100 and 10000 - of course changed in server and client apps

tried RIM and PAP

 

if pasting the URL sent from the server app into browser, then the push goes thru, so the connection itself works.

 

thx

 

ekke

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
International Development Mobile Apps BlackBerry 10 Cascades
Cascades - Workshops / Trainings / Bootcamps

Open Source Enthusiast
blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner
bb10-development: http://appbus.org Twitter: @ekkescorner
Please use plain text.
New Contributor
hacker
Posts: 2
Registered: ‎04-27-2010
My Device: Onyx
My Carrier: Rogers

Re: Problem: Get a HTTP 400 Error when initiating HTTP-Push

Do you use RIM supplied application to send pushes?

In its HTTPPushDemo.java file there is the following line:

            conn.setRequestProperty("X-RIM-Push-Reliability-Mode","APPLICATION");

Can you check whether you have it in your code?

if you do, try commenting out.

Please use plain text.
Developer
ekke
Posts: 1,476
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: Problem: Get a HTTP 400 Error when initiating HTTP-Push

yes - the server app is based on the HTTPPushDemo -

and this demo contains 

 

conn.setRequestProperty("X-RIM-Push-Reliability-Mode","APPLICATION");

 

 

I commented it out as you recommended - and now it works - the message goes through :smileysurprised:

 


 

 

now the RIM mode works - thanks for pointing this out - I never would have expected that this code - provided by RIM as an example - could be wrong.

 

the PAP mode still doesn't work.... got at first a HTTP 202 (accepted) and then PAP returned status 3007.

 

any idea why this could happen ?

 

thx

 

ekke

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
International Development Mobile Apps BlackBerry 10 Cascades
Cascades - Workshops / Trainings / Bootcamps

Open Source Enthusiast
blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner
bb10-development: http://appbus.org Twitter: @ekkescorner
Please use plain text.
Developer
vaikunth
Posts: 57
Registered: ‎01-29-2009
My Device: Not Specified

Re: Problem: Get a HTTP 400 Error when initiating HTTP-Push

[ Edited ]

Thanks hacker,

 

rim mode  working fine now.

 

pap mode  is still not working.

 

Same as ekke.

 

is there any solution for that?

Any suggestion?

 

Thanks,

Vaikunth

Please use plain text.