none
How to create ews soap request with Chinese character in it? RRS feed

  • Question

  • I want to send creating calendar item operation request using EWS, and some of my content, for instance, Subject, may content Chinese characters. Here is what my request soap looks like

    <?xml version="1.0" encoding="utf-8"?>
    <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
    <Header>
      <RequestServerVersion xmlns="http://schemas.microsoft.com/exchange/services/2006/types" Version="Exchange2007_SP1"/>
    </Header>
    <Body>
      <CreateItem xmlns="http://schemas.microsoft.com/exchange/services/2006/messages" SendMeetingInvitations="SendToNone">
        <SavedItemFolderId>
          <DistinguishedFolderId xmlns="http://schemas.microsoft.com/exchange/services/2006/types" Id="calendar"/>
        </SavedItemFolderId>
        <Items>
          <CalendarItem xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
            <Subject>新建日程</Subject>
            <ReminderIsSet>true</ReminderIsSet>
            <ReminderMinutesBeforeStart>15</ReminderMinutesBeforeStart>
            <Start>2016-06-22T09:00:00</Start>
            <End>2016-06-22T10:00:00</End>
          </CalendarItem>
        </Items>
      </CreateItem>
    </Body>
    </Envelope>

    I encode this xml with utf-8 and send it to my testing exchange server, and after a while, it displayed on that server, but with question mark in Subject property instead of '新建日程'. All other properties are displayed correctly.

    So I wonder where I did wrong that the Chinese content can not be displayed correctly. Any suggestions?



    Wednesday, June 15, 2016 2:41 AM