11-23-2009 08:03 AM
I've written a small Java application that receives push data from my backend. The application works fine with the simulators (server + device) but it doesn't on my real device/bes. I got a 8700 with OS 4.5.X and a BES for MDS applications 4.1.6.
i have check this article also
Check out the error descriptions from this KB article: http://www.blackberry.com/knowledgecenterpublic/li
conn.setRequestMethod("POST");//Post the data to the proxy
//Write the data
OutputStream out = conn.getOutputStream();
InputStream ins =conn.getInputStream();
int contentLength =conn.getContentLength();
if (contentLength > 0)
byte someArray = new byte [contentLength];
DataInputStream dins = new DataInputStream(ins);
1) i am getting error code 401 as after that i am comment the /* Get error */ then i will not get any error.
2) i am not getting message alert on device.i am using sample HttpPushApi from sample directory of JDE.
3)i use this URL like this http://XXX.XX.XXX.XX:8080/push?DESTINATION=XXXXXXX
waiting for reply sir.
12-02-2009 01:16 PM
HTTP error code 401 means you're not authorized to make the request. The MDS push port probably requires you to provide some username + password (Basic authentication, most likely). Another issue you might bump into is that application-level reliability only works if the device has recently requested a web page via the MDS-CS (e.g., browsed the web via the BES/MDS connection) -- therefore, I suggest you remove the reliability header until everything starts working fine.