Results 1 to 6 of 6

Thread: Manage Zimbra through SOAP messages

  1. #1
    Join Date
    Feb 2006
    Location
    Hungary, Budapest
    Posts
    14
    Rep Power
    9

    Question Manage Zimbra through SOAP messages

    Hi everybody!

    first of all, Zimbra is cool

    Secondly, the problem....

    I really new in SOAP technology. I would like to do anything through SOAP messages. I figured out, that first i need an auth token, to do anything else. I tried the following way:

    web service url: https://www.myhost.com:7071/service/admin/soap/

    message is:
    <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
    <soap:Header>
    <context xmlns="urn:zimbra"><nosession/></context>
    </soap:Header>
    <soap:Body>
    <AuthRequest xmlns="urn:zimbraAccount">
    <account by="name">myusername@myhostname.host.com</account>
    <password>mypassword is here</password>
    </AuthRequest>
    </soap:Body>
    </soap:Envelope>
    I got an answer:
    IO exception occured: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderE xception: unable to find valid certification path to requested target
    The server is not on my machine.

    Its seems that I have no certificate somewhere.
    The problem is on the server, or on the client ?
    Could you help me?
    What certificate i need and where?

    I cannot find any thread connected to this in forum, or any doc.

    Thanks
    Saby

  2. #2
    Join Date
    Aug 2005
    Location
    San Mateo, CA
    Posts
    4,789
    Rep Power
    19

    Default

    Seems like your client isn't working with the SSL connection. If you use the web UI for admin does everything work ok? If so then the problem must be the clicnt your using to post the SOAP requests.
    Looking for new beta users -> Co-Founder of Acompli. Previously worked at Zimbra (and Yahoo! & VMware) since 2005.

  3. #3
    Join Date
    Feb 2006
    Location
    Hungary, Budapest
    Posts
    14
    Rep Power
    9

    Default

    do you mean https://myhost:7071/zimbraAdmin ?
    thats works fine, i can login, and everything is working.

    If i want to use soap am i need to import any cert on my machine (the client) ?
    I use a plugin of eclipse to test sending soap messages (The SOAP Raw Message Sender Eclipse Plugin). I guess it could be an eclipse problem?

  4. #4
    Join Date
    Sep 2005
    Posts
    2,103
    Rep Power
    14

    Default cert authority

    the CA used to sign tomcat's cert is in /opt/zimbra/java/jre/lib/security/cacerts - and in /opt/zimbra/ssl/ssl/ca/ca.pem - make sure you're including that in your CA path when you run your app

  5. #5
    Join Date
    Feb 2006
    Location
    Hungary, Budapest
    Posts
    14
    Rep Power
    9

    Default

    thx for helps.

    I quite learn some stuff till than.

    I have a question, but i cannot really describe.
    I would like to authenticate, and send a requests to the server.

    Ive got these loaded.
    <script type="text/javascript" src="/zimbra/js/msgs/I18nMsg,AjxMsg,ZMsg,ZmMsg.js"></script>
    <script type="text/javascript" src="/zimbra/js/Ajax_all.js"></script>
    <script type="text/javascript" src="/zimbra/js/ZmLogin.js"></script>
    <script type="text/javascript" src="/zimbra/js/ZimbraMail_all.js"></script>
    I tried this one. its create an undefined exception.
    ...
    var auth = new ZmAuthenticate(appCtxt);
    auth.execute("admin@linux.site","password") ;
    ....
    may it could connected that i can see an js class properly?


    Its says the same. The problem is with ZmCsfeCommand. undefined again.
    soapDoc = AjxSoapDoc.create("AuthRequest", "urn:zimbraAccount");
    var el = soapDoc.set("account", "admin@linux.site");
    el.setAttribute("by", "name");
    soapDoc.set("password", "asdfgh");
    var resp = command.invoke({soapDoc: soapDoc, noAuthToken: true, noSession: true}).Body.AuthResponse;
    ZmCsfeCommand.setAuthToken(resp.authToken, resp.lifetime);



    And then i wanted to do this, but as i supposed i need an authtoken set-ed before.
    var soapDoc = AjxSoapDoc.create("CreateAccountRequest", "urn:zimbraAdmin", null);
    soapDoc.set(ZaAccount.A_name, "test2");
    soapDoc.set("password", "test");

    window.alert(soapDoc);

    try {
    var resp = ZmCsfeCommand.invoke(soapDoc, null, null, null, true).firstChild;
    I know its a really specific problems. I would like only some guidelines to continue my story

    thx
    saby

  6. #6
    Join Date
    Feb 2006
    Location
    Hungary, Budapest
    Posts
    14
    Rep Power
    9

    Default

    thx marcmac
    Quote Originally Posted by marcmac
    the CA used to sign tomcat's cert is in /opt/zimbra/java/jre/lib/security/cacerts - and in /opt/zimbra/ssl/ssl/ca/ca.pem - make sure you're including that in your CA path when you run your app
    I needed this:

    on server:
    /opt/zimbra/java/bin/keytool -export -keystore /opt/zimbra/tomcat/conf/keystore -alias tomcat -file mycert.cer

    on client:
    keytool -import -alias zimbra -keystore c:\j2eesdk\jre\lib\security\cacerts -file e:\Zimbra\mycert.cer

    password is: "changeit"
    afterwards i was able to send admin soap requests to the server

Similar Threads

  1. upgrade woes -made into new thread
    By JustinHarlow in forum Installation
    Replies: 18
    Last Post: 06-08-2007, 01:11 PM
  2. Getting problems in FC4 while instalation
    By kitty_bhoo in forum Installation
    Replies: 13
    Last Post: 09-12-2006, 11:34 PM
  3. Services stopped working
    By lilwong in forum Administrators
    Replies: 4
    Last Post: 08-15-2006, 10:19 AM
  4. Unable to start tomcat
    By chanck in forum Administrators
    Replies: 11
    Last Post: 06-11-2006, 01:58 AM
  5. Replies: 1
    Last Post: 11-23-2005, 01:35 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
  •