Results 1 to 4 of 4

Thread: I'm trying to use SearchAccountsRequest SOAP call

  1. #1
    Join Date
    Nov 2006
    Posts
    24
    Rep Power
    9

    Default I'm trying to use SearchAccountsRequest SOAP call

    I'm trying to use SearchAccountsRequest SOAP call w/o success. I want to query all the existing accounts that we have, but I receive 0 accounts (see below).

    <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
    <soap:Header>
    <context xmlns="urn:zimbra">
    <authToken>xxxxxxxx</authToken>
    </context>
    </soap:Header>
    <soap:Body>
    <SearchAccountsRequest xmlns="urn:zimbraAdmin" types="accounts">
    <query>(mail=*%s*)</query>
    </SearchAccountsRequest>
    </soap:Body>
    </soap:Envelope>

  2. #2
    Join Date
    Aug 2005
    Posts
    228
    Rep Power
    10

    Default

    Searching for (mail=*%s*) is only going to find accounts that have a "%s" in their email address, which is probably zero. Something like "(mail=*)" would be better.
    Bugzilla - Wiki - Downloads - Before posting... Search!

  3. #3
    Join Date
    Nov 2006
    Posts
    24
    Rep Power
    9

    Default

    thanks it worked. I have another question to ask you. I'm trying to return only one attribute called zimbraAccountStatus (see my soap call below). Unfortunately, it returns the entire list of attributes.

    <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
    <soap:Header>
    <context xmlns="urn:zimbra">
    <authToken>xxxxxxxxxxxxx</authToken>
    </context>
    </soap:Header>
    <soap:Body>
    <SearchAccountsRequest xmlns="urn:zimbraAdmin" attrs="zimbraAccountStatus" types="accounts">
    <query>(mail=*)</query>
    </SearchAccountsRequest>
    </soap:Body>

  4. #4
    Join Date
    Aug 2005
    Posts
    228
    Rep Power
    10

    Default

    That is a known issue.
    Bugzilla - Wiki - Downloads - Before posting... Search!

Similar Threads

  1. XSD/WSDL Files for the SOAP Server?
    By photoadrian in forum Developers
    Replies: 5
    Last Post: 12-23-2012, 02:32 AM
  2. Jar For Soap Client
    By wcameron in forum Developers
    Replies: 19
    Last Post: 06-03-2009, 03:04 PM
  3. Bug with preauth mechanism and SOAP headers?
    By Coilcore in forum Developers
    Replies: 3
    Last Post: 07-20-2006, 11:41 AM
  4. Replies: 13
    Last Post: 10-31-2005, 04:22 PM
  5. Replies: 18
    Last Post: 10-30-2005, 09:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •