On Fri, Apr 13, 2007 at 05:23:54PM +0200, Norman Rasmussen wrote:
> On 4/13/07, Eugeny N Dzhurinsky <[EMAIL PROTECTED]> wrote:
> >We wrote simple test, which logs into a jabber server, then registers in
> >transport and trying to send a message, but for some reason that doesn't 
> >work.
> 
> You need to subscribe to the transport, before you send it presence?
> (That XML only shows that you've added it to your roster).

I was doing as stated in
http://www.xmpp.org/extensions/xep-0100.html#usecases-jabber-register:

incoming <?xml version='1.0'?><stream:stream xmlns='jabber:client' 
xmlns:stream='http://etherx.jabber.org/streams' id='539286928' 
from='domain.com' version='1.0' xml:lang='en'><stream:features><bind 
xmlns='urn:ietf:params:xml:ns:xmpp-bind'/><session 
xmlns='urn:ietf:params:xml:ns:xmpp-session'/></stream:features>

outgoing <iq id="frdn_0" type="set"><bind 
xmlns="urn:ietf:params:xml:ns:xmpp-bind"><resource>Feridian</resource></bind></iq>

incoming <iq id='frdn_0' type='result'><bind 
xmlns='urn:ietf:params:xml:ns:xmpp-bind'><jid>[EMAIL 
PROTECTED]/Feridian</jid></bind></iq>

outgoing <iq id="frdn_1" type="set"><session 
xmlns="urn:ietf:params:xml:ns:xmpp-session"/></iq>

incoming <iq type='result' id='frdn_1'><session 
xmlns='urn:ietf:params:xml:ns:xmpp-session'/></iq>

outgoing <presence to="domain.com" from="[EMAIL PROTECTED]/Feridian" 
id="frdn_2"/>

// User Queries Gateway Regarding Service Discovery Identity

outgoing <iq type='get' from='[EMAIL PROTECTED]/Feridian' to='icq.domain.com' 
id='disco1'> <query xmlns='http://jabber.org/protocol/disco#info'/> </iq>

// Gateway Returns Service Discovery Identity

incoming <iq from='icq.domain.com' to='[EMAIL PROTECTED]/Feridian' 
type='result' id='disco1'><query 
xmlns='http://jabber.org/protocol/disco#info'><identity category='gateway' 
type='icq' name='JIT'/><feature var='jabber:iq:register'/><feature 
var='jabber:iq:search'/><feature var='jabber:iq:version'/><feature 
var='jabber:iq:time'/><feature var='jabber:iq:gateway'/><feature 
var='vcard-temp'/><feature var='jabber:iq:last'/></query></iq>

// User Queries Gateway Regarding Registration Requirements

outgoing <iq type='get' from='[EMAIL PROTECTED]/Feridian' to='icq.domain.com' 
id='reg1'> <query xmlns='jabber:iq:register'/> </iq>

// Gateway Returns Registration Requirements

incoming <iq from='icq.domain.com' to='[EMAIL PROTECTED]/Feridian' 
type='result' id='reg1'><query xmlns='jabber:iq:register'>  
<username>420874294</username>  
<password/><key>9f3c46efd1f5aa86ee059d214e905a09c869b746</key><instructions>Please
 enter your UIN and password</instructions><registered/></query></iq>

// User Provides Registration Information

outgoing <iq type='set' from='[EMAIL PROTECTED]/Feridian' to='icq.domain.com' 
id='reg2'> <query xmlns='jabber:iq:register'>  <username>123456</username> 
<password>secret</password> </query> </iq>

// Gateway Informs Jabber User of Success

incoming <iq from='icq.domain.com' to='[EMAIL PROTECTED]/Feridian' 
type='result' id='reg2'/>

// bypassing roster, since it seems to be optional
// missing "Gateway Subscribes to User's Presence" here!!!!!

outgoing <presence to="icq.domain.com" from="[EMAIL PROTECTED]/Feridian" 
id="frdn_4"/>

outgoing <presence to="icq.domain.com" id="frdn_5" type="subscribe"/>

outgoing <presence to="icq.domain.com" id="frdn_6" type="subscribed"/>
incoming <iq from='[EMAIL PROTECTED]/Feridian' to='[EMAIL PROTECTED]/Feridian' 
id='push' type='set'><query xmlns='jabber:iq:roster'><item ask='subscribe' 
subscription='none' jid='icq.domain.com'/></query></iq>

outgoing <message to="[EMAIL PROTECTED]" from="[EMAIL PROTECTED]/Feridian" 
id="frdn_7" type="normal"><body>Test passed</body></message>

outgoing <iq type='set' from='[EMAIL 
PROTECTED]/Feridian'to='icq.domain.com'id='unreg1'><query 
xmlns='jabber:iq:register'><remove/></query></iq>

outgoing </stream:stream>

If I create a roster entry, nothing really changes, I don't ever get that 
response
with registration confirmation from server.

-- 
Eugene N Dzhurinsky

Reply via email to