15 August 2012

Strophe fix for JabberHttpBindingServlet

Strophe.js is best xmpp bosh library , but we found problem with JabberHttpBindingServlet connection ,i tried lot of hours for searching the solution from google , but no luck ,so myself dig the code after nearly one hour i got it . The problem is JHBServlet is expeting child node or empty child node form XMPP_RESTART body tag,but strophe is sending self-closed body tag

Solution : strophe.js

   if (this._data[i] === "restart") {
             to: this.domain,
             "xml:lang": "en",
             "xmpp:restart": "true",
             "xmlns:xmpp": Strophe.NS.BOSH
              body.t(' ');  //Solution                       
          } else {

or download modified source Strophe.js

1 comment:

EricLewis said...

After searching much more, finally I got the solutions of my problem by your blog and easily access the codes by library.