2013-05-06 9 views
6

Sto tentando di chiamare GetUserAvailabilityRequest dall'ora solare del Sud Africa che non rispetta l'ora legale, tuttavia, l'elemento TimeZone richiede sub-elementi StandardTime e DaylightTime che richiedono dettagli sul cutover da o verso l'ora legale. L'omissione di questi elementi genera un errore, così come l'invio di dati arbitrari. Qualcuno conosce il modo corretto per effettuare questa chiamata?Come chiamare i servizi Web di Exchange GetUserAvailabilityRequest quando il fuso orario corrente non osserva l'ora legale?

Ulteriori dettagli in base ai commenti di @ jan-doggen. In questo esempio, l'utente è basata in Sud Africa l'ora solare

richiesta (con arbitraria ST e ora legale la data variazione di 1 gennaio)

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

Risposta:

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

+0

Hai provato a impostare DaylightTime e StandardTime entrambi con un bias 0? Il cutover è quindi irrilevante. –

+0

Sì, il problema è che i componenti della data per descrivere il cutover da Standard a Daylight sono campi obbligatori. –

+0

Ok, ma li hai impostati su un tempo arbitrario. A quel punto si passa da bias 0 a bias 0 ;-) –

risposta

3

Tutto il examples on MSDN dimostrare che standard e tempi di Daylight hanno valori diversi per la <Month>. Utilizzare diversi valori di mese ma lo stesso valore <Bias> per i fusi orari Daylight e Standard.

3

Grazie al commento di @ WilliamPrice sono riuscito a risolvere questo problema. La risposta è stata per impostare il mese dell'ora ad un valore diverso rispetto al tempo standard nel fissare i valori arbitrariamente:

<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>[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> 
Problemi correlati