<div>Hy,</div>
<div>i&#39;m tryng to add a contact to my msn account using this code:</div>
<div>
<p>public void addContact(XMPPConnection connection, String contact, String gatewayName)<br>{<br>&nbsp;Roster roster = connection.getRoster();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String absoluteFriend = contact + &quot;@&quot; + gatewayName + &quot;.&quot; + 
connection.getServiceName();</p>
<p><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; roster.createEntry(absoluteFriend, contact, new String[] {&quot;group1&quot;});<br>}</p>
<p>but i&#39;m having a problem, and i dont know how to solve, example:</p>
<p><br>addContact(xMPPConnection, &quot;<a href="mailto:test@hotmail.com">test@hotmail.com</a>&quot;, &quot;msn&quot;);</p>
<p>Error at the console:<br>&lt;iq id=&quot;9F0m8-4&quot; to=&quot;<a href="mailto:thisUser@myservice/Smack">thisUser@myservice/Smack</a>&quot; type=&quot;error&quot;&gt;&lt;query xmlns=&quot;jabber:iq:roster&quot;&gt;&lt;item jid=&quot;
<a href="mailto:test@hotmail.com@msn.myservice">test@hotmail.com@msn.myservice</a>&quot; name=&quot;<a href="mailto:test@hotmail.com&quot;&gt;&lt;group&gt;group1&lt;/group&gt;&lt;/item&gt;&lt;/query&gt;&lt;error">test@hotmail.com&quot;&gt;&lt;group&gt;group1&lt;/group&gt;&lt;/item&gt;&lt;/query&gt;&lt;error
</a> code=&quot;400&quot;&gt;&lt;/error&gt;&lt;/iq&gt;</p>
<p><br>&nbsp;</p></div>