[jdev] sending presence to specific transport

Eugeny N Dzhurinsky bofh at redwerk.com
Mon May 21 07:10:10 CDT 2007


Hello!

Could somebody please explain, how is it possible to login into some
transport? I have a jabber account and this account has several transports it
is registered in. Now I need to send presence to one of the transports, but it
seems not working.

After I connect to jabber server, I'm sending presence packet:

<presence to="my.domain.com" id="frdn_2"><status>Online</status></presence>
then I request discovery information

<iq to="icq.my.domain.com" from="ds at my.domain.com/Feridian"
id="icq1" type="get"><query xmlns="http://jabber.org/protocol/disco#info"/></iq>

<iq from='icq.my.domain.com' to='ds at my.domain.com/Feridian'
type='result' id='icq1'><query
xmlns='http://jabber.org/protocol/disco#info'><identity category='gateway'
type='icq' name='ICQ Transport'/><feature
var='http://jabber.org/protocol/disco'/><feature
var='http://jabber.org/protocol/commands'/><feature
var='jabber:iq:register'/><feature var='jabber:iq:time'/><feature
var='jabber:iq:gateway'/><feature var='jabber:iq:last'/><feature
var='vcard-temp'/><feature var='jabber:iq:version'/></query></iq>

Then I request registration information

<iq to="icq.my.domain.com" from="ds at my.domain.com/Feridian"
id="icq1" type="get"><query xmlns="jabber:iq:register"/></iq>

<iq from='icq.my.domain.com' to='ds at my.domain.com/Feridian'
id='icq1' type='result'><query xmlns='jabber:iq:register'><instructions>Please
type your ICQ user id number into the username field and your
password.</instructions><username>123456789</username><password/><registered/></query></iq>

And finally I'm trying to send presence (login into) transport:

<presence to="icq.my.domain.com" from="ds at my.domain.com/Feridian"
id="icq1"><status>Online</status></presence>

but I don't get any response!

In case if I send broadcast presence packet, transport responds with online
status.

What do I miss here?

-- 
Eugene N Dzhurinsky



More information about the JDev mailing list