Results 1 to 3 of 3

Thread: ZClient - ZMailbox.getAppointment - not working?

  1. #1
    Join Date
    May 2010
    Rep Power

    Default ZClient - ZMailbox.getAppointment - not working?

    Hi all,

    I'm trying to build a custom stand-alone client application that accesses my zimbra server. Right now I'm stuck accessing my appointments.

    ZMailBox.getApptSummaries(...) seems to work as expected and returns a result, which then leads to ZAppointmentHit-objects. Using the Appointment-id from the ZAppointmentHit-objects to call ZMailbox.getAppointment(<id>) fails:

    com.zimbra.common.service.ServiceException: invalid request: missing required attribute: id
            at com.zimbra.common.service.ServiceException.INVALID_REQUEST(
            at com.zimbra.common.soap.Element.checkNull(
            at com.zimbra.common.soap.Element.getAttribute(
            at com.zimbra.cs.zclient.ZCalendarItem.<init>(
            at com.zimbra.cs.zclient.ZAppointment.<init>(
            at com.zimbra.cs.zclient.ZMailbox.getAppointment(
            at zclienttest01.Main.main(
    Stepping into these functions my debugger shows, that ZMailbox.getAppointment(...) builds some kind of request and passes it to invoke(...). invoke(...) returns a com.zimbra.common.soap.Element$JSonElement-object which does contain the Appointment I'm looking for (and it does contain the id-field!).

    Using that JSonElement, ZMailbox tries to call the ZAppointment-constructor which in turn will eventually try to call getAttribute on the Element.

    It seems to me, as if the getAttribute-function does not really know about the JSonElement-subclass and fails to handle it correctly.

    So is this my fault or is it a bug?

    (Am I even supposed to use ZClient for stand-alone apps (I think I read that a couple of times here on the forums)? Or should I write my own code to access the webservices offered by zimbra?)

  2. #2
    Join Date
    May 2010
    Rep Power


    Btw, I've worked around it for now by copying and adapting the getAppointment-function:

    public static ZAppointment myGetAppointment(ZMailbox zmb, String id) throws ServiceException {
        Element req = zmb.newRequestElement(MailConstants.GET_APPOINTMENT_REQUEST);
        req.addAttribute(MailConstants.A_ID, id);
        req.addAttribute(MailConstants.A_SYNC, true);
        JSONElement je = (JSONElement) zmb.invoke(req);
        return new ZAppointment(je.getElement("appt"));

  3. #3
    Join Date
    Aug 2010
    Rep Power


    Had the same problem. Thanks.

Similar Threads

  1. zimbra is not working well... these weeks
    By sfraymondli in forum Administrators
    Replies: 3
    Last Post: 12-30-2009, 01:35 PM
  2. Replies: 0
    Last Post: 09-28-2009, 07:36 PM
  3. [SOLVED] Zimlets not working in renamed domain
    By jcfischer in forum Installation
    Replies: 2
    Last Post: 12-07-2008, 12:02 PM
  4. Zimlets all not working?
    By jadestorm in forum Administrators
    Replies: 16
    Last Post: 10-28-2007, 08:25 PM
  5. Replies: 6
    Last Post: 10-10-2007, 06: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