We are trying to implement XMPPover BOSHfor our product. The javascript library is Strophe.jsgreat for our needs on a WWW site. We request a pre-record, it is delivered, and then we use the Strophe attachment method to start our session - then we can update the messages about the presence and sending / receiving. On the iOS side, we use robbiehanson XMPPFramework, which includes a BOSH transport, but no attach method. The following is my grief, trying to make it work.
I prebind, get my sid / jid / rid, then set the internal logic inside the bosh transport and other files to say that we are already connected. Then, if I try to update the presence, including this SID, I will send:
BOSH: SEND [1248340729] = <body xmlns = "http://jabber.org/protocol/httpbind" sid = "568a3ae9" ack = "1248340728" rid = "1248340729"> <Presence> </ Presence> </ Body >
but do not get an answer. This is the last. If I try to update the presence without specifying the SID, I will send:
BOSH: SEND [1064338700] = <body xmlns = "http://jabber.org/protocol/httpbind" ack = "1064338699" rid = "1064338700"> <Presence> </ Presence> </ Body>
and go back:
BOSH: RECD [1342811427] = < body xmlns = "http://jabber.org/protocol/httpbind" xmlns: stream = "http://etherx.jabber.org/streams" authid = "9ef0ccdb" sid = "9ef0ccdb" secure = "true" = "2" = "300" = "5" wait = "60" > < : > < xmlns = "urn: ietf: params: xml: ns: xmpp-sasl" > < > </ > </ > < xmlns = "http://jabber.org/features/compress" > < > Zlib </ > </ > < bind xmlns = "urn: ietf: params: xml: ns: xmpp-bind" / " > < session xmlns =" urn: ietf: params: xml: ns: xmpp-session "/" > </: > </ >
, , PLAIN, prebind. , . SID, , ( ), :
BOSH: SEND [1342811427] = < body xmlns = "http://jabber.org/protocol/httpbind" sid = "9ef0ccdb" rid = "1342811428" > < iq type = "set" > < bind xmlns = "urn: ietf: params: xml: ns: xmpp-bind" > < s > </s > </ > </IQ> </ >
BOSH: RECD [1342811427] = < body xmlns = 'http://jabber.org/protocol/httpbind' > < iq xmlns = "jabber: client" type = "error" to = "chat. *. com/9ef0ccdb" > < bind xmlns = "urn: ietf: params: xml: ns: xmpp-bind" > < s > </s > </ > < = "401" type = "auth" > < xmlns = "urn: ietf: params: xml: ns: xmpp-stanzas "/" > </a > </IQ> </ >
. , SID, prebind, :
BOSH: SEND [1172064714] = < body xmlns = "http://jabber.org/protocol/httpbind" sid = "27e3745b" rid = "1172064715" > < iq type = "set" > < s > </s > </ > </IQ> </ >
BOSH: RECD [1172064714] = < body xmlns = "http://jabber.org/protocol/httpbind" > </ >
. , , 404, SID. SID, openfire, , 401 not authorized.
.