Uploaded image for project: 'Smack'
  1. Smack
  2. SMACK-187

Add HTTP Binding support (BOSH / XEP-0124)

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0 Beta 1
    • Fix Version/s: 4.0.0
    • Component/s: Extensions
    • Labels:

      Description

      Add support for Smack to connect to XMPP servers via HTTP binding.
      XEP: http://xmpp.org/extensions/xep-0124.html

        Attachments

          Issue Links

            Activity

            Hide
            mcumings Mike Cumings added a comment -

            No news, sorry. I no longer have a need for this functionality and still have a noticeable lack of time for personal projects. The code for the JBOSH library can be found at:

            http://kenai.com/projects/jbosh

            or at a fork by another dev who was leveraging this for Android:

            https://github.com/zewt/jbosh

            If you wnt project administrative or committer rights to the kenai instance, just let me know.

            Show
            mcumings Mike Cumings added a comment - No news, sorry. I no longer have a need for this functionality and still have a noticeable lack of time for personal projects. The code for the JBOSH library can be found at: http://kenai.com/projects/jbosh or at a fork by another dev who was leveraging this for Android: https://github.com/zewt/jbosh If you wnt project administrative or committer rights to the kenai instance, just let me know.
            Hide
            csh csh added a comment -

            I tried Guenther's implementation. It seems to work with my Smack 3.2.1 client, but I had to do some minor changes:
            In the login method, put the authenticated = true BEFORE you load the roster, otherwise it throws IllegalStateException.

                    authenticated = true;
                    anonymous = false;
            
                    if (config.isRosterLoadedAtLogin()) {
                        this.roster.reload();
                    }
            

            Second, in the getRoster() I added:

            synchronized (this) {
                        // if connection is authenticated the roster is already set by login()
                        // or a previous call to getRoster()
                        if (!isAuthenticated() || isAnonymous()) {
                            if (roster == null) {
                                roster = new Roster(this);
                            }
                            return roster;
                        }
                    }
            

            as it is done in XMPPConnection, since I have to add a RosterListener to the roster before I login. (otherwise I my Roster didn't load properly (with XMPPConnection)).

            Show
            csh csh added a comment - I tried Guenther's implementation. It seems to work with my Smack 3.2.1 client, but I had to do some minor changes: In the login method, put the authenticated = true BEFORE you load the roster, otherwise it throws IllegalStateException. authenticated = true ; anonymous = false ; if (config.isRosterLoadedAtLogin()) { this .roster.reload(); } Second, in the getRoster() I added: synchronized ( this ) { // if connection is authenticated the roster is already set by login() // or a previous call to getRoster() if (!isAuthenticated() || isAnonymous()) { if (roster == null ) { roster = new Roster( this ); } return roster; } } as it is done in XMPPConnection, since I have to add a RosterListener to the roster before I login. (otherwise I my Roster didn't load properly (with XMPPConnection)).
            Hide
            kocke01 Kevin Kocher added a comment -

            I ran into the SSL version of a configuraion timing out as well, identical to Marjan's code above. I think I debugged the root cause to org.xlightweb.client.HttpClient

            He's throwing an IOException being caught at line 130 in com.kenai.jbosh.XLightWebResponse
            The detailMeassage is: ssl connection are not supported (use pool sslContext parameter constructor)
            Has this already been solved, or is some other workaround in place? I'm new to all of this so I'm not sure what layer in all of this would be the one to try and implement a work around. Any ideas?
            Thanks,
            -Kevin

            Show
            kocke01 Kevin Kocher added a comment - I ran into the SSL version of a configuraion timing out as well, identical to Marjan's code above. I think I debugged the root cause to org.xlightweb.client.HttpClient He's throwing an IOException being caught at line 130 in com.kenai.jbosh.XLightWebResponse The detailMeassage is: ssl connection are not supported (use pool sslContext parameter constructor) Has this already been solved, or is some other workaround in place? I'm new to all of this so I'm not sure what layer in all of this would be the one to try and implement a work around. Any ideas? Thanks, -Kevin
            Hide
            neustradamus Neustradamus added a comment -

            Any news one year after my comment?

            Show
            neustradamus Neustradamus added a comment - Any news one year after my comment?
            Hide
            flow Florian Schmaus added a comment -

            Ge0rg's patch for SMACK-463 needs to be applied to the BOSHConnection, from SMACK-187, too.

            Show
            flow Florian Schmaus added a comment - Ge0rg's patch for SMACK-463 needs to be applied to the BOSHConnection, from SMACK-187 , too.

              People

              • Assignee:
                flow Florian Schmaus
                Reporter:
                matt Matt Tucker
              • Votes:
                37 Vote for this issue
                Watchers:
                26 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: