powered by Jive Software

Using SMACK for communications through gateways (ICQ/AIM/etc)

Hello! I am aimed to develop some simple messaging component, which needs to be able to send an instant message to jabber/ICQ/AIM/MSN accounts. I had successfully wrote implementation for the Jabber protocol, but I’'m lost with ICQ/etc. How can I send messages using such transports?

I installed and configured ejabberd service and pyicq-t transport seems to be up and running.

Could somebody please advice?

Step 1: switch to Openfire and the gateway plugin on the server side. The gateways are far, far easier to use in that setup.

Step 2: check out the gateway XEP – you’'ll see all the details in there about how to register an account with the gateway, send messages, etc.

You could also check out the gateway implementation in Spark.



Well, I have to deal with any Jabber server with installed transports, so I guess openfire+plugins aren’'t useful for me.

Is it possible to use transports with SMACK API at all? If so - could you please point me to a right direction?

thank you in advance!

matt wrote:

Step 1: switch to Openfire and the gateway plugin on the server side. The gateways are far, far easier to use in that setup.

The gateway plugin doesn’‘t support ICQ, so I don’‘t think that’'s an option for jdevelop (and myself, for that matter).

It’'s possible to use gateways, you just need jabber:iq:register and presence-packets.

Do I also need to send those registration packets? In other words, what steps involves gateway networking?

  1. request registration packet

  2. send registration information with given key, username/password etc

  3. check registration status

  4. send presense packet?

  5. send/receive various event

  6. deregister

Am I correct?

I found JEP_100.java file in SVN repository, which seems to contains such steps, is it good to use this file as a reference for gateway communication modules in my application?

jdevelop wrote:

  1. request registration packet
  1. send registration information with given key, username/password etc

1-2 has only to be done once, it’'s permanently stored on the server.

  1. check registration status

Don’'t know what you mean by that.

  1. send presense packet?

That’'s not explicitly required when the transport is on the roster.

  1. send/receive various event

This doesn’'t need any special treatment compared to normal XMPP communication.

  1. deregister

Only required when you never want to use the transport again (with that identification).

Okay, is there any working example I could learn from? I found with JEP_100.java I can’'t even register to the ICQ gateway.

Okay, I was able to wrote some code, which seems to successfully register in ICQ transport, but for some reason I can’‘t send any message (message seems to be sent, but it doesn’'t appear in ICQ client)

The source class is available at http://rafb.net/p/MvqzBt46.html ( I really wandering, how is it possible to paste source code here?)

Could somebody please advice?

Could somebody please explain why I’'m getting org.jivesoftware.smack.PacketReader$4 class in my PacketFilter implementation, when I expect to get Registration packet?

After I send registration packet to my ICQ transport, it replies with some packet which is not known by smack, or I do miss something?