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.
HttpConnection httpConnection = (HttpConnection)Connector.open(url);
byte postData = Soap_req.getBytes();
int length = postData.length;
httpConnection.setRequestProperty("SOAPAction", SOAP_ACTION); out = httpConnection.openDataOutputStream();
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.