none
Exchange Activesync Questions RRS feed

  • Question

  • I've been doing quite a lot of googling and forum searching and I'm finding that actually locating information on the net about EAS is difficult. I have all the protocol specification pdfs already and there are things in there that just aren't answered. I've no doubt the answers exist but after days of trying and not finding them I thought I'd take a shot at seeing if anyone knows the answers to my questions here.



    1. When doing a folder sync, how do you tell what sort of items you get back?

    *I 've noticed that there is no specific identifier (except email) to tell exactly what any one <Add> or <Update> actually is. If you are querying (Syncing) multiple folders at once you get back a big blob of XML.

            * If you rely on the folder's server Id to tell, then Folders can only contain one type of item each, and Deleted Items holds anything. (Example: <ServerId>7:2</ServerId> , folder id 7 happens to be Inbox, so it would hold email).

           * If you rely on XML item prefixes, you're pretty much out of luck if they change or a new one is added. (Example: <Email:To>"Foo" &lt;foo@foo.com&lt;<Email:To>

    2. Does anyone have an XML chunk for GetItemEstimate that they know works? I've been trying to get mine working and it consistently fails with various errors. I suspect it is a XML>WBXML encoding problem but I can't tell what the problem is. I've been using the following, which I came up with from looking at the protocol PDFs and at the schema http://msdn.microsoft.com/en-us/library/ee218510(v=exchg.80).aspx : 

    <?xml version="1.0" encoding="utf-16"?>
    <GetItemEstimate xmlns:airsync="AirSync" xmlns="GetItemEstimate">
    <airsync:Collections>
    <airsync:Collection>
    <airsync:SyncKey>112198867</airsync:SyncKey>
    <CollectionId>7</CollectionId>
    </airsync:Collection>
    </airsync:Collections>
    </GetItemEstimate>

    This gets encoded to:

    03 01 6A 00 00 06 45 00 00 5C 4F 4B 03 31 00 01
    52 03 37 00 01 01 01 01

    Last time I tried it, I got a status of 101 back (InvalidContent) but I've gotten back numerous answers, none of which have actually worked.

    3. An Email in EAS has a property of <Email:MessageClass>IPM.Note</Email:MessageClass>. Why isn't this present on Calendar or Contact items? Outlook spy reveals that the property DOES actually exist for Calendar and contact items but only Email has the property.

    4. Is there a way to query for specific properties on items? (like say Subject and Body or something)?

    5. When I sync the Deleted Items folder, why do I only get back Email items when the Deleted Items folder can hold basically anything?


    Wednesday, May 1, 2013 2:56 PM

Answers

All replies

  • Hello  Cosmo Kramer,
                                   Thank you for your inquiry about Exchange Protocols. One of the Open specifications team member will contact you shortly.
     
    Regards,
    Sreekanth Nadendla
    Microsoft Windows Open specifications
    Wednesday, May 1, 2013 8:02 PM
    Moderator
  • Coming up on a week since Sreekanth's response. Has there been any movement on this?

    Thanks,

    Cosmo

    Tuesday, May 7, 2013 8:12 PM
  • Cosmo,

    Sorry for the delay.  I am working to identify who owns this issue on this side.  An engineer from the Protocols will contact you very soon.


    Bryan S. Burgin Senior Escalation Engineer Microsoft Protocol Open Specifications Team

    Wednesday, May 8, 2013 4:35 AM
    Moderator
  • Hello Cosmo,

    This forum handles issues related to the protocol specification documents (ASAIRS, ASCMD, etc).  You appear to have several how-to implementation questions that are typically better served on the Exchange Developer forum.  Having said that, I did some research on your questions, and perhaps the following MSDN articles and answers will help point you in the right direction.  If you have specific protocol documentation questions I will delve further.

    Question (1)  These articles/examples should address your question and observations.  Specifically, you must keep track of the hierarchy with the Folder Id and SyncKey and save this state on a  per-folder basis.

    Implementing an Exchange ActiveSync client: folder synchronization

    http://msdn.microsoft.com/en-us/library/3718e941-b25a-4760-bc0a-7b650e4825c1

    Exchange 2010: Implementing Exchange ActiveSync Folder Sync

    http://code.msdn.microsoft.com/Exchange-2010-Implementing-400b9507

    Question (2) This blog was written by a protocols team member and should be a good starting reference for this question.

    How to manually decode an ActiveSync WBXML stream

    http://blogs.msdn.com/b/openspecification/archive/2013/02/04/how-to-manually-decode-an-activesync-wbxml-stream.aspx

    From your example, it appears The SyncKey is not getting encoded in the request:

    4B 03 31 00 

    4B is SyncKey, 03 means an inline string, 31 is the ansi code for '1', but then it terminates with 00 indicating the end of the string

    Question (3) MessageClass is defined in [MS-ASEMAIL] Section 2.2.2.41 MessageClass.  As you found, it is an element of the Email namespace and its meaning is “Normal e-mail message”.  I’m not sure about the design decision for why it wasn’t included in the Calendar or Contacts namespaces (RE

    [MS-ASCMD] Section 2.2.1 Namespaces).  However, not everything discoverable on given objects or hierarchies, by Outlook Spy or other tools, is included/exposed or necessary as part of the protocol.

    Question (4) You may want to look into [MS-ASCMD] Section 2.2.3.146 Search command, and query for specific Message email class elements, "Subject", etc.  RE Search Response Schema.  If you need help with coding/examples you may want to post on the Exchange Previous Versions – Development forum.

    Question (5) From a design decision perspective, I think this is to limit the amount of data/items returned since there could be many items/objects in the deleted items folder.

    Regards,

    Mark Miller | Escalation Engineer | Microsoft Open Protocols Support Team


    Wednesday, May 8, 2013 5:14 PM
  • Question (1)  These articles/examples should address your question and observations.  Specifically, you must keep track of the hierarchy with the Folder Id and SyncKey and save this state on a  per-folder basis.

    Which is fine for most folders since they can only hold one type of message... but what about deleted items? It can hold anything.

    Question (5) From design decision perspective, I think this is to limit the amount of data/items returned since there could be manyitems/objects in the deleted items folder.

    Isn't that what the WindowSize is for? is it not possible to get calendar items or contact items from the deleted folder that way?

    As far as your other responses, I'm reasonably sure the problem lies within my WBXML codec so I'm checking that out now, but I will definitely checkout the links you provided. 

    Thanks for your assistance,

    Cosmo.

    Thursday, May 9, 2013 2:33 PM