Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Basic SOAP Questions

  1. #11
    Join Date
    Aug 2005
    Rep Power

    Default No auth token

    Let's see. The piece that's failing is
            Account adminAcct = prov.get(, lc.getAuthtokenAccountId());
            if (adminAcct == null)
                throw AccountServiceException.NO_SUCH_ACCOUNT(lc.getAuthtokenAccountId());
    No auth token would mean lc.getAuthtokenAccountId() is null which means admin account lookup will fail.

    So... what does your request look like? Are you sure that you're including the auth token in the <context> block in the SOAP envelope?
    Last edited by dkarp; 07-13-2007 at 07:09 AM.
    Bugzilla - Wiki - Downloads - Before posting... Search!

  2. #12
    Join Date
    Jul 2006
    Rep Power

    Default exactc sequence


    I had the same problem too, I starded grom the script and
    solved it as follow (perl code)

    my $adm = new XmlDoc;
    $adm->start('AuthRequest', "urn:zimbraAdmin");
    $adm->add('name', undef, undef, $admin );
    $adm->add('password', undef, undef, $adminPsw);
    # Authenticate as admin
    my $admAuthResponse = $SOAP->invoke($admUrl, $adm->root());
    #print "Admin AuthResponse = ".$admAuthResponse->to_string("pretty")."\n";
    my $admAuthToken = $admAuthResponse->find_child('authToken')->content;
    #print "admAuthToken $admAuthToken\n";
    my $admContext = $SOAP->zimbraContext($admAuthToken, $admin);
    # my $admContextStr = $admContext->to_string("pretty");
    # print "admContextStr $admContextStr\n";
    my $delega = new XmlDoc;
    $delega->start('DelegateAuthRequest', "urn:zimbraAdmin");
    # print $userId."\n";
    $delega->add('account', undef, { by => "name"}, $userId );
    # Get a new auth token that is valid for $userId
    my $delegaAuthResponse = $SOAP->invoke($admUrl, $delega->root(),$admContext);
    # print "Delega AuthResponse = ".$delegaAuthResponse->to_string("pretty")."\n";
    my $delegaAuthToken = $delegaAuthResponse->find_child('authToken')->content;
    my $newContext = $SOAP->zimbraContext($delegaAuthToken, $userId);

    first I authenticate as admin
    then obtain a delegated authtoken
    from the new authtoken I retrieve the newContext that I can use instead of the old context obtained authenticating the user
    Last edited by lfasci; 07-13-2007 at 09:59 AM.

  3. #13
    Join Date
    May 2007
    Perth, Western Australia
    Rep Power

    Default And therein lies the key...

    Quote Originally Posted by lfasci View Post

    # Get a new auth token that is valid for $userId
    my $delegaAuthResponse = $SOAP->invoke($admUrl, $delega->root(),$admContext);
    My DelegateAuthResponse was not including the Admin Context! Simply added the context I got from the initial AuthRequest and presto, my DelegateAuthResponse was successful!

    MANY thanks to all who helped me understand this a little better!

  4. #14
    Join Date
    Sep 2007
    Rep Power


    I have posted this on another thread but this thread seems more 'soap active' so here goes ... hopefully i can get some help ...thanks folks ...

    __________________________________________________ ________________

    I have major SOAP connectivity issues as well and have almost given up pursuing this. I tried using the Java code mentioned in an earlier post to no avail. Here is my code and the errors are meaningless as i dont have the source code for SoapTransport..

    SoapProvisioning sp = new SoapProvisioning();
    createZimbraAccount = sp.createAccount("username", "password", getMap());

    and my error is ...
    at org.apache.commons.logging.LogFactory.getLog(LogFa
    at org.apache.commons.httpclient.HttpClient.<clinit>(
    at com.zimbra.soap.SoapHttpTransport.<init>(SoapHttpT
    at ZimbraSoap.createUser(
    at ZimbraSoap.main(

    Ive included zimbrastore.jar into my project along with the other jar files. is your issue similar to this ...

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. Basic Installation Questions
    By jhoelz in forum Installation
    Replies: 7
    Last Post: 03-02-2007, 12:21 PM
  3. Project Management, Testing and basic Javascript questions
    By JoshuaPrismon in forum Developers
    Replies: 2
    Last Post: 01-08-2007, 03:30 PM
  4. new to ZCS.. just two questions basic install
    By sewerynb in forum Installation
    Replies: 4
    Last Post: 10-12-2006, 12:55 PM
  5. Replies: 6
    Last Post: 03-17-2006, 10:40 AM

Posting Permissions

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