[jdev] add, del contact from gateway
Bruno Bechler Machado
brunoasdfgh at gmail.com
Mon Mar 5 14:08:19 CST 2007
Hy,
i'm tryng to add a contact to my msn account using this code:
public void addContact(XMPPConnection connection, String contact, String
gatewayName)
{
Roster roster = connection.getRoster();
String absoluteFriend = contact + "@" + gatewayName + "." +
connection.getServiceName();
roster.createEntry(absoluteFriend, contact, new String[]
{"group1"});
}
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: <https://www.jabber.org/jdev/attachments/20070305/8d25cd42/attachment-0002.htm>
More information about the JDev
mailing list