I'm trying to use smack in order to connect to Microsoft's Xmpp Msn api. Last april they made a change in their implementation which forces clients to implement the "see-other-host" xmpp specification. When I try to connect to "xmpp.messenger.live.com" I get
stream:error (see-other-host) at org.jivesoftware.smack.PacketReader.parsePackets(PacketReader.java:260) at org.jivesoftware.smack.PacketReader.access$000(PacketReader.java:43) at org.jivesoftware.smack.PacketReader$1.run(PacketReader.java:70)
I'm debugging and I can see the raw received packets
<stream:stream from="messenger.live.com" version="1.0" id="59784" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams">
<stream:features xmlns:stream="http://etherx.jabber.org/streams"><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"><required /></starttls></stream:features>
<proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
<stream:stream from="messenger.live.com" version="1.0" id="59785" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams">
<stream:error xmlns:stream="http://etherx.jabber.org/streams"><see-other-host xmlns="urn:ietf:params:xml:ns:xmpp-streams">BY2MSG3020517.gateway.edge.messenge r.live.com</see-other-host></stream:error>
But I'm unable to find a way in order to intercept and handle that redirect. Has anybody done this? Any help would be appreciated. Thanks.
BTW I've already post this on smack forums but got no reply, hope this is isn't considered cross-posting.
I added see-other-host support to SMACK API for try. Now i can get see-other-host address as an Exception. For Example when i try to connect to messenger.live.com address i'm successfully getting see-other-host : BAYMSG1020118.gateway.messenger.live.com . Then i try to connect BAYMSG1020118.gateway.messenger.live.com , i'm getting see-other-host again with different address: BY2MSG4010610.gateway.messenger.live.com Finally when i try to connect BY2MSG4010610.gateway.messenger.live.com , i'm getting this exception :
I'll share this result with Smack guys also. If you want, I can send to you the capture of our xmpp traffic via email. Best Regards, Alper Ozdamar