(keitai-l) Http POST for I-mode Devices

From: Arif Rajan <arajaca_at_yahoo.ca>
Date: 10/10/01
Message-ID: <20011010174005.2491.qmail@web20808.mail.yahoo.com>
Hi,
I'm having some trouble sending data from an I-Appli
through the network to a servlet using Http POST. 
Here is the code I am using:

	HttpConnection conn = null;
	OutputStream os = null;

        conn =
(HttpConnection)javax.microedition.io.Connector.open(url,Connector.WRITE,true);
     
        conn.setRequestMethod(HttpConnection.POST); 

        os = conn.openOutputStream();
        os.write(2);
        os.flush();
        os.close();

        conn.connect(); 
        conn.close();     
   
When testing on the F503i, P503i and P503iS, there is
a com.nttdocomo.io.ConnectionException thrown when
trying to connect (conn.connect()).  The status for
this ConnectionException is ILLEGAL_STATE.  When I try
the same code on the SO503i, the connection is made,
but the POST is empty.  There are no problems when
using this code with the D503i, N503i and N503iS.

I have also tried this code using openDataOutputStream
(), yielding the same results.

Any ideas on why this may happen or suggestions on a
different method for sending data would be greatly
appreciated. 

Thanks,
Arif


_______________________________________________________
Do You Yahoo!?
Get your free @yahoo.ca address at http://mail.yahoo.ca

[ Need archives? How to unsubscribe? http://www.appelsiini.net/keitai-l/ ]
Received on Wed Oct 10 20:28:34 2001