powered by Jive Software

Smack and messages send to msn

Hi there!

I’'m sorry to take much of your time… I just have a question with regards to smack api and msn.

Here’'s the scenario;

I’'ve installed an msn transport with jabber and now I am able to send to msn using exodus client.

I’'m now writting a java program that would do the same.

I have jabber.biz.ph as my jabber domain and msn.jabber.biz.ph as for jabber and msn transport.

Suppose I have a handle alogarta@hotmail.com for msn and alogarta2@jabber.biz.ph for jabber, I notice that when exodus sends a message to msn it uses this handle;


Is it possible to use this in smack like?..

XMPPConncection con = new XMPPConnection(“jabber.biz.ph”);

con.login(“ericagj”, “password”);

Chat chat = new con.createChat(“alogarta%hotmail.com@jabber.biz.ph”);

If not, what could be the alternative way to communicate with msn?

Thank you very much for your time…


I haven’‘t tried transports before, so I’‘m not sure. Have you tried the code snippet that you typed above? If not, you should. One thing to watch out for is that the transport may not support thread ID’‘s correctly, in which case the Chat object won’‘t see reply messages. If that turns out to be true, you’'ll just want to create your own PacketCollerctor or PacketListener and filter for messages from that particular user.



Hi Matt!

Thanks for the reply…

Yeap I tried the code but it’'s not getting to msn.

If I use telnet using the xml below, it works.

All I do is log in to jabber.biz.ph and then it to msn using alogarta%hotmail.com@msn.jabber.biz.ph which is the protocol that the msn transport uses.





<iq id=’‘auth1’’ type=’‘get’’>

<query xmlns=’‘jabber:iq:auth’’>


<iq id=’‘auth2’’ type=’‘set’’>

<query xmlns=’‘jabber:iq:auth’’>




–To send to msn, I use this.

<message to=’‘alogarta%hotmail.com@msn.jabber.biz.ph’’>

This is a test from a telnet session. Did you get this?

Since the transport was installed, it’'s the server that should take care of this right?

My spool directory contains the following directory;

./spool/jabber.biz.ph and ./spool/msn.jabber.biz.ph.

./spool/msn.jabber.biz.ph is used by the transport and contains the associated msn handle.

Is there a way that I could send xml using smack if the XMPPConnection object doesn’'t work?

Thanks again for your time.


Assuming the code you entered is cut’‘n’'paste, it looks like the line: Chat chat = new con.createChat(“alogarta%hotmail.com@jabber.biz.ph”); ahould read Chat chat = new con.createChat(“alogarta%hotmail.com@msn.jabber.biz.ph”);

(add the “msn” to the host name)

I’'ve been able to use Smack to chat with MSN contacts.

Take care,