XEP - 0055 with iOS and ejabberd?

筅森魡賤 提交于 2019-12-01 14:00:15

问题


I am trying to implement XEP-0055 which is supported by ejabbed as shown here in supported xeps

This is my request:

XMPPIQ *iq = [[XMPPIQ alloc] init];
[iq addAttributeWithName:@"type" stringValue:@"get"];
[iq addAttributeWithName:@"from" stringValue:@"testuser1@company.com"];
[iq addAttributeWithName:@"to" stringValue:@"company.com"];
[iq addAttributeWithName:@"id" stringValue:@"search1"];
XMPPElement *query = [XMPPElement elementWithName:@"query"];
[query setXmlns:@"jabber:iq:search"];
[iq addChild:query];
[self.xmppStream sendElement:iq];

I am getting this response:

<iq xmlns="jabber:client" from="company.com" to="testuser1@company.com/2834146151141475281662718" type="error" id="search1">
<query xmlns="jabber:iq:search"/>
<error code="501" type="cancel">
<feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
</error>
</iq>

Why am I receiving feature-not-implemented? Link to official XEP description.


回答1:


In ejabberd, the search functionality is delegated to a subdomain, by default using the vjud prefix. Try sending the search request to vjud.company.com instead.



来源:https://stackoverflow.com/questions/26800596/xep-0055-with-ios-and-ejabberd

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