none
EWS : "Set action is invalid for property" error RRS feed

  • Question

  • When I try to update an appointment, I got the error "Set action is invalid for property" sometimes. The following is my request and response XML. I'm using Java with Web services instead of Managed API.

    This doesn't happen every time but occassionally. I checked the previous discussion and tried a few things but still doesn't work.

    update request:

    <UpdateItem SendMeetingInvitationsOrCancellations="SendToAllAndSaveCopy" ConflictResolution="AutoResolve" MessageDisposition="SaveOnly" xmlns="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:typ="http://schemas.microsoft.com/exchange/services/2006/types">
      <ItemChanges>
        <typ:ItemChange>
          <typ:ItemId Id="AAMkAGViNTI5NjlmLWYzYTItNDg4OS1iMzU0LTAyNGQ4M2YxZWIzNgBGAAAAAABOawJDpb9mRL9DWpZk1b2tBwBydpI+blqgTJeHa/Kf+GcWAADgAEMaAABydpI+blqgTJeHa/Kf+GcWAADgARUhAAA=" ChangeKey="DwAAABYAAABydpI+blqgTJeHa/Kf+GcWAADgTsGF"/>
          <typ:Updates>
            <typ:SetItemField>
              <typ:FieldURI FieldURI="item:Body"/>
              <typ:CalendarItem>
                <typ:Body BodyType="HTML"><![CDATA[  <br>Testing123abc<br>]]></typ:Body>
              </typ:CalendarItem>
           </typ:SetItemField>
            <typ:SetItemField>
              <typ:FieldURI FieldURI="item:Subject"/>
              <typ:CalendarItem>
                <typ:Subject>September 16th</typ:Subject>
              </typ:CalendarItem>
            </typ:SetItemField>
            <typ:SetItemField>
              <typ:ExtendedFieldURI DistinguishedPropertySetId="Appointment" PropertyId="33303" PropertyType="Integer"/>
              <typ:CalendarItem>
                <typ:ExtendedProperty>
                  <typ:ExtendedFieldURI DistinguishedPropertySetId="Appointment" PropertyId="33303" PropertyType="Integer"/>
                  <typ:Value>1</typ:Value>
                </typ:ExtendedProperty>
              </typ:CalendarItem>
            </typ:SetItemField>
            <typ:SetItemField>
              <typ:ExtendedFieldURI DistinguishedPropertySetId="PublicStrings" PropertyName="urn:schemas-jobdiva:remark" PropertyType="String"/>
              <typ:CalendarItem>
                <typ:ExtendedProperty>
                  <typ:ExtendedFieldURI DistinguishedPropertySetId="PublicStrings" PropertyName="urn:schemas-jobdiva:remark" PropertyType="String"/>
                  <typ:Value>1346706634626</typ:Value>
                </typ:ExtendedProperty>
              </typ:CalendarItem>
            </typ:SetItemField>
            <typ:SetItemField>
              <typ:FieldURI FieldURI="calendar:Start"/>
              <typ:CalendarItem>
                <typ:Start>2012-09-16T00:00:00.000-04:00</typ:Start>
              </typ:CalendarItem>
            </typ:SetItemField>
            <typ:SetItemField>
              <typ:FieldURI FieldURI="calendar:End"/>
              <typ:CalendarItem>
                <typ:End>2012-09-17T00:00:00.000-04:00</typ:End>
              </typ:CalendarItem>
            </typ:SetItemField>
            <typ:SetItemField>
              <typ:FieldURI FieldURI="calendar:MeetingTimeZone"/>
              <typ:CalendarItem>
                <typ:MeetingTimeZone TimeZoneName="Eastern Standard Time"/>
              </typ:CalendarItem>
            </typ:SetItemField>
            <typ:SetItemField>
              <typ:FieldURI FieldURI="calendar:Location"/>
              <typ:CalendarItem>
                <typ:Location>New York City</typ:Location>
              </typ:CalendarItem>
            </typ:SetItemField>
            <typ:SetItemField>
              <typ:FieldURI FieldURI="item:Sensitivity"/>
              <typ:CalendarItem>
                <typ:Sensitivity>Normal</typ:Sensitivity>
              </typ:CalendarItem>
            </typ:SetItemField>
            <typ:SetItemField>
              <typ:FieldURI FieldURI="calendar:IsAllDayEvent"/>
              <typ:CalendarItem>
                <typ:IsAllDayEvent>false</typ:IsAllDayEvent>
              </typ:CalendarItem>
            </typ:SetItemField>
            <typ:SetItemField>
              <typ:FieldURI FieldURI="item:Importance"/>
              <typ:CalendarItem>
                <typ:Importance>Normal</typ:Importance>
              </typ:CalendarItem>
            </typ:SetItemField>
            <typ:SetItemField>
              <typ:FieldURI FieldURI="calendar:LegacyFreeBusyStatus"/>
              <typ:CalendarItem>
                <typ:LegacyFreeBusyStatus>Busy</typ:LegacyFreeBusyStatus>
              </typ:CalendarItem>
            </typ:SetItemField>
            <typ:SetItemField>
              <typ:FieldURI FieldURI="item:ReminderIsSet"/>
              <typ:CalendarItem>
                <typ:ReminderIsSet>false</typ:ReminderIsSet>
              </typ:CalendarItem>
            </typ:SetItemField>
            <typ:SetItemField>
              <typ:FieldURI FieldURI="calendar:RequiredAttendees"/>
              <typ:CalendarItem>
                <typ:RequiredAttendees>
                  <typ:Attendee>
                    <typ:Mailbox>
                      <typ:Name>grandpa</typ:Name>
                      <typ:EmailAddress>grandpa@testcompany.com</typ:EmailAddress>
                    </typ:Mailbox>
                    <typ:ResponseType>Unknown</typ:ResponseType>
                  </typ:Attendee>
                </typ:RequiredAttendees>
              </typ:CalendarItem>
            </typ:SetItemField>
            <typ:DeleteItemField>
              <typ:FieldURI FieldURI="calendar:OptionalAttendees"/>
            </typ:DeleteItemField>
          </typ:Updates>
        </typ:ItemChange>
      </ItemChanges>
    </UpdateItem>
    

    update response:

    <m:UpdateItemResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <m:ResponseMessages>
        <m:UpdateItemResponseMessage ResponseClass="Error">
          <m:MessageText>Set action is invalid for property.</m:MessageText>
          <m:ResponseCode>ErrorInvalidPropertySet</m:ResponseCode>
          <m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>
          <m:MessageXml>
            <t:FieldURI FieldURI="calendar:RequiredAttendees"/>
          </m:MessageXml>
          <m:Items/>
        </m:UpdateItemResponseMessage>
      </m:ResponseMessages>
    </m:UpdateItemResponse>
    

    any ideas? thanks in advance.

    Wednesday, September 5, 2012 2:56 PM

All replies

  • The error is telling you that the Properties are invalid I would say its because your using  <typ:ResponseType>Unknown</typ:ResponseType> 

    ResponseType isn't valid because the ResponseType is read only you should just be using

                    <t:CalendarItem>
                      <t:RequiredAttendees>
                        <t:Attendee>
                          <t:Mailbox>
                            <t:EmailAddress>user@domain.com</t:EmailAddress>
                          </t:Mailbox>
                        </t:Attendee>
                      </t:RequiredAttendees>
                    </t:CalendarItem>

    Cheers
    Glen



    Thursday, September 6, 2012 4:30 AM
  • thanks. However I have response type in every update request on events with attendees. only very few of them produce such an error.

    But you are right I was not aware response type is read only when working on the program. I know now so there is no need to include it in the rquest. I will remove it and see if it helps.

    Friday, September 7, 2012 4:15 PM