Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/fortran/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Exchange server 当当前时区不遵守夏令时,如何调用Exchange Web服务GetUserAvailabilityRequest?_Exchange Server_Exchangewebservices - Fatal编程技术网

Exchange server 当当前时区不遵守夏令时,如何调用Exchange Web服务GetUserAvailabilityRequest?

Exchange server 当当前时区不遵守夏令时,如何调用Exchange Web服务GetUserAvailabilityRequest?,exchange-server,exchangewebservices,Exchange Server,Exchangewebservices,我试图从南非标准时间(不遵守夏令时)调用,但是,时区元素需要标准时间和DaylightTime子元素,这些子元素需要有关DST切换的详细信息。省略这些元素会导致错误,提交任意数据也是如此。有人知道打这个电话的正确方法吗 更多细节基于@jan doggen的评论。在本例中,用户基于南非标准时间 请求(任意ST和DST变更日期为1月1日) -120 0 00:00:00 1. 1. 星期三 0 00:00:00 1. 1. 星期三 test1@domain.com 组织者 假的 test2@dom

我试图从南非标准时间(不遵守夏令时)调用,但是,时区元素需要标准时间和DaylightTime子元素,这些子元素需要有关DST切换的详细信息。省略这些元素会导致错误,提交任意数据也是如此。有人知道打这个电话的正确方法吗

更多细节基于@jan doggen的评论。在本例中,用户基于南非标准时间

请求(任意ST和DST变更日期为1月1日)


-120
0
00:00:00
1.
1.
星期三
0
00:00:00
1.
1.
星期三
test1@domain.com
组织者
假的
test2@domain.com
要求的
假的
2013-05-13T00:55:11
2013-05-27T00:55:11
15
免费经营

答复:

<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>

a:-2146233088
指定的时区无效。
-2146233088

多亏@WilliamPrice的评论,我终于解决了这个问题。答案是在任意设置这些值时,将夏时月设置为与标准时间不同的值:

    <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>2</Month>**
                <DayOfWeek>Wednesday</DayOfWeek>
            </DaylightTime>
        </t:TimeZone>
        <MailboxDataArray>
            <t:MailboxData>
                <t:Email>
                    <t:Address>test1@domain.com</t:Address>
                </t:Email>
                <t:AttendeeType>Organizer</t:AttendeeType>
                <t:ExcludeConflicts>false</t:ExcludeConflicts>
            </t:MailboxData>
            <t:MailboxData>
                <t:Email>
                    <t:Address>test2@domain.com</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>

-120
0
00:00:00
1.
1.
星期三
0
00:00:00
1.
**2**
星期三
test1@domain.com
组织者
假的
test2@domain.com
要求的
假的
2013-05-13T00:55:11
2013-05-27T00:55:11
15
免费经营

所有这些都表明标准时间和昼间时间对于
具有不同的值。使用不同的月份值,但日光和标准时区的值相同。

是否尝试将DaylightTime和StandardTime设置为偏差0?因此,切换是不相关的。是的,问题是描述从标准切换到日光的日期组件是必填字段。好的,但您可以将它们设置为任意时间。此时,将从偏置0切换到偏置0;-)将它们设置为0也会以同样的方式失败。这些不是时区元素中唯一必需的字段。转换发生时的StandardTime和DaylightTime字段是必需的,即使没有转换日期。所有这些字段都显示标准时间和夏时制的值不同。
    <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>2</Month>**
                <DayOfWeek>Wednesday</DayOfWeek>
            </DaylightTime>
        </t:TimeZone>
        <MailboxDataArray>
            <t:MailboxData>
                <t:Email>
                    <t:Address>test1@domain.com</t:Address>
                </t:Email>
                <t:AttendeeType>Organizer</t:AttendeeType>
                <t:ExcludeConflicts>false</t:ExcludeConflicts>
            </t:MailboxData>
            <t:MailboxData>
                <t:Email>
                    <t:Address>test2@domain.com</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>