Not logged in. · Lost password · Register
Forum: MatriX RSS
Search user error.
Avatar
codingtest #1
Member since Nov 2013 · 10 posts
Group memberships: Members
Show profile · Link to this post
Subject: Search user
Search user error.

code:

  1. SearchIq sIq = new SearchIq();
  2. sIq.From = "test1@test-pc/MatriX";
  3. sIq.Type = IqType.set;
  4.    
  5. sIq.Id = "search1";
  6. sIq.Search.Last = "test";
  7.  
  8. xmpp.Send(sIq);

send iq:
  1. <iq id="search1" from="test1@test-pc/MatriX" type="set">
  2.     <query xmlns="jabber:iq:search">
  3.         <last>test</last>
  4.     </query>
  5. </iq>

receive iq:
  1. <iq type="error" id="search1" to="test1@test-pc/MatriX">
  2.     <query xmlns="jabber:iq:search">
  3.         <last>test</last>
  4.     </query>
  5.     <error code="503" type="cancel">
  6.         <service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
  7.     </error>
  8. </iq>
This post was edited 4 times, last on 2013-12-03, 12:10 by Alex.
Edit reason: added code formatting tags
Avatar
Alex #2
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
The to address is missing. You have to send the packet to the to address of your search service on your server.
The From address is not required. The server stamps all your messages automatically. So please remove the From.

Alex
Avatar
david.felix #3
Member since Jul 2015 · 23 posts
Group memberships: Members
Show profile · Link to this post
Please for openfire server, What is the search service provider address? Could it be my server name? Thanks.
Avatar
Alex #4
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
usually its the search subdomain of your xmpp domain. But in theory can be anything else.
You should see it when you disco your server, or in the server admin console.

Alex
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: MatriX RSS