Hi I am trying to use search plugin installed for openfire. I am sending an iq request using the code,
NSXMLElement *queryElement = [NSXMLElement elementWithName:@"query" xmlns:@"jabber:iq:search"];
NSXMLElement *iqElement = [NSXMLElement elementWithName:@"iq"];
[iqElement addAttributeWithName:@"type" stringValue:@"get"];
[iqElement addAttributeWithName:@"from" stringValue:@"aravind@gotztools"];
[iqElement addAttributeWithName:@"to" stringValue:@"gotztools"];
[iqElement addAttributeWithName:@"id" stringValue:@"search1"];
[iqElement addAttributeWithName:@"xml:lang" stringValue:@"en"];
[iqElement addChild:queryElement];
NSLog(@"%@",[iqElement stringValue] );
[[self appDelegate].xmppStream sendElement:iqElement];
while sending, the following request is sent,
<iq type="get" from="aravind@gotztools" to="gotztools" id="search1" xml:lang="en">
<query xmlns="jabber:iq:search"/>
</iq>
I am getting an error as,
<iq xmlns="jabber:client" type="error" id="search1" from="gotztools" to="aravind@gotztools/9bd01a04"><query xmlns="jabber:iq:search"/><error code="501" type="cancel"><feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></iq>
What is the problem with this. Please help me to solve this.
Thanks in advance..
Check whether your search plugin is enabled in openfire admin. You are trying to send request to gotztools. It is just a domain name. Check the search name in Search service Settings in server settings of your openfire admin console. Send request to that Name to get reply. Hope this helps you…