BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 07-21-2009, 04:04 AM   #1 (permalink)
New Member
 
Join Date: Feb 2009
Model: na
PIN: N/A
Carrier: na
Posts: 11
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default HTTP Connection Error (Stream not in SetupState)

Please Login to Remove!

Am using the below code for accessing a web service.Am getting a IO exception (Stream not in set-up state) error in the highlighted line.

Code:
HttpConnection httpConnection = (HttpConnection)Connector.open(url);
byte[] postData = Soap_req.getBytes();
int length = postData.length;
httpConnection.setRequestMethod(HttpConnection.POST);httpConnection.setRequestProperty("Content-Length", length);            
httpConnection.setRequestProperty("Content-Type", "text/xml;charset=utf-8");
httpConnection.setRequestProperty("SOAPAction", SOAP_ACTION);          out = httpConnection.openDataOutputStream();            
out.write(postData);            
out.flush();
Am i doing something worng?
When i ran the code first time in the Simulator i was able to get a response successfully. But after that, each time it is giving this error.

TIA
Sam
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

TEKTRONIX AM503B CURRENT PROBE AMPLIFIER (tested)
$365.0
TEKTRONIX AM503B CURRENT PROBE AMPLIFIER (tested) picture10pcs LM2902N LM2902 Quadruple Operational Amplifiers Manu: TI Package: DIP-14
$1.8
10pcs LM2902N LM2902 Quadruple Operational Amplifiers Manu: TI Package: DIP-14 pictureYaskawa SGMAH-02AAA2B AC Servo Motor 200W (free shipping)
$165.0
Yaskawa SGMAH-02AAA2B AC Servo Motor 200W (free shipping) picture1pc used Yaskawa servo drives amplifier SGDS-04F01A
$299.86
1pc used Yaskawa servo drives amplifier SGDS-04F01A pictureNMB TECHNOLOGIES IMC BOXER FAN 4710PS-12T-B30 115V 50/60HZ SEALED TWO PACK
$18.0
NMB TECHNOLOGIES IMC BOXER FAN 4710PS-12T-B30 115V 50/60HZ  SEALED TWO PACK picture






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