[JDEV] (no subject)

David Waite dwaite at jabber.com
Fri Jan 12 12:43:00 CST 2001


Hiya!

You are sending a search request against jabber.org, which does not have 
search functionality. What you need to do is go against a transport 
which provides this functionality:

1. get list of transports
2. find which ones support search
3. do a 'get' to retrieve the search fields needed
4. do a 'set' with the fields supplied to do the search.

The search results will be in one of two forms
1. a 'search' packet containing all off the results
2. several 'search' packets each containing one/some of the results (all 
with the same 'id' attribute)

-David Waite

Colin Madere wrote:

> I'm only partially familiar with JabberBeans (serverside only), but 
> don't you need to send some search data?  Looks like you're building 
> an empty search request and getting a 404.
> 
> What does the JUD return when the data you sent results in a null set?
> 
>  > -----Original Message-----
>  > From: Igor Borisovsky [mailto:igor at datanaut.sci-nnov.ru]
>  > Sent: Friday, January 12, 2001 10:14 AM
>  > To: jdev at jabber.org
>  > Subject: [JDEV] (no subject)
>  >
>  >
>  > Hi all!
>  > I have a own java client for jabber server.
>  > I use jabberbeans api (http://www.jabberbeans.com).
>  > I can't to obtain the searchable fields.
>  > See example of the source code:
>  > ------------------------------------------------------------------
>  > public void sendSearchRequest()
>  >   {
>  >       InfoQueryBuilder iqb = new InfoQueryBuilder();
>  >       IQSearchRequestBuilder srb = new IQSearchRequestBuilder();
>  >       try
>  >       {
>  >           iqb.addExtension(srb.build());
>  >           iqb.setType("get");
>  >           iqb.setFromAddress(new
>  > JID(getUser(),getHostName(),getResource()));
>  >           iqb.setToAddress(JID.fromString(getHostName()));
>  >           InfoQuery iq = (InfoQuery)iqb.build();
>  >           cb.send(iq);
>  >       }
>  >       catch(Exception e)
>  >       {
>  >           System.out.println(e.toString());
>  >       }
>  >   }
>  > -----------------------------------------------------
>  > The responce from the server is:
>  > <iq to="test35 at jabber.org/ag" from="jabber.org" id="3" type="error">
>  > <error code="404">Not Found</error>
>  > <query xmlns="jabber:iq:search"></query>
>  > </iq>
>  > -----------------------------------------------------
>  > Can anyone help me?
>  > ---------------------------
>  > Igor Borisovsky
>  > Nizhny Novgorod
>  > DataNaut Inc.
>  >
>  >
>  >
>  > _______________________________________________
>  > jdev mailing list
>  > jdev at jabber.org
>  > http://mailman.jabber.org/listinfo/jdev
>  >
> 






More information about the JDev mailing list