Results 1 to 3 of 3

Thread: SoapProvisioning for non-admin account

  1. #1
    Join Date
    Jul 2010
    Rep Power

    Default SoapProvisioning for non-admin account

    Hi folks...

    I am trying to use SoapProvisioning in order to connect to a remote ZCS 6.0 server over Linux, but can't figure a way to pass the AuthRequest namespace (xmlns = "urn:zimbraAccount") to the SoapProvisioning object, thus having the authentication failing with an UNKNOWN_DOCUMENT exception (i.e., AuthRequest is not recognized!).

    My code can connect flawlessly to the ZCS server using plain vanilla SOAP (<AuthRequest xmlns="urn:zimbraAccount"> etc.), as prescribed in docs/soap.txt. Furthermore, at a higher level of abstraction, I can replicate the same behaviour by "manually" invocating the proper request object, as follows:
    XMLElement request = new XMLElement("AuthRequest");
    request.addAttribute("xmlns", "urn:zimbraAccount");

    XMLElement accountElement = new XMLElement("account");

    XMLElement passwordElement = new XMLElement("password");


    SoapHttpTransport transport = new SoapHttpTransport("http://server.domain/service/soap/");

    However, as already explained, if I try something like
    SoapProvisioning sp = new SoapProvisioning();
    sp.soapAdminAuthenticate(username, password);

    an exception occurs (com.zimbra.common.soap.SoapFaultException: unknown document: AuthRequest).

    All the code examples I have seen employing SoapProvisioning, use HTTPS and login to an admin account.

    Does this mean that SoapProvisioning cannot authenticate a simple user account without previously authenticating an admin?

    Is there any way of authenticating a user account without "manually" constructing the command sequence and using sp.invoke()?

    Last edited by pns; 07-08-2010 at 11:09 PM.

  2. #2
    Join Date
    Jul 2010
    Rep Power


    To add to the above nuisance, it appears that the "manual" transmission of the proper request object via transport.invoke(request) is necessary for every call to the SoapProvisioning object.

    For instance, trying to get an Account object by

    Account account = sp.get(, username);

    results in the same type of com.zimbra.common.soap.SoapFaultException (although of course now the "offending" method is GetAccountRequest).

    Without a solution (or workaround) to the above, the value of the SoapProvisioning class does not seem very high... :-)

  3. #3
    Join Date
    Jul 2010
    Rep Power


    Mystery solved, after digging into the source code of the class.

    Indeed, the class is hardwired for admin accounts (namespace zimbraAdmin) and does not work for user accounts (namespace zimbraAccount), apart from rather secondary cases like authAccount.

Similar Threads

  1. Unable to assign Rights to Admin Account
    By sardarrashid in forum Administrators
    Replies: 1
    Last Post: 01-07-2010, 11:56 PM
  2. Web admin UI (RUS) search account
    By Fox_sibirsky in forum Administrators
    Replies: 2
    Last Post: 10-15-2009, 10:55 PM
  3. Date/time update killed admin account access
    By tenpagyatso in forum Installation
    Replies: 2
    Last Post: 07-01-2008, 09:26 AM
  4. [SOLVED] restricted admin account
    By captainmish in forum Administrators
    Replies: 5
    Last Post: 11-29-2007, 08:25 AM
  5. Admin Account
    By rmvg in forum Users
    Replies: 4
    Last Post: 09-18-2005, 11:03 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