Results 1 to 4 of 4

Thread: help to start with zimlets

  1. #1
    Join Date
    Oct 2006
    La Paz, Bolivia
    Rep Power

    Question help to start with zimlets

    I'm triying to communicate with a web service made with xmlrcp and php. (It's the only one that finally works in my server.)

    The file name is xmlrpc-server.php and it has a function called "onttax".

    The code looks like this:

    Com_Zimbra_Test.prototype.toolTipPoppedUp =
    function(spanElement, obj, context, canvas) {
    canvas.innerHTML = context;
    var request = new AjxRpcRequest();
    var info_url = "http://localhost/xmlrpc-server.php/onttax?par=" + context;
    var url = ZmZimletBase.PROXY + AjxStringUtil.urlEncode(info_url);
    request.invoke(null, url, null, new AjxCallback(this, Com_Zimbra_YMaps._callback, canvas), true);

    I'm not sure about where and how to pass the function's name. I will appreciate any help.

  2. #2
    Join Date
    Aug 2005
    San Mateo, CA
    Rep Power


    This "Com_Zimbra_YMaps._callback" should be your call back function.
    Looking for new beta users -> Co-Founder of Acompli. Previously worked at Zimbra (and Yahoo! & VMware) since 2005.

  3. #3
    Join Date
    Sep 2008
    Rep Power


    I having the same needs here.
    Anyone? Any suggestion? My web-service xmlrpc server is running on PHP while i need my zimlet to communicate and consume the services.

    Can javascript alone able to achieve it? or do I need to write a jsp script? Anyhow, please give us some guide. Thank you!!!!

  4. #4
    Join Date
    Sep 2008
    Rep Power

    Default Zimlet webservices with xml-rpc.

    I got the way to do it. But I wonder whether is a best practice or not.

    Download the RPC jar lib:
    ws-xmlrpc - Apache XML-RPC
    Take the binary package.

    Since your Zimlet is consuming (client), copy these .jar file to your Zimlet's directory:
    - xmlrpc-client-3.1.x.jar
    - xmlrpc-common-3.1.x.jar
    - ws-commons-util-1.0.x.jar

    You have to place this files under /opt/zimbra/jetty/service/WEB-INF/lib and restart your mailbox services in order to see the effects. If you are using zimbra desktop, it will be more easy and will not affect your live server.

    Write a jsp script file which import the following package:
    <%@ page language="java" import="org.apache.xmlrpc.client.XmlRpcClient, org.apache.xmlrpc.client.XmlRpcClientConfigImpl," %>
    XmlRpcClientConfigImpl cfg = new XmlRpcClientConfigImpl();
    cfg.setServerURL(new URL("http://localhost/xmlrpc-server.php/services"));
    XmlRpcClient client = new XmlRpcClient();
    Object[] parameters = new Object[] {"param1", "param2"};
    // Beware of the return type. Type cast it accordingly. See the documentation at:
    Object returned_value = (Object) client.execute("method_name", parameters);
    So far I got it working. The documentation in: ws-xmlrpc - Apache XML-RPC is not completely correct. You have to debug your own sometimes.

    Hope this help.

Similar Threads

  1. Replies: 7
    Last Post: 02-03-2011, 06:01 AM
  2. Zimbra .pids / service monitoring
    By bin2hex in forum Administrators
    Replies: 24
    Last Post: 04-03-2010, 09:12 PM
  3. After reboot mailbox and tomcat don't start
    By gon in forum Administrators
    Replies: 1
    Last Post: 11-02-2007, 11:50 AM
  4. where are my zimlets ?
    By santo in forum Zimlets
    Replies: 21
    Last Post: 06-05-2007, 07:30 AM
  5. Is it started or not
    By kwelipatton in forum Installation
    Replies: 10
    Last Post: 03-28-2006, 10:11 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