There are several ways to achieve your goal.
One way to do this is using some form of Key Exchange/Agreement protocol, e.g. a Diffie-Hellman-style key exchange (cf. http://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange). As you are in a J2ME environment you would probably want to use a recent implementation using Elliptic Curves as they are more gentle on your hardware requirements.
Another way to achieve your goal would be an implementation of a secure Key Transport protocol using public key certificates but I wouldn't recommend inventing your own security protocol, rather use SSL/TLS which was specifically designed for these cases.
Based on your requirements you would either need to use SSL in its server-authenticated ("one-way SSL") or in its mutually authenticated form ("two-way SSL"). Consult your web server's documentation with regard to setting up SSL properly.
Once you set up the server it suffices to create the symmetric encryption key on the client as it is currently done and then sending the encryption key to the server using the newly set up TLS connection.
The advantage of the Diffie-Hellman solution would be that it does not necessarily involve certificates but to use it securely you would need to implement some form of Key Derivation Function (cf. http://csrc.nist.gov/publications/fips/fips186-3/fips_186-3.pdf) which is again non-trivial. Therefore I would recommend using the second approach even if it means more configuration overhead.