Hi,
I'm having a problem executing a series of HTTP posts using Nokia series40 (Nokia 5310 XPress Music and Nokia Emulator series 40 5th edition).
After a number of request ok (where I can also read correctly the response of the server) I get this error:
java.io.IOException:
at com.nokia.mid.impl.isa.io.protocol.internal.wap.Protocol.ensureConnec
ted(+15)
at com.nokia.mid.impl.isa.io.protocol.internal.wap.Protocol.openInputStr
eam(+8)
at com.nokia.mid.impl.isa.io.protocol.internal.wap.Protocol.openDataInpu
tStream(+8)
at com.sun.midp.io.j2me.http.Protocol.connect_wap(+532)
at com.sun.midp.io.j2me.http.Protocol.connect(+63)
at com.sun.midp.io.j2me.http.Protocol$PrivateOutputStream.flush(+21)
at java.io.DataOutputStream.flush(+7)
at com.nimbuzz.communication.jabber.JabberHTTP.sendHTTPRequest(+75)
at com.nimbuzz.communication.jabber.JabberHTTP.access$200(+5)
at com.nimbuzz.communication.jabber.JabberHTTP$RequestThread.run(+106)
The code to send the request is:
connection.setRequestMethod( HttpConnection.POST );
connection.setRequestProperty( "Content-Type", CONTENTTYPE );
connection.setRequestProperty( "Connection", "close" );
OutputStream httpOut = connection.openOutputStream();
// write data to stream
httpOut.write( httpRequest.getBytes() );
httpOut.flush();
httpOut.close();
The same code works fin on other phones or emulators.
Anyone has an advice? Did someone experience the same problem?
Emanuele Pecorari
My Linkedin profile: http://www.linkedin.com/in/emanuelepecorari
My Blog: http://j2mesoccer.splinder.com


Reply With Quote

