I am using the smack library to construct an instant-messaging solution based on the latest stable jabberd2; administrative parts of that web-based instant messenger (adding/deleting users/roster-entries, changing passwords) are going to be implemented in ColdFusion MX 6.1.
I have successfully managed to create a new accounts, verify whether an account exists and log in to an existing account. When I try to delete an account, I always get XMPPError 400 (Bad Request).
The following snippet is working fine:
connection = createObject(“java”, “org.jivesoftware.smack.XMPPConnection”).init("#jabber_server#");
createAccount = AccountManager.createAccount("#sJabLogin#", “#sJabPassw#”);
login = connection.login("#sJabLogin#", “#sJabPassw#”);
deleteAccount = AccountManager.deleteAccount();
always results in that XMPPError 400. So far I have only succeeded in removing an existing account by deleting the account-data from the authreg-table, then stopping and restarting the jabberd2-server. Of course, this procedure is far from fit for production. How would I delete the account using SMACK, so I don’'t need to restart the server?