Export (0) Print
Expand All

4.10.5.2 Response

The following example shows the multipart ItemOperations command response (as described in section 2.2.2.9.1) sent from the server to the client.

HTTP/1.1 200 OK
Content-Type: application/vnd.ms-sync.multipart

0200000014000000F4010000080200001300000003016A000014454D033100014E464D03310001000052033500014D03353A3100015003456D61696C000100144B0002560322446576696365205573657222203C6465766963657573657240636F6E746F736F2E636F6D3E0001580322446576696365205573657222203C6465766963657573657240636F6E746F736F2E636F6D3E0001540354657374204D756C74697061727420526573706F6E736500014F03323031322D30352D30385432303A31353A34352E3231315A0001510344657669636520557365720001750354657374204D756C74697061727420526573706F6E736500015203310001550330000100114E4F5003746573742E7478740001510352674141414143333064496F6B2532624A6854616962504766417173414B427744326C516E4B2532666262415149526455774230396B253262484141414141414156414144326C516E4B2532666262415149526455774230396B25326248414146347141253262534141414A25336130000152033100014C033733000101014A46033100014C033139000100145103310001010002530349504D2E4E6F746500017903323835393100013A7C0375726E3A636F6E74656E742D636C61737365733A6D657373616765000100115603320001001649C310ADA57BDA90934B4CAE83B1A1AFDDEAD5014AC305CD2D5758360101010101546869732069732074686520626F64792E0D0A

Interpreting the binary body of the response as a MultiPartResponse structure (as described in section 2.2.2.9.1.1) results in the following:

PartCount (4 bytes): 02000000 = 2

PartsMetaData[0] (8 bytes): 14000000F4010000 = Offset: 14000000 = 20, Length: F4010000 = 500

PartsMetaData[1] (8 bytes): 0802000013000000 = Offset: 08020000 = 520, Length: 13000000 = 19

The rest of the body makes up the Parts field of the MultiPartResponse structure.

The first part, described by the first PartMetaData structure (as described in section 2.2.2.9.1.1.1) in the PartsMetaData field, contains the WBXML response. The data starts at 20 bytes from the start of the body, and is 500 bytes long.

03016A000014454D033100014E464D03310001000052033500014D03353A3100015003456D61696C000100144B0002560322446576696365205573657222203C6465766963657573657240636F6E746F736F2E636F6D3E0001580322446576696365205573657222203C6465766963657573657240636F6E746F736F2E636F6D3E0001540354657374204D756C74697061727420526573706F6E736500014F03323031322D30352D30385432303A31353A34352E3231315A0001510344657669636520557365720001750354657374204D756C74697061727420526573706F6E736500015203310001550330000100114E4F5003746573742E7478740001510352674141414143333064496F6B2532624A6854616962504766417173414B427744326C516E4B2532666262415149526455774230396B253262484141414141414156414144326C516E4B2532666262415149526455774230396B25326248414146347141253262534141414A25336130000152033100014C033733000101014A46033100014C033139000100145103310001010002530349504D2E4E6F746500017903323835393100013A7C0375726E3A636F6E74656E742D636C61737365733A6D657373616765000100115603320001001649C310ADA57BDA90934B4CAE83B1A1AFDDEAD5014AC305CD2D5758360101010101

This decodes into the following XML:

<?xml version="1.0" encoding="utf-8"?>
<ItemOperations xmlns="ItemOperations" xmlns:airsync="AirSync" xmlns:email="Email" 
  xmlns:airsyncbase="AirSyncBase" xmlns:email2="Email2">
  <Status>1</Status>
  <Response>
    <Fetch>
      <Status>1</Status>
      <airsync:CollectionId>5</airsync:CollectionId>
      <airsync:ServerId>5:1</airsync:ServerId>
      <airsync:Class>Email</airsync:Class>
      <Properties>
        <email:To>"Device User" &lt;deviceuser@contoso.com&gt;</email:To>
        <email:From>"Device User" &lt;deviceuser@contoso.com&gt;</email:From>
        <email:Subject>Test Multipart Response</email:Subject>
        <email:DateReceived>2012-05-08T20:15:45.211Z</email:DateReceived>
        <email:DisplayTo>Device User</email:DisplayTo>
        <email:ThreadTopic>Test Multipart Response</email:ThreadTopic>
        <email:Importance>1</email:Importance>
        <email:Read>0</email:Read>
        <airsyncbase:Attachments>
          <airsyncbase:Attachment>
            <airsyncbase:DisplayName>test.txt</airsyncbase:DisplayName>
            <airsyncbase:FileReference>RgAAAAC30dIok%2bJhTaibPGfAqsAKBwD2lQnK
              %2fbbAQIRdUwB09k%2bHAAAAAAAVAAD2lQnK%2fbbAQIRdUwB09k%2bHAAF4qA
              %2bSAAAJ%3a0</airsyncbase:FileReference>
            <airsyncbase:Method>1</airsyncbase:Method>
            <airsyncbase:EstimatedDataSize>73</airsyncbase:EstimatedDataSize>
          </airsyncbase:Attachment>
        </airsyncbase:Attachments>
        <airsyncbase:Body>
          <airsyncbase:Type>1</airsyncbase:Type>
          <airsyncbase:EstimatedDataSize>19</airsyncbase:EstimatedDataSize>
          <Part>1</Part>
        </airsyncbase:Body>
        <email:MessageClass>IPM.Note</email:MessageClass>
        <email:InternetCPID>28591</email:InternetCPID>
        <email:Flag />
        <email:ContentClass>urn:content-classes:message</email:ContentClass>
        <airsyncbase:NativeBodyType>2</airsyncbase:NativeBodyType>
        <email2:ConversationId>
          <![CDATA[ADA57BDA90934B4CAE83B1A1AFDDEAD5]]>
        </email2:ConversationId>
        <email2:ConversationIndex><![CDATA[CD2D575836]]></email2:ConversationIndex>
      </Properties>
    </Fetch>
  </Response>
</ItemOperations>

The itemoperations:Part element (described in section 2.2.3.120) is present as a child of the airsyncbase:Body element (described in [MS-ASAIRS] section 2.2.2.4). This indicates that the part described by the second PartMetaData structure in the PartsMetaData field contains the data for the body of the email item. The airsyncbase:Body element has an airsyncbase:Type child element (described in [MS-ASAIRS] section 2.2.2.23.1) with a value of 1, which indicates that the body is plain text.

The data starts at 520 bytes from the start of the body, and is 19 bytes long.

546869732069732074686520626F64792E0D0A

Interpreting this data as plain text results in the following value:

This is the body.CRLF
Show:
© 2015 Microsoft