[Standards] querying for random services

Mridul Muralidharan mridul at sun.com
Tue May 8 20:23:32 UTC 2007

Peter Saint-Andre wrote:
> Mridul Muralidharan wrote:
>> We do something similar for case of searching for conferences.
>> You send a query with the filter in an x-data form 
> So you send something like this?
> <iq type='get' from='bard at shakespeare.lit/globe' to='shakespeare.lit' 
> id='gotstun'>
>   <query xmlns='http://jabber.org/protocol/disco#items'>
>     <x xmlns='jabber:x:data' type='submit'>
>       <field var='FORM_TYPE' type='hidden'>
>         <value>urn:xmpp:discorequest:server:stun</value>
>       </field>
>     </x>
>   </query>
> </iq>

It used to be something like :
<iq type='get' from='bard at shakespeare.lit/globe' 
to='muc.shakespeare.lit' id='gotstun'>
   <query xmlns='http://jabber.org/protocol/disco#items' node="java*">
But got changed to something more proprietory under its own namespace 
(exposed as a feature). It supports cases like : return all conferences 
which start with "java" and for which user can join as 'visitor'.

>>  (used to be in the
>> node for the disco#items, but some servers were barfing on that) 
> Could you define "barfing" a little more precisely? ;-)

In the above case, (some) muc's would try to search for a node called 
'java*' in muc.shakespeare.lit and throw errors - while others would 
ignore it and return all nodes, while some others (ok, just us ;) ) 
would filter search for that node - the spec does not say how to handle 
it either way ...
This was becoming very implementation specific and so we just removed 
the old way of doing things and added declarative support as a custom 
feature exposed in disco#info.

>> and response would be a list of disco info's with jid of the item as 
>> an attribute.
> I think the response to the above would be what I posted before...

In this specific case, definitely.
I was just trying to draw a parallel :-)


>>> <iq type='result' from='shakespeare.lit' 
>>> to='bard at shakespeare.lit/globe' id='gotstun'>
>>>   <query xmlns='http://jabber.org/protocol/disco#items'>
>>>     <item jid='not-sure-what-the-jid-is!'>
>>>       <x xmlns='jabber:x:data' type='result'>
>>>         <field var='FORM_TYPE' type='hidden'>
>>>           <value>http://www.xmpp.org/extensions/xep-xxxx.html#ns</value>
>>>         </field>
>>>         <field var='host'>
>>>           <value>stun.shakespeare.lit</value>
>>>         </field>
>>>         <field var='port'>
>>>           <value>9999</value>
>>>         </field>
>>>         <field var='username'>
>>>           <value>someusername</value>
>>>         </field>
>>>         <field var='password'>
>>>           <value>somepassword</value>
>>>         </field>
>>>       </x>
>>>     </item>
>>>   </query>
>>> </iq>
> /psa

More information about the Standards mailing list