BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 11-11-2009, 01:06 AM   #1 (permalink)
New Member
 
Join Date: Nov 2009
Model: 9500
PIN: N/A
Carrier: Indosat
Posts: 2
Post Thanks: 0
Thanked 0 Times in 0 Posts
Question Error in Sample Push Application (Server 403 Error)

Please Login to Remove!

I tried sample push application from blackberry. (I don't know the download URL, the package is named 'http_push2') The one that created for the device works just fine, listening on port 4321.

The data I input to server (tomcat 6.0 running on port 8181):
BES IP/Name: localhost
BES Push Port: 8080
Device PIN/Emain: 2100000a
Device Port: 4321

here is the mds config I use (rimpublic.property. mostly default):
Code:
[WebServer]
WebServer.Tomcat.transcoding=false
WebServer.listen.host=localhost
WebServer.listen.port=8080
WebServer.listen.sslport=8443
WebServer.servlet.push.port=81
WebServer.servlet.push.host=localhost
WebServer.servlet.sb.ssl=false
WebServer.servlet.sb.authentication=false

[IPPP]
IPPP.push.listen.tcp.port=81
IPPP.connection.MaxNumberOfKBytesToSend=256
IPPP.queue.flowcontrol.window.size=-1
IPPP.queue.flowcontrol.timeout=600000
IPPP.logging=true

[UDP]
UDP.receive.port=19781
UDP.send.default=19780
UDP.send.host=localhost
UDP.logging=false

[HTTP HANDLER]
application.handler.http.logging = true
application.handler.http.CookieSupport = true
application.handler.http.AuthenticationSupport = true
application.handler.http.AuthenticationTimeout = 3600000
application.handler.http.device.connection.timeout = 120000 
application.handler.http.server.connection.timeout = 120000

[HTTPS HANDLER]
application.handler.https.allowUntrustedServer = false

[TLS HANDLER]
application.handler.tls.allowUntrustedServer = false
application.handler.tls.logging = true

[Simulator]
Simulator.2100000a=localhost:81,simulator@pushme.com

push.application.reliable.ports=4321


When executing this code on push.jsp on server

PHP Code:
    try {
        
//open the connection using the static member...
        
HttpURLConnection conn =(HttpURLConnection)pushURL.openConnection();
        
conn.setDoInput(true);//For receiving the confirmation
        
conn.setDoOutput(true);//For sending the data
        
conn.setRequestMethod("POST");//Post the data to the proxy
        //Write the data
        
OutputStream os conn.getOutputStream();
        
os.write(data.getBytes());
        
os.close();
        
//Read the reponse
        
InputStream ins conn.getInputStream();
        
int contentLength conn.getContentLength();
        if (
contentLength 0){
            
bytexxx91;xxx93; someArray = new byte xxx91;contentLengthxxx93;;
            
DataInputStream dins = new DataInputStream(ins);
            
dins.readFully(someArray);
            
String output = new String(someArray);
        } 
// end if
        
ins.close();
        
conn.disconnect();
        
ins null;
        
os null;
        
conn null;
    } catch (
IOException e) {
%>
Error! <%=e.toString()%> 
<%
    }
%> 

I got this error:

Quote:
java.io.IOException: Server returned HTTP response code: 403 for URL: http //localhost:8080/push?DESTINATION=2100000a&PORT=4321&REQUESTURI=/
The next line says "PUSH SUCCESS!"... quite strange :(
Offline  
Old 11-11-2009, 02:41 AM   #2 (permalink)
New Member
 
Join Date: Nov 2009
Model: 9500
PIN: N/A
Carrier: Indosat
Posts: 2
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Update: when I tried to access the URL directly, I got this:

type: Status report

message: could not map device 2100000a to an IPPP host.

description: Access to the specified resource (could not map device 2100000a to an IPPP host.) has been forbidden.

Offline  




Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.