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 08-19-2010, 11:37 PM
Starter Member
 
Posts: 2
Default Cannot modify appointment

Hi All,

I use the zimbra client JAVA API to create/modify appointment via ZMailbox. Creation process works fine but when I try to modify the created appointment I get the following SOAP fault exception:

com.zimbra.common.soap.SoapFaultException: The specified Invite is out of date (has been updated): f4e1413f-4c68-4198-a0d9-6b07325bb172:822
ExceptionId:btpool0-199://127.0.0.1:7071/service/admin/soap/ModifyAppointmentRequest:1282284464868:138b5fcd5ac b5cbf
Code:mail.INVITE_OUT_OF_DATE


My code source is as follow:

...
// get mail box
ZMailbox mailbox = ZMailbox.getMailbox(options);

/**
* create appointment
*/
// create message
ZMailbox.ZOutgoingMessage outgoingMessage = new ZOutgoingMessage();
// message subject
outgoingMessage.setSubject("Test zimbra JAVA client API");
// message part
outgoingMessage.setMessagePart(new MessagePart("text/plain", "This message may be deleted because it's just a test"));

// create invite
ZInvite invite = new ZInvite();
// create invite
ZComponent comp = new ZComponent();
// set start date to the current date and time
comp.setStart(new ZDateTime(ZimbraClientUtil.toVCalendarFormat(new Date())));
ZDuration duration = new ZDuration();
// set the default task's duration to 30 minutes
duration.setMinutes(30);
comp.setDuration(duration);
// set organizer
comp.setOrganizer(new ZOrganizer("aina"));
comp.setName("Task name");
comp.setLocation("Task location");
invite.getComponents().add(comp);

ZAppointmentResult appointmentResult = mailbox.createAppointment(ZFolder.ID_CALENDAR, null, outgoingMessage, invite, null);

/**
* modify the created appointment
*/
ZAppointmentResult result = mailbox.modifyAppointment(appointmentResult.getCal ItemId(), ZFolder.ID_CALENDAR, new ZDateTime(ZimbraClientUtil.toVCalendarFormat(new Date())), outgoingMessage, invite);

...


Please help to solve this problem.
Reply With Quote
  #2 (permalink)  
Old 07-24-2011, 01:20 AM
New Member
 
Posts: 4
Default I have same problem

Hello,
I have same problem.
Is it solved?

Boris
Reply With Quote
  #3 (permalink)  
Old 07-26-2011, 12:57 PM
New Member
 
Posts: 4
Default

ZAppointmentResult result = mb.modifyTask(appointmentResult.getInviteId(), "0", null, message, invite);
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.