pubsub xmpp中的功能未实现错误

时间:2012-08-02 09:55:57

标签: xmpp publish-subscribe ejabberd bosh

我正在尝试根据ejabberdBOSH Managerpubsub model中创建一个节点。但是,当我尝试做同样的事情时,我得到feature-not-implemented错误。我真的不知道背后的原因是什么。

出于隐私原因,我已使用example.com

替换实际域名

这是我创建的整个工作流程 - >发送配置 - >收到回复。

1)从客户端

创建节点发送
<body rid='2941054258' xmlns='http://jabber.org/protocol/httpbind' sid='79a157493e8d93a93949c358bd71bc394499bebd'>
    <presence xmlns='jabber:client'>
        <priority>-1</priority>
    </presence>
    <iq to='pubsub.example.com' type='set' xmlns='jabber:client' id='5224:sendIQ'>
    <pubsub xmlns='http://jabber.org/protocol/pubsub'>
        <create node='news'/>
    </pubsub>
    </iq>
</body>

2)创建从服务器接收的节点

<body xmlns='http://jabber.org/protocol/httpbind'>
    <presence xmlns='jabber:client' from='hunty@example.com/4529683821343890277773299' to='niharb@example.com/6976111021343894644477923'>
        <priority>-1</priority>
        <delay xmlns='urn:xmpp:delay' from='hunty@example.com/4529683821343890277773299' stamp='2012-08-02T06:51:19Z'>
        </delay>
    <x xmlns='jabber:x:delay' stamp='20120802T06:51:19'/>
    </presence>
    <presence xmlns='jabber:client' from='niharb@example.com/6976111021343894644477923' to='niharb@example.com/6976111021343894644477923'>
        <priority>-1</priority>
    </presence>
    <iq xmlns='jabber:client' from='pubsub.example.com' to='niharb@example.com/6976111021343894644477923' id='5224:sendIQ' type='result'>
    <pubsub xmlns='http://jabber.org/protocol/pubsub'>
        <create node='news'/>
    </pubsub>
    </iq>
</body>

3)将配置发送到服务器

<body rid='2941054259' xmlns='http://jabber.org/protocol/httpbind' sid='79a157493e8d93a93949c358bd71bc394499bebd'>
    <iq to='pubsub.example.com' type='set' xmlns='jabber:client' id='5225:sendIQ'>
        <pubsub xmlns='http://jabber.org/protocol/pubsub#owner'>
            <configure node='news'>
            <x xmlns='jabber:x:data' type='submit'>
                <field var='FORM_TYPE' type='hidden'>
                    <value>http://jabber.org/protocol/pubsub#node_config</value>
                </field>
                <field var='pubsub#deliver_payloads'>
                    <value>1</value>
                </field>
                <field var='pubsub#send_last_published_item'>
                    <value>never</value>
                </field>
                <field var='pubsub#persist_items'>
                    <value>1</value>
                </field>
                <field var='pubsub#max_items'>
                    <value>20</value>
                </field>
            </x>
            </configure>
        </pubsub>
    </iq>
</body>

4)从服务器返回配置错误功能未实现

<body xmlns='http://jabber.org/protocol/httpbind'>
    <iq xmlns='jabber:client' from='pubsub.example.com' to='niharb@example.com/6976111021343894644477923' type='error' id='5225:sendIQ'>
    <pubsub xmlns='http://jabber.org/protocol/pubsub#owner'>
    <configure node='news'>
    <x xmlns='jabber:x:data' type='submit'>
        <field var='FORM_TYPE' type='hidden'>
            <value>http://jabber.org/protocol/pubsub#node_config</value>
        </field>
        <field var='pubsub#deliver_payloads'>
            <value>1</value>
        </field>
        <field var='pubsub#send_last_published_item'>
            <value>never</value>
        </field>
        <field var='pubsub#persist_items'>
            <value>1</value>
        </field>
        <field var='pubsub#max_items'>
            <value>20</value>
        </field>
    </x>
    </configure>
    </pubsub>
    <error code='501' type='cancel'>
        <feature-not-implemented xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
    </error>
    </iq>
</body>

0 个答案:

没有答案