0
votes

I am calling a web service from blackberry when I try to open a connection using Http Connection it throws uncaught exception.

"Uncaught Exception: Application is not responding: process terminated"

Everything is working fine if I use EVO or WIFI but in my network few services are blocked and URL I am passing in open connection is also blocked.

I am using this code

url="http://mywebservice/"+ PhoneNo + "/" + RegistrationNo+"/" + PinCode;
String URL = url +getConnectionString()+";ConnectionTimeout=20000";
con = (HttpConnection)Connector.open(URL,Connector.READ_WRITE,true);

Please suggest any solution or how can we check that if requested URL is available or blocked?

1
Please show us your code - Nate

1 Answers

0
votes

An educated guess: You are opening connection via EDT - Event Dispatch Thread (main app thread) this thread can not be used for time consuming operations (connection handling in your example). You need to do these tasks on different threads.