BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 04-05-2009, 05:21 AM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Mar 2009
Model: 8120
PIN: N/A
Carrier: gmail
Posts: 18
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default problem with https connection

Please Login to Remove!

hi guys ....................i m having some problem with https or http connection in my blackberry application....

i m trying to open connection like....

HttpsConnectionconn = null;
String url="https://test.abhi.net/gateway/transaction.dll";
conn = (HttpsConnection)Connector.open(url);
System.out.println("connection opened");

DataOutputStream out = new DataOutputStream(conn.openOutputStream());
StringBuffer sb = new StringBuffer();


sb.append("data for send to url");
out.write(sb.toString().getBytes());
out.flush();
out.close();

but it is not opening the connection and showing "connection does not exist" message on console .....and even my message system.o.p("connection opened ") also not printing ...................

even same code i tried with http connection class also........problem remains same.
any suggestions..?
Offline  
Old 04-05-2009, 10:21 AM   #2 (permalink)
BlackBerry Extraordinaire
 
Join Date: Jan 2006
Model: LEZ10
OS: 10.0.10
Carrier: Rogers CA
Posts: 1,704
Post Thanks: 20
Thanked 77 Times in 68 Posts
Default

Ok, first go and read this thread, please.

Then read the API documentation on HTTPConnection and HTTPSConnection.

If you want to send data to an HTTP(S) connection you use the POST protocol. There is an example in the API documentation for HTTPConnection.
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

Reconditioned Windsor Commodore 20 Carpet Extractor
$3025.0
Reconditioned Windsor Commodore 20 Carpet Extractor pictureJelenko commodore VPF porcelain furnace
$800.0
Jelenko commodore VPF porcelain furnace pictureNEW HOLDEN RACING TEAM FLAG BANNER BLACK 3X5FT 150X90CM MONARO COMMODORE HSV UTE
$7.99
NEW HOLDEN RACING TEAM FLAG BANNER BLACK 3X5FT 150X90CM MONARO COMMODORE HSV UTE pictureDDC IEEE-448 DATA BUS ADAPTER ILC DEVICE DBA-488 HPIB GPIB COMMODORE HP USED
$580.35
DDC IEEE-448 DATA BUS ADAPTER ILC DEVICE DBA-488 HPIB GPIB COMMODORE HP USED pictureComfort Products Inc. Commodore II Big & Tall Leather Executive Chair Black #871
$199.89
Comfort Products Inc. Commodore II Big & Tall Leather Executive Chair Black #871 picture






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