Skip to content

Conversation

@tobiasviehweger
Copy link
Contributor

Hi,

just noticed an error, that prevents updating timezones on appointments. This is due to the fact that the XML is generated incorrect, before it was like this:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
	<soap:Header>
		<t:RequestServerVersion Version="Exchange2013"/>
	</soap:Header>
	<soap:Body>
		<m:CreateItem SendMeetingInvitations="SendToNone">
			<m:SavedItemFolderId>
				<t:DistinguishedFolderId Id="calendar">
					<t:Mailbox>
						<t:EmailAddress>email</t:EmailAddress>
					</t:Mailbox>
				</t:DistinguishedFolderId>
			</m:SavedItemFolderId>
			<m:Items>
				<t:CalendarItem>
					<t:Subject>Vorlesung Once</t:Subject>
					<t:Start>2017-12-14T13:00:00.000+00:00</t:Start>
					<t:End>2017-12-14T14:00:00.000+00:00</t:End>
					<t:IsAllDayEvent>false</t:IsAllDayEvent>
					<t:TimeZoneDefinition Name="(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna" Id="W. Europe Standard Time"/>
					<t:TimeZoneDefinition Name="(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna" Id="W. Europe Standard Time"/>
				</t:CalendarItem>
			</m:Items>
		</m:CreateItem>
	</soap:Body>
</soap:Envelope>

As you can see, the start and end timezone properties are wrong (though ignored by EWS). Corrected version uses the provided xmlElementName and looks like:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
	<soap:Header>
		<t:RequestServerVersion Version="Exchange2013"/>
	</soap:Header>
	<soap:Body>
		<m:CreateItem SendMeetingInvitations="SendToNone">
			<m:SavedItemFolderId>
				<t:DistinguishedFolderId Id="calendar">
					<t:Mailbox>
						<t:EmailAddress>email</t:EmailAddress>
					</t:Mailbox>
				</t:DistinguishedFolderId>
			</m:SavedItemFolderId>
			<m:Items>
				<t:CalendarItem>
					<t:Subject>Vorlesung Once</t:Subject>
					<t:Start>2017-12-14T13:00:00.000+00:00</t:Start>
					<t:End>2017-12-14T14:00:00.000+00:00</t:End>
					<t:IsAllDayEvent>false</t:IsAllDayEvent>
					<t:StartTimeZone Name="(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna" Id="W. Europe Standard Time"/>
					<t:EndTimeZone Name="(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna" Id="W. Europe Standard Time"/>
				</t:CalendarItem>
			</m:Items>
		</m:CreateItem>
	</soap:Body>
</soap:Envelope>

@gautamsi gautamsi merged commit 620e745 into gautamsi:master Mar 2, 2018
gautamsi added a commit that referenced this pull request Jul 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants