XMPP - user search in iphone sdk ? use of XEP-0055 in iphone sdk?

ぐ巨炮叔叔 提交于 2019-12-24 04:46:14

问题


i am sending this IQ to openfire server

< iq type="set" from="admin@localhost.localdomain" to="localhost.localdomain" id="search2" xml:lang="en" > < query xmlns="jabber:iq:search" > < first > admin < /first > < /query > < /iq >

but getting following response from server,

< iq type="error" id="search2" from="localhost.localdomain" to="admin@localhost.localdomain/b91c09e5"><query xmlns="jabber:iq:search" >  < first > admin < /first > < /query > < error code="501" type="cancel" > < feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/ > < /error > < /iq >

even if i have installed search plugin and also enabled user search in openfire server...

Why this is happening ? How to solve this issue ? Any suggestion or help ?

i have also sent disco query to server to check which features are supported:

Input:

here what i get as output:

i didn't find anything related to user search on server in this list....!!


回答1:


urn:ietf:params:xml:ns:xmpp-stanzas

I think you need to handle "stanzas" from your client application.




回答2:


Sometimes you have to send XEP-55 to another component. Use XEP-30 (Disco) to search your local server for a component that implements the jabber:iq:search feature.




回答3:


<iq type='set' id='purple9ae3ed' to='vjud.yourserver.org'>
   <query xmlns='jabber:iq:search'>
     <x xmlns='jabber:x:data' type='submit'>
        <field var='first'><value>Rub*</value></field>
    </x>
  </query>
</iq>


来源:https://stackoverflow.com/questions/6385151/xmpp-user-search-in-iphone-sdk-use-of-xep-0055-in-iphone-sdk

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!