Sun Java System Mobile Enterprise Platform 1.0 Developer's Guide for Client Applications

Setting User Credentials

The Gateway Engine requires username/password authentication for secure access. Before performing a synchronization, the MIDlet must call the SyncManager.setCredentials method, which takes three arguments: the username, the password, and the HTTP/S URL of the Gateway Engine. In SecureJdbcMIDlet.java, the arguments are supplied by three GUI methods, as follows:

syncMgr.setCredentials(
        getUserName().getString(),
        getPassword().getString(),
        getSyncServer().getString());

These methods obtain input from the user and return TextField values.

The initial creation of users is a MEP administrative task, described in the Sun Java System Mobile Enterprise Platform 1.0 Administration Guide