Results 1 to 2 of 2

Thread: How can i get return value from AjxRpc.invoke function?

  1. #1
    Join Date
    Sep 2010
    Posts
    14
    Rep Power
    5

    Default How can i get return value from AjxRpc.invoke function?

    Hi, every body,

    I am using SOAP to check the external URL if valid, my code is:
    myMailZimlet.prototype.CheckURL =
    function() {
    var TxtUrl = "http://www.domain.com/server.txt";
    var EncUrl = AjxStringUtil.urlComponentEncode(TxtUrl);
    var pxyUrl = [ZmZimletBase.PROXY, encodedExtServerUrl].join("");
    var CallBack = new AjxCallback(this, this._httpExternalGetCallback);
    var myResult = AjxRpc.invoke(null, proxyServletUrl, null, CallBack, false);
    if (myResult.success) {
    return true;
    } else {
    return false;
    }
    }

    myMailZimlet.prototype._httpExternalGetCallback =
    function(response) {
    if (response.success == false) {
    return;
    }
    appCtxt.getAppController().setStatusMsg(response.t ext, ZmStatusView.LEVEL_INFO);
    };

    The function _httpExternalGetCallback is working, but the myResult.success in function CheckURL always return: undefine.

    Could any one tell me how to get the return value in SOAP? Thanks.

  2. #2
    Join Date
    Nov 2005
    Posts
    477
    Rep Power
    9

    Default

    Firebug is your friend here. Set a breakpoint inside of your routine (you may have to run Zimbra in &debug=1 mode) and examine the data structure. As a note, you want to look at response.sucess, not myResponse.sucess since the response function will be called asynchronously.

Similar Threads

  1. The installer was interrupted...
    By spiderbo in forum Zimbra Connector for Outlook
    Replies: 9
    Last Post: 05-23-2013, 06:33 AM
  2. Errors installing Outlook Connector
    By Tim G in forum Zimbra Connector for Outlook
    Replies: 57
    Last Post: 05-05-2011, 02:27 PM
  3. Error Installing Outlook Connector
    By DanO in forum Zimbra Connector for Outlook
    Replies: 17
    Last Post: 08-28-2007, 09:35 AM
  4. Replies: 14
    Last Post: 12-22-2005, 03:59 PM
  5. Building native libraries on MacOS X
    By ajmas in forum Developers
    Replies: 3
    Last Post: 10-14-2005, 11:00 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
  •