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 07-25-2011, 09:44 AM
New Member
 
Posts: 4
Default Cannot modify appointment

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): 7eec32ea-bf61-4079-b622-67545c076bee:33029
ExceptionId:com.zimbra.cs.mailbox.MailServiceExcep tion: The specified Invite is out of date (has been updated): 7eec32ea-bf61-4079-b622-67545c076bee:33029
ExceptionId:btpool0-1954://*/service/soap/ModifyAppointmentRequest:1311611767812:964357f754e a48dc


My code is so
package soap;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.TimeZone;

import com.zimbra.cs.zclient.ZDateTime;
import com.zimbra.cs.zclient.ZInvite;
import com.zimbra.cs.zclient.ZInvite.ZComponent;
import com.zimbra.cs.zclient.ZInvite.ZInviteType;
import com.zimbra.cs.zclient.ZMailbox;
import com.zimbra.cs.zclient.ZMailbox.Options;
import com.zimbra.cs.zclient.ZMailbox.ZAppointmentResult;
import com.zimbra.cs.zclient.ZMailbox.ZOutgoingMessage;
import com.zimbra.cs.zclient.ZMailbox.ZOutgoingMessage.Me ssagePart;
public class ZimbraAppointment {
private static final String FMT_DATE_TIME = "yyyyMMdd'T'HHmmss";
public static void main(String[] args) {
try {
Options opt = new ZMailbox.Options();
opt.setAccount("***");
opt.setPassword("***");
opt.setUri("****");
ZMailbox mb = ZMailbox.getMailbox(opt);
TimeZone tz = TimeZone.getDefault();
ZInvite invite = new ZInvite();
ZComponent comp = new ZComponent();
comp.setStart(new ZDateTime("20110726T170000", tz.getID()));
comp.setEnd(new ZDateTime("20110726T210000", tz.getID()));
comp.setLocation("loc");
comp.setComponentNumber("0");
comp.setName("boris2");
invite.getComponents().add(comp);
invite.setType(ZInviteType.appt);
ZOutgoingMessage message = new ZOutgoingMessage();
message.setSubject("test zclient API");
message.setMessagePart(new MessagePart("text/plain", "this is da body"));
DateFormat dateFmt = new SimpleDateFormat(FMT_DATE_TIME);
String dateTime =dateFmt.format(new Date());
ZAppointmentResult appointmentResult = mb.createAppointment(mb.getCalendar().getId(),null , message, invite,null);
ZAppointmentResult result = mb.modifyAppointment(appointmentResult.getCalItemI d(), "0", new ZDateTime(dateTime,tz.getID()), message, invite);
} catch(Exception e) {
e.printStackTrace();
}
}
}

Please help me.

Last edited by b_roit; 07-26-2011 at 08:25 AM.. Reason: SOLVED
Reply With Quote
  #2 (permalink)  
Old 07-26-2011, 08:22 AM
New Member
 
Posts: 4
Default solved!!!!

yes! it's solved!!!

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.