|
HttpConnection Using BlackBerry -
07-26-2006, 02:17 AM
i have install JDE4.1 . i have a problem in creating an HttpConnection in an sample project DatacaptureProject.
I have an web application running on websphere (port 9080).
HttpConnection conn = null;
OutputStream out = null;
int responseCode;
try {
conn = (HttpConnection) Connector.open(url);
conn.setRequestMethod(HttpConnection.POST);
conn.setRequestProperty("User-Agent", "BlackBerry/3.2.1");
String lang = conn.getRequestProperty("Content-Language");
out = conn.openOutputStream();
out.write(dataToSend.getBytes());
out.flush();
responseCode = conn.getResponseCode();
} catch (IOException e) {
System.out.println("Exception");
}
It doesnot throw any excetion nor it transfer data to the application
Can anyone help me out
Thanx in advance
|