2

当试图设置约会的开始时区(在ews java API 1.1.5中)时出现错误。我试图设置时区,因为在使用appointment.setStart时会引发异常。Exchange Web Services,无法设置startTimeZone约会(java api)

Appointment = new Appointment(service); 

appointment.setStartTimeZone(new TimeZoneDefinition() {{setId("what should go hère")}}); 

appointment.setStart(startTime);.... 

使用Exchange 2007

+0

你的答案可能在另一个线程 - http://stackoverflow.com/questions/4133625/problem-retrieving-appointment-starttimezone-through-ews-managed-api-on-exchange另外,我会建议使用SOAP API如果您继续遇到托管API – cduggan 2013-03-21 08:28:51

回答

2

它终于出现了Java API EWS的是C#版本一个坏的(和充分的bug)端口。 所以规则就是不使用它。

有一些替代那里:

J-xchange

对于我的具体问题,它看起来像setStartTimeZone功能期待一个C#对象,这是不可能得到的。

+0

问题,我必须同意。也许这已经在版本2中发生了变化,该版本已经在github.com/OfficeDev/ews-java-api开源,但它似乎仍然存在:https://social.technet.microsoft.com/Forums/lync/en-US/1317af95-146c-4540-9bec-1b8eed6790dc /如何对得到的时区ID从 - attendeeavailability-使用-EWS-API-20?论坛= exchangesvrdevelopment – 2015-04-22 16:47:51

2

我能通过注释掉有关StartTimeZone的验证码(Appointment.java的第247-256行)并重新编译该jar来解决此问题。如果我根据UTC传递日期/时间,约会将在用户的时区中创建。

相关问题