Hello all,

Has anyone tried using jivesoftware's Smack API to access
jabber.org? I tried some sample code on their forum but I was
getting an error. The same code (with the slight difference of
using a full email address) works fine for talk.google.com.

Or, has anyone tried any java XMPP library with success?


The error:

SASL authentication failed using mechanism PLAIN:
        at 
org.jivesoftware.smack.SASLAuthentication.authenticate(SASLAuthentication.java:325)
        at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:395)
        at com.gn.xmpp.XmppTest.main(XmppTest.java:40)

The sample code:

ConnectionConfiguration cc = new ConnectionConfiguration("jabber.org", 5222, 
"jabber.org");
XMPPConnection connection = new XMPPConnection(cc);
try {
     connection.connect();
     SASLAuthentication.supportSASLMechanism("PLAIN", 0);
     connection.login("your.jabber", "password", "resource");
     System.out.println(connection.isAuthenticated());
} catch (XMPPException e1) {
     e1.printStackTrace();
}

-- 
Best regards,
Jack

_______________________________________________
JDev mailing list
FAQ: http://www.jabber.org/discussion-lists/jdev-faq
Forum: http://www.jabberforum.org/forumdisplay.php?f=20
Info: http://mail.jabber.org/mailman/listinfo/jdev
Unsubscribe: [email protected]
_______________________________________________

Reply via email to