我正尝试从南非标准时间调用 GetUserAvailabilityRequest
,而南非标准时间没有遵守夏令时,但是,TimeZone元素需要StandardTime和DaylightTime子元素,这些子元素需要有关到DST或从DST转换的详细信息。忽略这些元素会导致错误,就像提交任意数据一样。有人知道拨打此电话的正确方法吗?
更多详细信息基于@ jan-doggen的注释。在此示例中,用户基于南非标准时间
请求(ST和DST的任意更改日期为1月1日)
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<soap:Body>
<GetUserAvailabilityRequest xmlns="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<t:TimeZone xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
<Bias>-120</Bias>
<StandardTime>
<Bias>0</Bias>
<Time>00:00:00</Time>
<DayOrder>1</DayOrder>
<Month>1</Month>
<DayOfWeek>Wednesday</DayOfWeek>
</StandardTime>
<DaylightTime>
<Bias>0</Bias>
<Time>00:00:00</Time>
<DayOrder>1</DayOrder>
<Month>1</Month>
<DayOfWeek>Wednesday</DayOfWeek>
</DaylightTime>
</t:TimeZone>
<MailboxDataArray>
<t:MailboxData>
<t:Email>
<t:Address>[email protected]</t:Address>
</t:Email>
<t:AttendeeType>Organizer</t:AttendeeType>
<t:ExcludeConflicts>false</t:ExcludeConflicts>
</t:MailboxData>
<t:MailboxData>
<t:Email>
<t:Address>[email protected]</t:Address>
</t:Email>
<t:AttendeeType>Required</t:AttendeeType>
<t:ExcludeConflicts>false</t:ExcludeConflicts>
</t:MailboxData>
</MailboxDataArray>
<t:FreeBusyViewOptions>
<t:TimeWindow>
<t:StartTime>2013-05-13T00:55:11</t:StartTime>
<t:EndTime>2013-05-27T00:55:11</t:EndTime>
</t:TimeWindow>
<t:MergedFreeBusyIntervalInMinutes>15</t:MergedFreeBusyIntervalInMinutes>
<t:RequestedView>FreeBusyMerged</t:RequestedView>
</t:FreeBusyViewOptions>
</GetUserAvailabilityRequest>
</soap:Body>
回复:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<s:Fault>
<faultcode xmlns:a="http://schemas.microsoft.com/exchange/services/2006/types">a:-2146233088</faultcode>
<faultstring xml:lang="en-US">The specified time zone isn't valid.</faultstring>
<detail>
<m:ErrorCode xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages">-2146233088</m:ErrorCode>
</detail>
</s:Fault>
</s:Body>
最佳答案
所有examples on MSDN都表明标准时间和夏令时时间对<Month>
具有不同的值。对于夏时制和标准时区,请使用不同的月份值,但要使用相同的<Bias>
值。
关于exchange-server - 当前时区不符合夏令时时如何调用Exchange Web服务GetUserAvailabilityRequest?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/16400013/