Hello
1. What if you just use
Code:
c = (HttpConnection) Connector.open(url);
2. Not clear to me why you get a NullPointerException,
I would suggest to change
Code:
Exception conexionFailure
by the corresponding exception and see if you are actually getting a IOException, then it could be a network configuration problem, you may also print the stacktrace, getMessage() is not allways enough
3. If you are able to get connected, check out the response code to see if it is 200
Code:
int rc = c.getResponseCode();
if (rc != HttpConnection.HTTP_OK) {
throw new IOException("HTTP response code: " + rc);
}
3. Are you creating the connection in a separate thread?
4. Do you actually need all those properties set and POST method? if not, why not making it simple
Code:
try {
c = (HttpConnection)Connector.open(url);
rc = c.getResponseCode();
if (rc != HttpConnection.HTTP_OK) {
throw new IOException("HTTP response code: " + rc);
}
is = c.openInputStream();
Let us know how it goes