6

I am attempting to call GetUserAvailabilityRequest from South Africa Standard Time which does not observe daylight savings time, however, the TimeZone element requires StandardTime and DaylightTime sub-elements which require details about the cutover to or from DST. Omitting these elements results in an error, as does submitting arbitrary data. Does anyone know the proper way to make this call?

More detail based on comments from @jan-doggen. In this example, user is based in South Africa Standard Time

request (with arbitrary ST and DST change date of January 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>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>

Response:

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

Greg Martin
  • 5,074
  • 3
  • 34
  • 35
  • Did you try setting DaylightTime and StandardTime both with a bias 0? The cutover is then irrelevant. – Jan Doggen May 08 '13 at 09:27
  • Yes, the problem is the date components to describe the cutover from Standard to Daylight are required fields. – Greg Martin May 09 '13 at 21:35
  • Ok, but you set them to some arbitrary time. At that time you switch from bias 0 to bias 0 ;-) – Jan Doggen May 10 '13 at 06:18
  • Setting them to 0 fails in the same way. Those are not the only required fields in the TimeZone element. StandardTime and DaylightTime fields for when the transitions happen are required, even though there is no transition date. – Greg Martin May 11 '13 at 06:24
  • It looks as we are misunderstanding each other. I meant: set StandardTime and DaylightTime to some arbitrary (but equal) values and set Bias for both to 0. – Jan Doggen May 11 '13 at 09:41
  • I've edited the question with a request and response based on your suggestion. Still no luck. – Greg Martin May 12 '13 at 22:57
  • Maybe you can ask here http://social.msdn.microsoft.com/Forums/en-US/category/exchangeserver – Jan Doggen May 13 '13 at 07:14
  • Oh I have, no luck yet: http://social.msdn.microsoft.com/Forums/en-US/exchangesvrdevelopmentlegacy/thread/de2e9301-2fc0-45a8-b43a-be82e1222abf – Greg Martin May 13 '13 at 16:24
  • 1
    All of the [examples on MSDN](http://msdn.microsoft.com/en-us/library/exchange/aa564336%28v=exchg.80%29.aspx) show that Standard and Daylight times have _different_ values for the . – William Price May 19 '13 at 01:33
  • @WilliamPrice, that seems to be the key, I made the arbitrary DST month the month after the arbitrary ST value and it worked. You should enter that as a real answer ASAP so I can accept and you can get the bounty on this one. – Greg Martin May 20 '13 at 01:07

2 Answers2

3

Thanks to @WilliamPrice's comment I have managed to resolve this. The answer was to set the Daylight Time month to a different value than the Standard Time when setting those values arbitrarily:

    <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>
Greg Martin
  • 5,074
  • 3
  • 34
  • 35
3

All of the examples on MSDN show that Standard and Daylight times have different values for the <Month>. Use different month values but the same <Bias> value for both Daylight and Standard time zones.

William Price
  • 4,033
  • 1
  • 35
  • 54