Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Zimlets

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Closed Thread
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-29-2006, 08:47 AM
elegoff
Guest
 
Posts: n/a
Default [SOLVED] Needing help with AjxRpcRequest

I am new to Zimlets and quite puzzled with the lack of "howto" docs ot very simple Zimlet examples.
I had to crawl in many forums just to guess how to use a ZmZimletBase.PROXY for example


My problem is that I am facing 403 http errors every time I want to do some very simple AjxRpcRequest (even when avoiding cross-domain attempts).

Let's say I want to call an URL like "http://www.google.com" after I drop a ZmContact on my zimlet (silly example but just to be simple...)

In my javascript HandlerObject file I wrote :

var req = new AjxRpcRequest();
var info_url = "http://www.google.com";
var url = ZmZimletBase.PROXY + AjxStringUtil.urlEncode(info_url);

req.invoke(null,url,null, new AjxCallback(this, this._resultCallback), true);


And my callback function is :

Com_Zimbra_Myexample.prototype._resultCallback=
function(result) {
var r = result.text;
alert(r);
DBG.println(AjxDebug.DBG2, "result:" + r);
this.displayStatusMessage(r);
};


I also added a config_template.xml in my zimlet directory that I expected to allow the "google.com" domain.


So my questions so far are :

1) How can I get rid of the 403 http error and allow "nydomainname.com" domain ? Would not it be nice to have such info on wiki ??

2) How would you call an https:// URL ? same as for http:// ?

3) One of the arguments of the invoke method (BTW which one ?) allow to set http headers. How would you aggregate several Http headers to the request ?


I am just evaluating Zimbra as an Ajax mashup solution but I am getting lost with the Ajax Toolkit whitepaper as my only starting point.

Any help appreciated

Eric
Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.