[jdev] Unable to delete the user
Juan Antonio Gómez Moriano
moriano.jabber at gmail.com
Sat Mar 4 14:30:04 CST 2006
El jue, 02-03-2006 a las 08:53 -0800, chen yee tan escribió:
> Hi,
>
> I am using smack 2.1.0 Client API to connect to jabber.org (ejabberd).
Me too! please note that jivesoftware has a whole forum for that
library :-)
>
> Below is the function to delete the user:
Here is how i do it
roster.removeEntry("somebody at someserver.net");
Where roster is a "Roster" object...
Good luck
>
> public void deleteUser()
> {
> XMPPConnection.DEBUG_ENABLED = true;
> XMPPConnection l_xmmpConnection = null;
>
> try
> {
> PrintLog("Delete user.");
>
> l_xmmpConnection = new XMPPConnection("noneworkstation", 5222);
> l_xmmpConnection.addPacketListener(this, new
> PacketTypeFilter(Message.class));
> l_xmmpConnection.login("tancy", "tancy");
> AccountManager l_accountManager =
> l_xmmpConnection.getAccountManager();
> l_accountManager.deleteAccount();
>
> PrintLog("User is deleted.");
> }
> catch (Exception ex)
> {
> PrintLog("Exception in deleteUser: " + ex.toString());
> }
>
> l_xmmpConnection.close();
> }
>
>
> After I ran, I got:
>
> E:\Jabber\API\Smack 2.1.0\code>java
> -classpath ../smack.jar;../smackx.jar;./ Test
> [01:23:39 AM] Delete user.
> [01:23:53 AM] Exception in deleteUser: No response from server.:
>
>
> I tried to run above function several times. Sometimes with above
> exception, the
> user is deleted.
>
> How come ? Is it a bug in ejabberd or I did wrong in the code ?
>
> Your help is really appreciated.
>
> Thanks !
>
> Tan
>
> ______________________________________________________________________
> Yahoo! Mail
> Bring photos to life! New PhotoMail makes sharing a breeze.
More information about the JDev
mailing list