11.01.2015 Views

[MS-ASCMD]: ActiveSync Command Reference Protocol Specification

[MS-ASCMD]: ActiveSync Command Reference Protocol Specification

[MS-ASCMD]: ActiveSync Command Reference Protocol Specification

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The inline method of delivering binary content is including data encoded with base64 encoding inside<br />

the WBXML. The inline approach generally requires the client to read the whole response into<br />

memory in order to parse it, thereby consuming a large amount of memory.<br />

Multipart<br />

The multipart method of delivering content is a multipart structure with the WBXML being the first<br />

part, and the requested data populating the subsequent parts. This format enables a client to handle<br />

large files without consuming large amounts of memory, because a file is read in pieces, one piece<br />

at a time.<br />

The multipart approach enables the client to parse the small WBXML part, obtain references to the<br />

binary parts, and handle the binary parts as necessary, without reading the entire response into<br />

memory.<br />

Multipart Request<br />

If the client wants to have the document or documents returned in multipart format, the only<br />

difference between this request and the inline content request is the addition of the following HTTP<br />

header:<br />

<strong>MS</strong>-ASAcceptMultiPart: T<br />

If this header is not present, then the server uses the default value of "F" (FALSE), and returns<br />

content inline. If the header is set to "T" (TRUE), then the server returns the document contents by<br />

using the multipart format.<br />

The following is a sample request for the test.txt document in a UNC share:<br />

POST /Microsoft-Server-<br />

<strong>ActiveSync</strong>Cmd=ItemOperations&User=administrator&DeviceId=v140Device&DeviceType=PocketPC<br />

Content-Type: application/vnd.ms-sync<br />

<strong>MS</strong>-AS<strong>Protocol</strong>Version: 14.1<br />

<strong>MS</strong>-ASAcceptMultiPart: T<br />

<br />

<br />

DocumentLibrary<br />

\\feod31\public\test.txt<br />

<br />

<br />

The following is a sample response to the request for the test.txt document.<br />

HTTP/1.1 200 OK<br />

Content-Type: application/vnd.ms-sync.multipart<br />

<br />

<br />

1<br />

<br />

<br />

1<br />

\\contoso\test.txt<br />

<br />

0-999<br />

91646690<br />

[<strong>MS</strong>-<strong>ASCMD</strong>] — v20110315<br />

<strong>ActiveSync</strong> <strong>Command</strong> <strong>Reference</strong> <strong>Protocol</strong> <strong>Specification</strong><br />

Copyright © 2011 Microsoft Corporation.<br />

Release: Tuesday, March 15, 2011<br />

38 / 369

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!