Results 1 to 3 of 3

Thread: java program to creataccount

  1. #1
    Join Date
    Mar 2009
    Rep Power

    Default java program to creataccount

    Hi All,
    I Installed zimbra 5 version and working fine. I can able to create account by using "zmprov ca password". But my requirement is to do it programatically.
    I want to create the zimbra account once the user create the account in my java project. In my java project i use srvlet code to enter user details in the MYSQL table. Once my account is created i want to create the zimbra account with the same user name and password . Is it possible to create account through SOAP. If so how???????? I have seen in PHP they are using the SOAP connection to create account. But i dont know PHP??????? I want to create the account through JAVA.
    Is it possible to complete my requirement???????? If so how

    1) What are all the jar files need from zimbra to call createaccount from my java file?????
    2) What are all the fields present in the createaccount method.

    Is ZimbraId field is mandatory?? if so how we can generate zimbraId ??????

    thanks in advance.


  2. #2
    Join Date
    Nov 2007
    Detroit, MI
    Rep Power


    Hello, this should be close to what you are looking for.. It creates a calendar resource (zimbra user) via Java:

    <%@ page import="com.zimbra.cs.account.soap.*" %>
    <%@ page import="com.zimbra.common.soap.*" %>
    <%@ page import="com.zimbra.common.soap.Element.XMLElement" %>
    <%@ page import="com.zimbra.common.service.ServiceException" %>
    // Standard SOAP URL on the local host
    String soapurl = "";
    // Admin SOAP URL on the local host
    String adminsoapurl = "";
    SoapProvisioning sp = new SoapProvisioning();
    SoapHttpTransport soapHttpTransport = new SoapHttpTransport(sp.soapGetURI());
    XMLElement req = new XMLElement("CreateCalendarResourceRequest");
    req.addAttribute("xmlns", "urn:zimbraAdmin");
    Element name = req.addElement("name").setText(resname.concat("@").concat(thisserver));
    Element pass = req.addElement("password").setText(pw1.toString());
    Element tagsResponse = soapHttpTransport.invoke(req);

  3. #3
    Join Date
    Mar 2009
    Rep Power


    thank you ab

    The code seems to be JSP code. I want to know the method and parameters to pass to create account in zimbra. I also have the following queries
    1) Did we want to add any zimbra jar files to our java class path??? if so what are all the jar files i want to copy to my class path???
    2) What is the exact method to call for create account in zimbra soap????

    This may be simple question. But i am very new to zimbra

    Again thank you ab


Similar Threads

  1. Zimbra .pids / service monitoring
    By bin2hex in forum Administrators
    Replies: 24
    Last Post: 04-03-2010, 09:12 PM
  2. Replies: 0
    Last Post: 12-17-2008, 07:43 AM
  3. Tomcat, Java VM Problems - RAM related? Help
    By Mo_Hong in forum Administrators
    Replies: 3
    Last Post: 03-28-2007, 02:00 PM
  4. Java 1.5 crashing on PPC Mac 10.4.8
    By bradn in forum Installation
    Replies: 1
    Last Post: 12-08-2006, 05:27 PM
  5. Replies: 0
    Last Post: 12-04-2005, 01:34 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