我无法在Exchange中创建双周日历约会或在Outlook中查看它
从2013年1月19日开始的周六和周日,该活动每两周一次(间隔= 2),最多发生5次 .
预期事件:坐在19日,日落20日,坐2日,3日太阳,16日元
观察到的事件:坐在19日,太阳27日,坐在2日,太阳10日,坐在16日 . Whaaat?
我查看Outlook 2003 SP3或Outlook 2010(SP?)的约会 .
这是使用Exchange Web服务创建事件的代码,其中包含有关我尝试的内容的注释:
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:typ="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns:mes="http://schemas.microsoft.com/exchange/services/2006/messages">
<soapenv:Header>
<typ:RequestServerVersion Version="Exchange2007_SP1"/>
<typ:MailboxCulture>en-US</typ:MailboxCulture>
<!-- typ:TimeZoneContext makes no difference -->
<typ:TimeZoneContext>
<typ:TimeZoneDefinition Id="W. Europe Standard Time"></typ:TimeZoneDefinition>
</typ:TimeZoneContext>
</soapenv:Header>
<soapenv:Body>
<mes:CreateItem SendMeetingInvitations="SendToNone">
<mes:Items>
<typ:CalendarItem>
<typ:Subject>Every 2 weeks sa/su, ends after 5</typ:Subject>
<typ:Body BodyType="Text"></typ:Body>
<typ:ReminderIsSet>false</typ:ReminderIsSet>
<typ:Start>2013-01-19T11:00:00.000+01:00</typ:Start>
<typ:End>2013-01-19T11:30:00.000+01:00</typ:End>
<typ:IsAllDayEvent>false</typ:IsAllDayEvent>
<typ:LegacyFreeBusyStatus>Busy</typ:LegacyFreeBusyStatus>
<typ:Location></typ:Location>
<typ:Recurrence>
<typ:WeeklyRecurrence>
<typ:Interval>2</typ:Interval>
<!-- Day name order makes no difference -->
<typ:DaysOfWeek>Saturday Sunday</typ:DaysOfWeek>
<!-- typ:FirstDayOfWeek>Sunday</typ:FirstDayOfWeek Tried but not allowed in Exchange2007_SP1 or Exchange2010-->
</typ:WeeklyRecurrence>
<typ:NumberedRecurrence>
<typ:StartDate>2013-01-19</typ:StartDate>
<typ:NumberOfOccurrences>5</typ:NumberOfOccurrences>
</typ:NumberedRecurrence>
<!-- MeetingTimeZone makes no difference -->
<typ:MeetingTimeZone TimeZoneName="W. Europe Standard Time"/>
</typ:Recurrence>
</typ:CalendarItem>
</mes:Items>
</mes:CreateItem>
</soapenv:Body>
</soapenv:Envelope>
这段代码几乎与David Sterling等人的书_973213_的清单9-29相同
如果我查询EWS这个事件,我会回到我创建的内容:
<t:CalendarItem>
<t:ItemId Id="AQMkA[snip]PYb1"/>
<t:Subject>Every 2 weeks sa/su, ends after 5</t:Subject>
[snip]
<t:Start>2013-01-19T10:00:00Z</t:Start>
<t:End>2013-01-19T10:30:00Z</t:End>
<t:CalendarItemType>RecurringMaster</t:CalendarItemType>
<t:Recurrence>
<t:WeeklyRecurrence>
<t:Interval>2</t:Interval>
<t:DaysOfWeek>Sunday Saturday</t:DaysOfWeek>
</t:WeeklyRecurrence>
<t:NumberedRecurrence>
<t:StartDate>2013-01-19+01:00</t:StartDate>
<t:NumberOfOccurrences>5</t:NumberOfOccurrences>
</t:NumberedRecurrence>
</t:Recurrence>
</t:CalendarItem>
这是Exchange Server 2010没有服务包 .
我试过的其他事情:
1)如果我在Outlook中编辑这个神秘事件并告诉它在星期五发生,它会或多或少地得到更新:一个星期五发生额外(2月1日)和最后一个星期六16月16日事件下降,但我的交替坐着/太阳事件仍然存在
2)在EWS中使用相同的代码我创建了此事件:
周二周四(15日开始):很好
星期二星期二(开始日期15月1日):错误(交替模式再次)
周一周六(1月14日开始):很好
3)在Outlook 2003中创建完全相同的事件,而不是通过EWS . 它显示很好 . 然后查询EWS,我得到完全相同的SOAP结果 .
我担心的是:
我是否误解了重复参数或所有Outlook版本错误?后者似乎不太可能,但上述指向它 .
任何想法在这里可能会出错?
1 回答
我刚发现这是一周的第一天问题 .
我的展望定于星期一作为一周的第一天 . 如果我在Outlook中创建每两周一次的sat-sun预约,则会出现预期:
现在我将Outlook设置为星期日作为一周的第一天 . 然后我得到:
'reasoning'这里是:
通过SOAP创建约会时,Exchange服务器将星期日视为星期的开始,并从第二个示例创建事件 . 但是当在星期一作为本周开始的Outlook中显示时,我们得到:
所以'all'我要做的就是告诉EWS,我将根据星期一作为一周的第一天进行预约 .
It cannot be set in the WeeklyRecurrence node
它看起来好像可以通过用户配置读取和设置 .
这导致了下一个问题:How can I read the entire calendar user configuration in Exchange Web Services?