JEP-0055 should be used for search. You will find it here: http://www.jabber.org/jeps/jep-0055.html
Some servers still use the old Jabber Search. So it depends on your server. But both is supported by agsXMPP.
JEPS are extension protocols to the Core XMPP protocol. The most common Jeps are already implemented in agsXMPP. If you need one that we haven't integreated yet, you could do this yourself easily with the base classes in agsXMPP.
I think deepak and I share the same problem. I looked at the JEP and I understand the xmpp syntax, but I'm stuck trying to create the right searchrequest using agsXMPP. Can you give me a small example how to easilly search for a user?.
you need a server with search support. There are different ways to implement a search. First you have to discover the search gateway of your server using disco. Then you send a SearchIq of type=get to this Jid (here users.jabber.org)
The server will send you the supported search fields:
<iqxml:lang='en'type='result'to='gnauck@myjabber.net/Exodus'id='agsXMPP_1'from='users.jabber.org'><queryxmlns='jabber:iq:search'><instructions>Find a contact by entering the search criteria in the given fields. Note: Each field supports wild card searches (%)</instructions><first/><last/><nick/><email/></query></iq>
Fill the search fields and send the query back to the server (type=set). Here we search users with the nickname Alex.
now the thing that's funny is that users directory in Miranda is also set as 'users.osiris' but in miranda i'm getting results and through MiniClient i'm recv xml above. Any Idea?
Ok, users shouldn't be in the code you have posted, but the name of the server I presume but in that way i'm rcv this:
use the IqGrabber when sending your Query. In the IqGrabber you can define a callback for the result. In The MiniClient sample there are lots of samples how to use the IqGrabber class.
Cast the Query result to a search object (Search.cs) and call GetItems to get a list of the items in the result.
You dont have to parse the XML yourself.
This sample does no cast at all at the position you had a cast error. So there could be no invalid cast exception. If you post us a full working sample we will take a look at the code.
I have just send you email.
Well the version I have is 0.71 and I have downloaded it in Friday.
It's urgent for me to solve the problem in native way, so if you could please assist me to solve this as soon as possible.
Thx!
P.S. GetItems property is returning agsXMPP.Xml.Dom.NodeList with agsXMPP.Xml.Dom.Element items I haven't yet looked into framework but shouldn't elements be of SearchItem type?
Preky
This post was edited on 2006-02-13, 14:20 by Unknown user.