[jdev] add, del contact from gateway

Bruno Bechler Machado brunoasdfgh at gmail.com
Mon Mar 5 14:08:19 CST 2007

i'm tryng to add a contact to my msn account using this code:

public void addContact(XMPPConnection connection, String contact, String
 Roster roster = connection.getRoster();
        String absoluteFriend = contact + "@" + gatewayName + "." +

        roster.createEntry(absoluteFriend, contact, new String[]

but i'm having a problem, and i dont know how to solve, example:

addContact(xMPPConnection, "test at hotmail.com", "msn");

Error at the console:
<iq id="9F0m8-4" to="thisUser at myservice/Smack" type="error"><query
xmlns="jabber:iq:roster"><item jid="test at hotmail.com@msn.myservice" name="
test at hotmail.com"><group>group1</group></item></query><errorcode="400"></error></iq>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.jabber.org/pipermail/jdev/attachments/20070305/8d25cd42/attachment-0002.htm>

More information about the JDev mailing list