What Demo::JBook Will Do
The JUD can be queried using a normal Jabber client. In Figure 10-1, we can see the search form of Jabber Instant Messenger (JIM).
![]() |
The search fields are not fixed;
instead, they’re dynamically generated, according to the result of
an initial IQ-get in the jabber:iq:search
namespace. Just as an IQ-get in the jabber:iq:register
namespace (as illustrated in Section 8.3)
is used for registering users, the
jabber:iq:search namespace is is used for search requests. This is illustrated in Example 10-1,
where an IQ-get is sent to the JUD at jud.gnu.mine.nu.
SEND: <iq type="get" id="9138" to="jud.gnu.mine.nu">
<query xmlns="jabber:iq:search"/>
</iq>
RECV: <iq from='jud.gnu.mine.nu' id='9138'
to='qmacro@jabber.org/study' type='result'>
<query xmlns='jabber:iq:search'>
<first/>
<last/>
<instructions>
Fill in a field to search for any matching Jabber users.
</instructions>
</query>
</iq>In response to the IQ-get request, the JUD sends back a list of fields with which the directory can be searched, along with some simple instructions.
The actual search follows the same registration pattern (using the jabber:iq:register namespace) that we
saw in Section 8.3. After receiving a list of possible search fields, a search request is made with an IQ-set, as shown ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access
