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  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

50Pcs Eeprom 512Kbit 45Ns W27c512-45Z W27c512 Dip New Ic G
$33.39
50Pcs Eeprom 512Kbit 45Ns W27c512-45Z W27c512 Dip New Ic G pictureAtmel AT29C512-20PC 29C512 512KBIT CMOS FLASH EEPROM PDIP32 x 1pc
$5.99
Atmel AT29C512-20PC 29C512 512KBIT CMOS FLASH EEPROM PDIP32 x 1pc picture10Pcs Dip-18 8-Bit Microcontroller Pic16f84a-04/P Pic16f84a Eeprom Ic New K
$21.03
10Pcs Dip-18 8-Bit Microcontroller Pic16f84a-04/P Pic16f84a Eeprom Ic New K picture5Pcs Am29f016b-90Ec Tssop48 Amd Flash Eeprom New Ic W
$6.55
5Pcs Am29f016b-90Ec Tssop48 Amd Flash Eeprom New Ic W picture100Pcs 24C64 Eeprom 64Kbit 400Khz At24c64 Sop8 New Ic O
$11.33
100Pcs 24C64 Eeprom 64Kbit 400Khz At24c64 Sop8 New Ic O picture






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