Pessoal,
Estou desenvolvendo uma aplicação teste pro meu celular Nokia 6100, baixei o SDK da nokia e estou trabalhando no eclipse.
Até ai tudo bem.
Quando fui tentar fazer uma conexão á web utilizando um exemplo do javaDoc, recebi o seguinte erro:
O código que estou utilizando pra tentar fazer a conexão é este:
[code] try{
c = (HttpConnection)Connector.open(“http://e-log.no-ip.info:88/j2me.asp”);
// Set the request method and headers
c.setRequestMethod(HttpConnection.POST);
c.setRequestProperty(“If-Modified-Since”,
“29 Oct 1999 19:43:31 GMT”);
c.setRequestProperty(“User-Agent”,
“Profile/MIDP-1.0 Configuration/CLDC-1.0”);
c.setRequestProperty(“Content-Language”, “en-US”);
// Getting the output stream may flush the headers
os = c.openOutputStream();
os.write("xxx=e-Logicon".getBytes());
os.flush(); // Optional, getResponseCode will flush
rc = c.getResponseCode();
if (rc != HttpConnection.HTTP_OK) {
throw new IOException("HTTP response code: " + rc);
}
} catch (IOException e) {//(ClassCastException e) {
throw new IllegalArgumentException("Not an HTTP URL");
}
[/code]
Minha conexao GPRS está funcionando normalmente, estou lendo emails e acessando a web pelo meu PALM.
O que estou fazendo de errado? :?
Obrigado!