BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 06-26-2009, 09:54 AM   #1 (permalink)
New Member
 
majid.asgari's Avatar
 
Join Date: Sep 2008
Location: Tehran
Model: 8100
OS: Lin/WinXP
PIN: N/A
Carrier: Rogers
Posts: 10
Post Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy java.io.IOException:Tunnel Failed in a url calling

Please Login to Remove!

(I also has entered this post to wrong location (general discussion))

Hello,

I have written a code that using HTTPConnection to call a url:

HttpConnection conn = (HttpConnection) Connector.open(url);
conn.setRequestMethod(HttpConnection.GET);
int respCode = conn.getResponseCode();
...

it's ok in my Pearl and send the url correct, but on my friend's Bold, i caught this exception:
java.io.IOException:Tunnel Failed

I also test calling that by using

StreamConnection c = null;
InputStream s = null;
try {
c = (StreamConnection) Connector.open(url);
s = c.openInputStream();
...

and

ContentConnection c = null;
DataInputStream dis = null;
try {
c = (ContentConnection) Connector.open(url);
int len = (int) c.getLength();
dis = c.openDataInputStream();
...

but the same.

Also i can call the url by bb's browser and it's ok.
I tested the application by WIFI and Edge.
This is really weird :(

Thanks in advance
__________________
Regards
Majid Asgari Bidhendi
BlackBerry developer
Student of Artificial Intelligence
Offline  
Old 06-26-2009, 09:58 AM   #2 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

Connections on the BlackBerry vary from network to network. The fact that your browser works is irrelevant - it uses BIS-B (blackberry's network) and is not dependent on the carrier.

What type of connection are you attempting? What connection parameters are you adding to your URL? What network are you on?

These are the things you have to understand.

Read this article from the knowledgebase:

Livelink - Redirection
Offline  
Old 06-27-2009, 09:22 AM   #3 (permalink)
New Member
 
majid.asgari's Avatar
 
Join Date: Sep 2008
Location: Tehran
Model: 8100
OS: Lin/WinXP
PIN: N/A
Carrier: Rogers
Posts: 10
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks Dougs for the link and your help
really tnx
:*
__________________
Regards
Majid Asgari Bidhendi
BlackBerry developer
Student of Artificial Intelligence
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

OEM NEW IBM LCD Pole Display Unit 15K2012 For IBM POS - QTY +
$30.18
OEM NEW IBM LCD Pole Display Unit 15K2012 For IBM POS - QTY + pictureNEW OEM IBM SELECTRIC III TYPEWRITER PART PAPER BAIL ARMS ORIGINAL NOS
$9.99
NEW OEM IBM SELECTRIC III TYPEWRITER PART PAPER BAIL ARMS ORIGINAL NOS pictureIBM Selectric Typewriter Part Power Switch OEM 1175205 (Meter Tested GOOD)
$5.99
IBM Selectric Typewriter Part Power Switch OEM 1175205 (Meter Tested GOOD) pictureIBM Actionwriter Printwheels OEM New Lot of 9
$89.99
IBM Actionwriter Printwheels OEM New Lot of 9 pictureOEM IBM SurePOS 700 4800-743/783 250W Power Supply DPS-250AB-45A 73Y0517 73Y0518
$64.99
OEM IBM SurePOS 700 4800-743/783 250W Power Supply DPS-250AB-45A 73Y0517 73Y0518 picture






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