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

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.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-08-2005, 06:00 AM
Project Contributor
 
Posts: 54
Default Bug in ZmCsfeAsynchCommand

Might have found a tiny bug in the ZmCsfeAsynchCommand class.

Method: ZmCsfeAsynchCommand.prototype.rpcCallback, starting at ligne 106

I simply had to add the following 2 lines in order to make the function correctly behave:
this._fireInvokeEvent(newEx); // at line 161
return;

After some debugging, I noticed I was getting an Exception in that block but it was then not passed to the listener. I noticed that the Exception was thrown but that it was actually overriden in the following block by another exception, since you use a single variable newEx in your code:

try {
//check if we received a Fault message from server
var fault = AjxSoapDoc.element2FaultObj(this._responseSoapDoc. getBody());
if (fault) {
newEx = new ZmCsfeException("Csfe service error", fault.errorCode, "ZmCsfeAsynchCommand.prototype.rpcCallback", fault.reason);
}
} catch (ex) {
newEx = ex;
}


In other words, if you get 2 Exceptions, the first one will never get to the application level. FYI, I was getting an Exception because the server was not sending back XML, but the content-type of the response was set to XML. So, if you check the above block, if there was an error parsing the response, variable this._responseSoapDoc will not be defined, and that is were the second exception was occuring.

Anyway, why not stop the execution of this method at the first exception ?

Heladito
Reply With Quote
  #2 (permalink)  
Old 11-08-2005, 06:54 AM
Senior Member
 
Posts: 51
Default

You are completely right.

I noticed also that the method doesn't parse JSON. But that is because it maybe isn't needed in ZimbraClient.
Reply With Quote
  #3 (permalink)  
Old 11-08-2005, 09:47 AM
Zimbra Employee
 
Posts: 49
Default

There has been a bunch of work done around the asynchronous code in our next release (which will be available *very* soon)
Reply With Quote
  #4 (permalink)  
Old 11-10-2005, 10:18 AM
Zimbra Employee
 
Posts: 127
Default

I wil take a look at this problem. It is true that this class is not used in mail client. It is used only in the Admin client, which currently is mostly using SOAP. Most likely this class will go away once we finish switching the Admin client to JSON.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

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.