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:
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!).Code:com.zimbra.common.service.ServiceException: invalid request: missing required attribute: id ExceptionId:main:1274190891873:4d761470c98badd4 Code:service.INVALID_REQUEST at com.zimbra.common.service.ServiceException.INVALID_REQUEST(ServiceException.java:255) at com.zimbra.common.soap.Element.checkNull(Element.java:238) at com.zimbra.common.soap.Element.getAttribute(Element.java:206) at com.zimbra.cs.zclient.ZCalendarItem.<init>(ZCalendarItem.java:71) at com.zimbra.cs.zclient.ZAppointment.<init>(ZAppointment.java:24) at com.zimbra.cs.zclient.ZMailbox.getAppointment(ZMailbox.java:4259) at zclienttest01.Main.main(Main.java:88)
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?)