BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 12-13-2009, 12:38 AM   #1
dlpbbdev
New Member
 
Join Date: Nov 2009
Model: none
PIN: N/A
Carrier: none
Posts: 10
Default Http Posting to URL using WAP from various carriers

Please Login to Remove!

Pulling my hair out!

I have a simple app that Http Posts to a url. Works using BES, but it doesn't for people not on BES servers - just the average BB owner using Verizon, for example.

I have looked in many threads on many forums. Lots of suggestions. None work.

Do I NEED the WapGatewayIP/WapGatewayPort appendings to the url? If so, what are they SPECIFICALLY for Verizon? I seem to be making a connection, but when I open an inputstream from the connection, it gives me an exception after a time out.

Code:

Code:
HttpConnection connection = factory.getNextConnection();
try {
	connection.setRequestMethod( "POST" );
    	connection.setRequestProperty( "Content-type","application/x-www-form-urlencoded" );
    	os = connection.openOutputStream( );
    	os.write( getPostString(email, password).getBytes() );
    	os.close();
    	is = connection.openInputStream();
    	//do something with the input stream
	int len = (int)connection.getLength();
        byte[] b = new byte[4096];
    	for (int n; (n = is.read(b)) != -1;) {
    		System.out.println("(ResultInterface(post)2): IN is.read loop - n = ["+n+"]");
    	        sb.append(new String(b, 0, n));
    	}
    	break;
}
Also, where I set the appendings to the url:

Code:
if ("T-Mobile".equalsIgnoreCase(networkName)) {
	extraParams = ";WapGatewayIP=216.155.165.5;WapGatewayAPN=wap.voicestream.com;WapGatewayPort=9201";
} else if ("Verizon Wireless".equalsIgnoreCase(networkName)) {
	extraParams = ";WapGatewayIP=12.168.70.74;WapGatewayPort=9201;retrynocontext=true;ConnectionSetup=delayed";
} else if ("Cingular".equalsIgnoreCase(networkName)) {
	extraParams = ";WapGatewayIP=66.209.11.61;WapGatewayPort=9203";
} else if ("Nextel".equalsIgnoreCase(networkName)) {
	extraParams = ";WapGatewayIP=10.1.26.207;WapGatewayPort=19781";
} else {
	extraParams = "";
}

Am I even in the ballpark?
Offline  
Closed Thread



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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


NEW Genuine OEM IBM Quietwriter Hi Density Correcting Ribbon 1299635 NOS picture

NEW Genuine OEM IBM Quietwriter Hi Density Correcting Ribbon 1299635 NOS

$19.99



OEM IBM Selectric II Key Tops & Parts picture

OEM IBM Selectric II Key Tops & Parts

$49.95



Lot of 2 IBM Correctable Ribbon Cassette Black 1299300 NOS Original OEM picture

Lot of 2 IBM Correctable Ribbon Cassette Black 1299300 NOS Original OEM

$12.00



IBM CASH DRAWER KEY'S #9960 SET OF 2 KEYS. AFTERMARKET KEY'S SAME AS OEM 33G3360 picture

IBM CASH DRAWER KEY'S #9960 SET OF 2 KEYS. AFTERMARKET KEY'S SAME AS OEM 33G3360

$18.00



DATALOGIC ADC, GRYPHON , 2D IMAGER, IBM46XX/OEM USB/RS-232 MULTI-INTERFACE,BLACK picture

DATALOGIC ADC, GRYPHON , 2D IMAGER, IBM46XX/OEM USB/RS-232 MULTI-INTERFACE,BLACK

$244.00



IBM Genuine OEM Printer Filler Wide Credit Card Holder 10N1259 picture

IBM Genuine OEM Printer Filler Wide Credit Card Holder 10N1259

$24.79







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