Babbler now uses Git instead of Mercurial. Admittedly I have no extensive experience with either source control system, but judging from my limited experience with both systems, I feel Git is more suited.
In my opinion working with Git's branching model feels more natural, the tools for modifying history are better integrated (no need to install extensions) and the documentation is written more comprehensively.
So, let's give it a try!
The old Mercurial repository is still available here, but will probably be removed in the future.
Where?
ReplyDeleteHere:
Deletehttps://bitbucket.org/sco0ter/babbler.git
(You can find the project link also on the right side of this blog)
Hi! Really nice project and exactly what I was looking for. Do you have some kind of support forum? I am trying to connect according to the "Getting started Guide", but I cannot manage to connect anywhere. Keep getting sun.security.provider.certpath.SunCertPathBuilderException and some other problems, probably pure noob-mistakes by me.
ReplyDeleteHi. No there's no support forum. Maybe there will be a mailing list some time in the future. Right now, you can contact me via mail (christian dot schudt at gmx dot de)
DeleteYou probably need to provide your own SSLContext in the SecurityManager to provide a TrustStore. Or set an "TrustAllTrustManager" (for testing purposes only!), something like that:
SSLContext sslContext = SSLContext.getInstance("TLS");
sslContext.init(null, new TrustManager[]{
new X509TrustManager() {
@Override
public void checkClientTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException {
}
@Override
public void checkServerTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException {
}
@Override
public X509Certificate[] getAcceptedIssuers() {
return new X509Certificate[0];
}
}
}, new SecureRandom());
xmppSession.getSecurityManager().setSSLContext(sslContext);
Hi Christian,
DeleteI am building my client using smack sdk vs Cisco Jabber server. However, there are some limitations of smack with custom Presence and Groups, so looking for another alternative sdk and saw introduction about babbler. Look likes it is the one I should try. I did a quick implement using babbler to test it out, but I could not login. Here is my sample test
XmppClient xmppClient = null;
try {
SSLContext sslContext = CertManager.getInstance().getSSLContext("res\\cup-xmpp.pem");
TcpConnectionConfiguration tcpConfiguration = TcpConnectionConfiguration.builder()
.hostname("cimp.lab.qagood.com")
.port(5222)
.proxy(Proxy.NO_PROXY)
.keepAliveInterval(60)
.secure(true)
.sslContext(sslContext)
// I use this hostnameVerifier for smack. It works
.hostnameVerifier(new HostnameVerifier() {
@Override
public boolean verify(String string, SSLSession ssls) {
return true;
}
})
.build();
BoshConnectionConfiguration boshConfiguration = BoshConnectionConfiguration.builder()
.hostname(“lab.qagood.com")
.port(5280)
.secure(true)
.sslContext(sslContext)
// I use this hostnameVerifier for smack. It works
.hostnameVerifier(new HostnameVerifier() {
@Override
public boolean verify(String string, SSLSession ssls) {
return true;
}
})
.build();
xmppClient = new XmppClient(“lab.qagood.com", tcpConfiguration, boshConfiguration);
xmppClient.connect();
//xmppClient.connect(Jid.of("pvo1", “lab.qagood.com", "resource1")); //already test with this
xmppClient.login(“pvo1@lab.qagood.com", "password", "resource1");
} catch (Exception ex) {
System.out.println("Got exception: " + ex.getMessage());
System.out.println(ex.getStackTrace());
}
The xmppClient connects to server successful but failed on login with (rocks.xmpp.core.sasl.AuthenticationException) rocks.xmpp.core.sasl.AuthenticationException: PLAIN authentication failed with condition
Please let me know what I do wrong here.
Phuong Vo
Hi,
Deletecan we move the discussion to some other place, please? Email, mailing list or BItbucket messages. Try sending mail to xmpp-rocks@googlegroups.com
I think we need to analyze the XMPP trace to see what's wrong here.
See http://sco0ter.bitbucket.org/babbler/debugging.html
Hi Christian,
DeleteThank you for your reply. What should I do to move to other place? Just send email to xmpp-rocks@googlegroups.com?
Thanks,
Phuong Vo
Hi Christian,
DeleteIt is my fault. Upon the call login, I should login with userId only (not full) which is "pvo1" not "pvo1@lab.qagood.com". Below is correct in my case and login success:
xmppClient.login(“pvo1@lab.qagood.com", "password", "resource1");
In future if I have question about Babbler sdk, can I email to xmpp-rocks@googlegroups.com? Thanks Christian.
Phuong Vo
Hi Christian,
ReplyDeleteI tried to ask some questions by sending to xmpp-rocks@googlegroups.com but it's failed. That email address looks like invalid.
Phuong Vo
That's strange. Maybe you need to join the group. Can you try it?
Deletehttps://groups.google.com/forum/#!forum/xmpp-rocks
Otherwise send me a direct mail to christian.schudt (a) gmx.de
Hi Christian,
ReplyDeleteI think you are right. I need to be a member of group. I just make request for being a member :).
Thank you,
Phuong Vo