Results 1 to 4 of 4

Thread: Performing zimbraAdmin SOAP calls with a zimlet

Hybrid View

  1. #1
    Join Date
    Apr 2008
    Location
    Vancouver, BC
    Posts
    54
    Rep Power
    7

    Default Performing zimbraAdmin SOAP calls with a zimlet

    Quick question: I'm working on a zimlet to let resource admins modify certain properties of their resource (name, desc, etc). Can I do urn:zimbraAdmin SOAP calls directly within JavaScript using AjxSoapDoc, etc., or do I need to do it externally with a JSP (or Perl, or...)?
    Graham Ballantyne
    Simon Fraser University

  2. #2
    Join Date
    Apr 2008
    Location
    Vancouver, BC
    Posts
    54
    Rep Power
    7

    Default

    Bump. Anyone?
    Graham Ballantyne
    Simon Fraser University

  3. #3
    Join Date
    Apr 2008
    Location
    Vancouver, BC
    Posts
    54
    Rep Power
    7

    Default

    Pretty slow around here lately...

    I think I've determined that you can't include a perl .cgi in the zimlet .zip file and try to call it through an Ajax call -- it returned the full text of the script and didn't execute it. So, I'm guessing that I have two options:

    1. Host the script somewhere else and access it through the proxy
    2. Use a JSP


    I'd like to avoid an external script, so: can I make admin SOAP calls (getting and setting account properties), and if so, does anyone have an example?
    Graham Ballantyne
    Simon Fraser University

  4. #4
    Join Date
    Nov 2007
    Location
    Detroit, MI
    Posts
    67
    Rep Power
    8

    Default

    Sure, this should get you going do a SOAP ADMIN call via JSP in a Zimlet on the server side:

    Code:
    String adminuser = "adminuser@zimbra.my.org";
    String adminpassword = "mypassword";
    
    // Standard SOAP URL on the local host
    String soapurl = "https://127.0.0.1/service/soap/";
    // Admin SOAP URL on the local host
    String adminsoapurl = "https://127.0.0.1:7071/service/admin/soap/";
    
    // Authenticate as the admin user
    SoapProvisioning sp = new SoapProvisioning();
    sp.soapSetURI(adminsoapurl);                      
    sp.soapAdminAuthenticate(adminuser,adminpassword);       
    SoapHttpTransport soapHttpTransport = new SoapHttpTransport(sp.soapGetURI());
    soapHttpTransport.setAuthToken(sp.getAuthToken());
    BTW: there are many examples of how to do the proxy call to an external service in the Zimlet code provided w/ Zimbra.
    Last edited by ab5602; 03-13-2009 at 07:39 PM.

Similar Threads

  1. Replies: 21
    Last Post: 02-04-2010, 10:06 AM
  2. Outlook 2007 Beta error
    By bersrker in forum Zimbra Connector for Outlook
    Replies: 13
    Last Post: 07-17-2008, 08:38 AM
  3. [SOLVED] Zimlet with Soap Calls
    By ab5602 in forum Zimlets
    Replies: 1
    Last Post: 05-04-2008, 10:42 PM
  4. Replies: 5
    Last Post: 01-11-2008, 05:34 AM
  5. Post instsallation problems
    By Assaf in forum Installation
    Replies: 14
    Last Post: 01-29-2007, 11:38 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
  •