[ejabberd] Subscribing to a parent node

kael ka-el at laposte.net
Sun Jan 24 18:41:42 MSK 2010


On 01/23/2010 09:21 AM, Vincent Courcelle wrote:
> Hi,

Hello,

> But I'm still getting the same 400 error:
> SENT: <body rid='3477435117' xmlns='http://jabber.org/protocol/httpbind' 
> sid='115cd6167f5784e2fa03ed28e6e845a5964b565a'><iq 
> from='server-dev at push.oopad.com/21017552261264233615218079 
> <http://server-dev@push.oopad.com/21017552261264233615218079>' 
> to='pubsub.push.oopad.com <http://pubsub.push.oopad.com>' type='set' 
> id='7204:pubsubcreatenode' xmlns='jabber:client'><pubsub 
> xmlns='http://jabber.org/protocol/pubsub'><create 
> node='/home/push.oopad.com/server-dev/channel'/ 
> <http://push.oopad.com/server-dev/channel'/>><configure><x 
> xmlns='jabber:x:data'><field var='FORM_TYPE' 
> type='hidden'><value>http://jabber.org/protocol/pubsub#node_config</value></field><field 
> var='pubsub#node_type'><value>collection</value></field></x></configure></pubsub></iq></body>
...
> Do you see anything wrong/different with 
> http://xmpp.org/extensions/xep-0248.html ?

Top collection nodes must be attached to the root collection node.

1. Create a 'plays' collection node attached to the root node :

<iq type='set' to='pubsub.example.org'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
   <create node='plays'/>
   <configure>
    <x xmlns='jabber:x:data' type='submit'>
     <field var='pubsub#node_type'><value>collection</value></field>
     <field var='pubsub#collection'><value/></field>
    </x>
   </configure>
  </pubsub>
</iq>


2. Create a 'princely_musings' leaf node attached to the 'plays' 
collection node :

<iq type='set' to='pubsub.example.org'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
   <create node='princely_musings'/>
   <configure>
    <x xmlns='jabber:x:data' type='submit'>
     <field var='pubsub#collection'><value>plays</value></field>
    </x>
   </configure>
  </pubsub>
</iq>


-- 
kael



More information about the ejabberd mailing list