none
Strange SYNC response using EAS. RRS feed

  • Question

  • Greetings,

    I am using EAS to access an Exchange 2010 server. The server supports EAS 14.1 and the commands I am trying to use.

    I am in the midst of writing a test harness for learning purposes to imitate an Exchange Active Sync client so that I can actually write the client myself. My test harness is set up to allow you to (essentially) paste XML into a textbox and hit a transmit button. The harness will then setup the HTTPWebRequest and populate it with a WBXML document containing the translated XML. It will then get the response, translate it back into XML so as to be readable and display it in a second textbox along with all of the various HTTP related bits and bobs in a listview.

    In the exchange account that I am using I have an inbox populated by a single email message so that I have eliminated as many distractions as possible.

    Everything has been going relatively well so far and I think overall I have the hang of things. Unfortunately I've come across a bit of an anomaly when I try to sync the inbox. The ConversationId and ConversationIndex fields are for want of a better term 'corrupted'. All other fields appear perfectly normal.

    I have a code example that someone else wrote. If I plug in the proper credentials and so forth, it works just fine. Everything returns as expected and the return XML makes sense. I have modeled my code after this example and I have verified that the code sample and my testharness are in fact getting the same email from the same folder. However the code sample is actually getting fewer bytes back in the response than I am in my code. My request in both cases is the following:

    <?xml version="1.0" encoding="utf-16"?>
    <airsync:Sync xmlns:airsync="AirSync">
      <airsync:Collections>
        <airsync:Collection>
          <airsync:SyncKey>273927838</airsync:SyncKey>
          <airsync:CollectionId>7</airsync:CollectionId>
          <airsync:ConversationMode>1</airsync:ConversationMode>
          <airsync:Options>
            <airsyncbase:BodyPreference xmlns:airsyncbase="AirSyncBase">
              <airsyncbase:Type>2</airsyncbase:Type>
              <airsyncbase:TruncationSize>500</airsyncbase:TruncationSize>
              <airsyncbase:Preview>100</airsyncbase:Preview>
            </airsyncbase:BodyPreference>
          </airsync:Options>
        </airsync:Collection>
      </airsync:Collections>
    </airsync:Sync>

    SyncKey is the most current one. I do note that each client gets it's own. Collection Id 7 is the Inbox. On the example client the inbox is 5.

    According to the documentation (MS-ASEMAIL.pdf 2.2.2.14) the ConversationId (And ConversationIndex) is a an opaque encoded byte array. It should have a multi-byte integer prefix and then n bytes of data (16 bytes from what I've gathered).

    Incorrect Bytes
    In the response byte array I receive the following (trimmed):

    00, 16, 49, EF, BF, BD, 10, 2F, 7C, EF, BF, BD, EF, BF, BD, EF, BF, BD, 03

    Based on debugging and RTFMing this translates to:

    00 - change code page
    16 - Change to code page 22 'Email2'
    49 - Token 0x09 - Conversation Id

    EF, - This byte should actually be the 0xC3, the tag for OPAQUE data. 0xC3 is what the example code gets.

    BF, BD, 10 - This should be the multi-byte integer length of the array. But it corresponds to the value 394 which is much longer than the remaining array.

    BF - 10111111 - Continue flag set...
    BD - 10111101 - Continue flag set...
    10 - 00010000 - Continue flag not set...

    the 0x10 byte would possible seem to be the actual length of the array but this doesn't explain the two bytes before it.

    Correct Bytes
    The example code, for the same exact query gets the following response (trimmed):

    00, 16, 49, C3, 10, 8F, C0, B7, 6E, 2A, 0F, 48, FC, B0, 5F, CC, E9, 59, 18, D8, 6D

    Which translates to:

    00 - Change code page
    16 - Change to code page 22 'Email2'
    49 - Token 0x09 - Conversation Id

    C3 - Tag for OPAQUE data.
    10 - Data length of 16
    n - remaining bytes (10, 8F, C0, B7, 6E, 2A, 0F, 48, FC, B0, 5F, CC, E9, 59, 18, D8, 6D)

    The remaining bytes in the example code are in fact correct, I can see the ConversationId in outlook spy and it matches. I have no idea what those bytes are in my code.

    As far as i can tell my code and the example code are doing the same thing and setting all the same bits and bobs when setting up for the query. I can't explain why we are getting two different answers. Nor can I explain why even if I grab a different email I get the same, or similar bytes as noted in 'Incorrect Bytes'

    Does anyone have any idea why I might be getting bytes messed up like this? Am I maybe not setting a flag correctly somewhere? (as far as I can tell I'm not).

    Thanks,

    CK


    Monday, February 18, 2013 8:54 PM

Answers

  • Hi Cosmo, I took a look at each response from your working and non-working trace and I see that the ConversationId and ConversationIndex that is coming back is actually identical. The error must be somewhere in your WBXML decoder. Here is the complete set of response bytes for each one. I've highlighted the SyncKey so that you can see it really is a different response as well as the ConversationId and ConversationIndex.

     

    Working Response:

    03 01 6A 00 45 5C 4F 4B 03 31 39 32 33 38 33 36 30 37 37 00 01 52 03 35 00 01 4E 03 31 00 01 56 47 4D 03 35 3A 31 00 01 5D 00 02 56 03 22 4B 72 61 6D 65 72 20 54 65 73 74 20 5B 31 5D 22 20 3C 6B 72 61 6D 65 72 74 65 73 74 31 40 6C 72 77 74 65 63 68 6E 6F 6C 6F 67 69 65 73 2E 63 6F 6D 3E 00 01 58 03 22 45 64 20 4B 72 61 6D 65 72 22 20 3C 65 6B 72 61 6D 65 72 40 6C 72 77 74 65 63 68 6E 6F 6C 6F 67 69 65 73 2E 63 6F 6D 3E 00 01 54 03 54 45 53 54 49 4E 47 20 5B 31 30 5D 20 6F 66 20 5B 31 30 5D 00 01 4F 03 32 30 31 32 2D 31 32 2D 32 38 54 31 35 3A 31 32 3A 32 32 2E 31 31 31 5A 00 01 51 03 4B 72 61 6D 65 72 20 54 65 73 74 20 5B 31 5D 00 01 75 03 54 45 53 54 49 4E 47 20 5B 31 30 5D 20 6F 66 20 5B 31 30 5D 00 01 52 03 30 00 01 55 03 31 00 01 00 11 4A 46 03 32 00 01 4C 03 38 39 32 00 01 4D 03 31 00 01 4B 03 3C 68 74 6D 6C 3E 3C 68 65 61 64 3E 3C 6D 65 74 61 20 68 74 74 70 2D 65 71 75 69 76 3D 22 43 6F 6E 74 65 6E 74 2D 54 79 70 65 22 20 63 6F 6E 74 65 6E 74 3D 22 74 65 78 74 2F 68 74 6D 6C 3B 20 63 68 61 72 73 65 74 3D 75 74 66 2D 38 22 3E 0D 0A 3C 6D 65 74 61 20 6E 61 6D 65 3D 22 47 65 6E 65 72 61 74 6F 72 22 20 63 6F 6E 74 65 6E 74 3D 22 4D 69 63 72 6F 73 6F 66 74 20 45 78 63 68 61 6E 67 65 20 53 65 72 76 65 72 22 3E 0D 0A 3C 21 2D 2D 20 63 6F 6E 76 65 72 74 65 64 20 66 72 6F 6D 20 74 65 78 74 20 2D 2D 3E 0D 0A 3C 73 74 79 6C 65 3E 3C 21 2D 2D 20 2E 45 6D 61 69 6C 51 75 6F 74 65 20 7B 20 6D 61 72 67 69 6E 2D 6C 65 66 74 3A 20 31 70 74 3B 20 70 61 64 64 69 6E 67 2D 6C 65 66 74 3A 20 34 70 74 3B 20 62 6F 72 64 65 72 2D 6C 65 66 74 3A 20 23 38 30 30 30 30 30 20 32 70 78 20 73 6F 6C 69 64 3B 20 7D 20 2D 2D 3E 3C 2F 73 74 79 6C 65 3E 3C 2F 68 65 61 64 3E 0D 0A 3C 62 6F 64 79 3E 0D 0A 3C 66 6F 6E 74 20 73 69 7A 65 3D 22 32 22 3E 3C 73 70 61 6E 20 73 74 79 6C 65 3D 22 66 6F 6E 74 2D 73 69 7A 65 3A 31 30 70 74 3B 22 3E 3C 64 69 76 20 63 6C 61 73 73 3D 22 50 6C 61 69 6E 54 65 78 74 22 3E 4C 6F 72 65 6D 20 69 70 73 75 6D 20 64 6F 6C 6F 72 20 73 69 74 20 61 6D 65 74 2C 20 63 6F 6E 73 65 63 74 65 74 75 72 20 61 64 69 70 69 73 69 63 69 6E 67 20 65 6C 69 74 2C 20 73 65 64 20 64 6F 20 65 69 75 73 6D 6F 64 20 74 65 6D 70 6F 72 20 69 6E 63 69 64 69 64 75 6E 74 20 75 74 20 6C 61 62 6F 72 65 20 65 74 20 64 6F 6C 6F 72 65 20 6D 61 67 6E 61 20 61 6C 69 71 75 61 2E 20 55 74 20 65 6E 69 6D 20 61 64 00 01 58 03 4C 6F 72 65 6D 20 69 70 73 75 6D 20 64 6F 6C 6F 72 20 73 69 74 20 61 6D 65 74 2C 20 63 6F 6E 73 65 63 74 65 74 75 72 20 61 64 69 70 69 73 69 63 69 6E 67 20 65 6C 69 74 2C 20 73 65 64 20 64 6F 20 65 69 75 73 6D 6F 64 20 74 65 6D 70 6F 72 20 69 6E 63 69 64 69 64 75 6E 74 20 75 74 20 6C 61 62 6F 72 65 00 01 01 00 02 53 03 49 50 4D 2E 4E 6F 74 65 00 01 79 03 32 30 31 32 37 00 01 3A 7C 03 75 72 6E 3A 63 6F 6E 74 65 6E 74 2D 63 6C 61 73 73 65 73 3A 6D 65 73 73 61 67 65 00 01 00 11 56 03 31 00 01 00 16 49 C3 10 8F C0 B7 6E 2A 0F 48 FC B0 5F CC E9 59 18 D8 6D 01 4A C3 05 CD E5 0D BB AC 01 00 02 1B 01 01 01 01 01 01

     

     

    Non-Working Response:

    03 01 6A 00 45 5C 4F 4B 03 32 32 35 37 39 36 37 34 39 00 01 52 03 37 00 01 4E 03 31 00 01 56 47 4D 03 37 3A 31 00 01 5D 00 02 56 03 22 4B 72 61 6D 65 72 20 54 65 73 74 20 5B 31 5D 22 20 3C 6B 72 61 6D 65 72 74 65 73 74 31 40 6C 72 77 74 65 63 68 6E 6F 6C 6F 67 69 65 73 2E 63 6F 6D 3E 00 01 58 03 22 45 64 20 4B 72 61 6D 65 72 22 20 3C 65 6B 72 61 6D 65 72 40 6C 72 77 74 65 63 68 6E 6F 6C 6F 67 69 65 73 2E 63 6F 6D 3E 00 01 54 03 54 45 53 54 49 4E 47 20 5B 31 30 5D 20 6F 66 20 5B 31 30 5D 00 01 4F 03 32 30 31 32 2D 31 32 2D 32 38 54 31 35 3A 31 32 3A 32 32 2E 31 31 31 5A 00 01 51 03 4B 72 61 6D 65 72 20 54 65 73 74 20 5B 31 5D 00 01 75 03 54 45 53 54 49 4E 47 20 5B 31 30 5D 20 6F 66 20 5B 31 30 5D 00 01 52 03 30 00 01 55 03 31 00 01 00 11 4A 46 03 32 00 01 4C 03 38 39 32 00 01 4D 03 31 00 01 4B 03 3C 68 74 6D 6C 3E 3C 68 65 61 64 3E 3C 6D 65 74 61 20 68 74 74 70 2D 65 71 75 69 76 3D 22 43 6F 6E 74 65 6E 74 2D 54 79 70 65 22 20 63 6F 6E 74 65 6E 74 3D 22 74 65 78 74 2F 68 74 6D 6C 3B 20 63 68 61 72 73 65 74 3D 75 74 66 2D 38 22 3E 0D 0A 3C 6D 65 74 61 20 6E 61 6D 65 3D 22 47 65 6E 65 72 61 74 6F 72 22 20 63 6F 6E 74 65 6E 74 3D 22 4D 69 63 72 6F 73 6F 66 74 20 45 78 63 68 61 6E 67 65 20 53 65 72 76 65 72 22 3E 0D 0A 3C 21 2D 2D 20 63 6F 6E 76 65 72 74 65 64 20 66 72 6F 6D 20 74 65 78 74 20 2D 2D 3E 0D 0A 3C 73 74 79 6C 65 3E 3C 21 2D 2D 20 2E 45 6D 61 69 6C 51 75 6F 74 65 20 7B 20 6D 61 72 67 69 6E 2D 6C 65 66 74 3A 20 31 70 74 3B 20 70 61 64 64 69 6E 67 2D 6C 65 66 74 3A 20 34 70 74 3B 20 62 6F 72 64 65 72 2D 6C 65 66 74 3A 20 23 38 30 30 30 30 30 20 32 70 78 20 73 6F 6C 69 64 3B 20 7D 20 2D 2D 3E 3C 2F 73 74 79 6C 65 3E 3C 2F 68 65 61 64 3E 0D 0A 3C 62 6F 64 79 3E 0D 0A 3C 66 6F 6E 74 20 73 69 7A 65 3D 22 32 22 3E 3C 73 70 61 6E 20 73 74 79 6C 65 3D 22 66 6F 6E 74 2D 73 69 7A 65 3A 31 30 70 74 3B 22 3E 3C 64 69 76 20 63 6C 61 73 73 3D 22 50 6C 61 69 6E 54 65 78 74 22 3E 4C 6F 72 65 6D 20 69 70 73 75 6D 20 64 6F 6C 6F 72 20 73 69 74 20 61 6D 65 74 2C 20 63 6F 6E 73 65 63 74 65 74 75 72 20 61 64 69 70 69 73 69 63 69 6E 67 20 65 6C 69 74 2C 20 73 65 64 20 64 6F 20 65 69 75 73 6D 6F 64 20 74 65 6D 70 6F 72 20 69 6E 63 69 64 69 64 75 6E 74 20 75 74 20 6C 61 62 6F 72 65 20 65 74 20 64 6F 6C 6F 72 65 20 6D 61 67 6E 61 20 61 6C 69 71 75 61 2E 20 55 74 20 65 6E 69 6D 20 61 64 00 01 58 03 4C 6F 72 65 6D 20 69 70 73 75 6D 20 64 6F 6C 6F 72 20 73 69 74 20 61 6D 65 74 2C 20 63 6F 6E 73 65 63 74 65 74 75 72 20 61 64 69 70 69 73 69 63 69 6E 67 20 65 6C 69 74 2C 20 73 65 64 20 64 6F 20 65 69 75 73 6D 6F 64 20 74 65 6D 70 6F 72 20 69 6E 63 69 64 69 64 75 6E 74 20 75 74 20 6C 61 62 6F 72 65 00 01 01 00 02 53 03 49 50 4D 2E 4E 6F 74 65 00 01 79 03 32 30 31 32 37 00 01 3A 7C 03 75 72 6E 3A 63 6F 6E 74 65 6E 74 2D 63 6C 61 73 73 65 73 3A 6D 65 73 73 61 67 65 00 01 00 11 56 03 31 00 01 00 16 49 C3 10 8F C0 B7 6E 2A 0F 48 FC B0 5F CC E9 59 18 D8 6D 01 4A C3 05 CD E5 0D BB AC 01 00 02 1B 01 01 01 01 01 01


    Josh Curry (jcurry) | Escalation Engineer | Open Specifications Support Team

    Friday, February 22, 2013 4:47 PM
    Moderator

All replies

  • Hello Cosmo Kramer,

                            Thank you for your inquiry about EAS sync. One of the Open specifications team member will contact you shortly.

     

    Regards,

    Sreekanth Nadendla

    Microsoft Windows Open specifications


    Monday, February 18, 2013 9:26 PM
    Moderator
  • Hi Cosmo Kramer, I am the engineer who will be working with you on this issue. I am currently researching the problem and will provide you with an update soon. It would also be very helpful if you could send me network traces that contain the request and response for both the sample code and your code. You can send that to me at dochelp(at)microsoft(dot)com.


    Josh Curry (jcurry) | Escalation Engineer | Open Specifications Support Team

    Monday, February 18, 2013 9:57 PM
    Moderator
  • Our network guy is out with (oddly enough) pink eye. I'll try to get with him and get back to you.
    Wednesday, February 20, 2013 4:11 PM
  • Our network guy is still out. Could I perhaps fire up Fiddler and send you info from that? What do you need exactly?
    Thursday, February 21, 2013 5:07 PM
  • Hi CK, a Fiddler trace would probably be fine. I want the complete WBXML request/response for each scenario.


    Josh Curry (jcurry) | Escalation Engineer | Open Specifications Support Team

    Thursday, February 21, 2013 6:16 PM
    Moderator
  • Just sent two fiddler traces. Hopefully we can get to the bottom of this. Thank you for your help.

    Cosmo.

    Thursday, February 21, 2013 7:57 PM
  • Hi CK, thank you for sending me the Fiddler files.  Here is what I got from the requests I looked at. The first thing I noticed is that it looks like you are requesting a different CollectionId in each request, so I would expect that you would see different results in the response.

     

    Working Request:

    <?xml version="1.0" encoding="utf-8"?>

    <Sync xmlns:"AirSync">

    <Collections>

    <Collection>

    <SyncKey>623989853</SyncKey>

    <CollectionId>5</CollectionId>

    <ConversationMode>1</ConversationMode>

    <Options>

    <airsyncbase:BodyPreference xmlns:airsyncbase="AirSyncBase">

    <airsyncbase:Type>2</airsyncbase:Type>

    <airsyncbase:TruncationSize>500</airsyncbase:TruncationSize>

    <airsyncbase:Preview>100</airsyncbase:Preview>

    </airsyncbase:BodyPreference>

    </Options>

    </Collection>

    </Collections>

    <HeartbeatInterval>60</HeartbeatInterval>

    </Sync>

     

    Non-Working Request:

    <?xml version="1.0" encoding="utf-8"?>

    <Sync xmlns:"AirSync">

    <Collections>

    <Collection>

    <SyncKey>1583421452</SyncKey>

    <CollectionId>7</CollectionId>

    <ConversationMode>1</ConversationMode>

    <Options>

    <airsyncbase:BodyPreference xmlns:airsyncbase="AirSyncBase">

    <airsyncbase:Type>2</airsyncbase:Type>

    <airsyncbase:TruncationSize>500</airsyncbase:TruncationSize>

    <airsyncbase:Preview>100</airsyncbase:Preview>

    </airsyncbase:BodyPreference>

    </Options>

    </Collection>

    </Collections>

    </Sync>

     

    Also, in the encoded non-working request I saw something very odd. Please take a look at this…

     

    03 01 6A 00 C5 01 5C 4F 4B 03 31 35 38 33 34 32 31 34 35 32 00 01 52 03 37 00 01 67 03 31 00 01 57 00 11 C5 01 46 03 32 00 01 47 03 35 30 30 00 01 58 03 31 30 30 00 01 01 01 01 01 01

     

    The highlighted bytes are not a pattern I would expect to see. Although It's not incorrect, it's strange. 0xC5 should be 0x45, when you have the 8th bit set it indicates that the element will have attributes, but it doesn't. The 0x01 right after indicates the end of the attribute list. Since there is no attribute list I would expect just to see 0x45 instead of 0xC5 0x01.


    Josh Curry (jcurry) | Escalation Engineer | Open Specifications Support Team

    Thursday, February 21, 2013 10:53 PM
    Moderator
  • I noticed early on that the example code and my test code were getting different collection IDs for the Inbox when I do a folder hierarchy sync. Not sure why. I'll double checked that they were both using the same credentials, same account and hitting the same Exchange box. But yes, the example code gets an id of 5 and my code gets an id of 7.

    Looking at the results though, I can tell I'm getting the inbox and they're looking at the same email (there's only one in there). 

    Friday, February 22, 2013 1:55 PM
  • Rigged up a byte array viewer control to show exactly what I'm sending when I send it and yeah I see the C5 01 bytes.... I'll dig into my transcoder and see if I can find out what's going on there then get back to you.
    Friday, February 22, 2013 3:21 PM
  • Interesting.... after poking at it, I see that the XMLNode class is interpreting:

    <airsync:Sync xmlns:airsync="AirSync">

    ..

    </airsync:Sync>

    as a node that has an attribute. The 'non working' code checks the XMLNode's .Attributes.Count to see if the node has attributes and we use that as a boolean for later to tell if we need to encode attributes.

    Since attributes are not supported (according to the doc) I have simply hard coded the boolean to FALSE and let it go through. No more C5 01 in the request, but I still get the same result in the response wherein the 'opaque string' token is missing for ConversationId and ConversationIndex.

    Friday, February 22, 2013 3:46 PM
  • Hi Cosmo, I took a look at each response from your working and non-working trace and I see that the ConversationId and ConversationIndex that is coming back is actually identical. The error must be somewhere in your WBXML decoder. Here is the complete set of response bytes for each one. I've highlighted the SyncKey so that you can see it really is a different response as well as the ConversationId and ConversationIndex.

     

    Working Response:

    03 01 6A 00 45 5C 4F 4B 03 31 39 32 33 38 33 36 30 37 37 00 01 52 03 35 00 01 4E 03 31 00 01 56 47 4D 03 35 3A 31 00 01 5D 00 02 56 03 22 4B 72 61 6D 65 72 20 54 65 73 74 20 5B 31 5D 22 20 3C 6B 72 61 6D 65 72 74 65 73 74 31 40 6C 72 77 74 65 63 68 6E 6F 6C 6F 67 69 65 73 2E 63 6F 6D 3E 00 01 58 03 22 45 64 20 4B 72 61 6D 65 72 22 20 3C 65 6B 72 61 6D 65 72 40 6C 72 77 74 65 63 68 6E 6F 6C 6F 67 69 65 73 2E 63 6F 6D 3E 00 01 54 03 54 45 53 54 49 4E 47 20 5B 31 30 5D 20 6F 66 20 5B 31 30 5D 00 01 4F 03 32 30 31 32 2D 31 32 2D 32 38 54 31 35 3A 31 32 3A 32 32 2E 31 31 31 5A 00 01 51 03 4B 72 61 6D 65 72 20 54 65 73 74 20 5B 31 5D 00 01 75 03 54 45 53 54 49 4E 47 20 5B 31 30 5D 20 6F 66 20 5B 31 30 5D 00 01 52 03 30 00 01 55 03 31 00 01 00 11 4A 46 03 32 00 01 4C 03 38 39 32 00 01 4D 03 31 00 01 4B 03 3C 68 74 6D 6C 3E 3C 68 65 61 64 3E 3C 6D 65 74 61 20 68 74 74 70 2D 65 71 75 69 76 3D 22 43 6F 6E 74 65 6E 74 2D 54 79 70 65 22 20 63 6F 6E 74 65 6E 74 3D 22 74 65 78 74 2F 68 74 6D 6C 3B 20 63 68 61 72 73 65 74 3D 75 74 66 2D 38 22 3E 0D 0A 3C 6D 65 74 61 20 6E 61 6D 65 3D 22 47 65 6E 65 72 61 74 6F 72 22 20 63 6F 6E 74 65 6E 74 3D 22 4D 69 63 72 6F 73 6F 66 74 20 45 78 63 68 61 6E 67 65 20 53 65 72 76 65 72 22 3E 0D 0A 3C 21 2D 2D 20 63 6F 6E 76 65 72 74 65 64 20 66 72 6F 6D 20 74 65 78 74 20 2D 2D 3E 0D 0A 3C 73 74 79 6C 65 3E 3C 21 2D 2D 20 2E 45 6D 61 69 6C 51 75 6F 74 65 20 7B 20 6D 61 72 67 69 6E 2D 6C 65 66 74 3A 20 31 70 74 3B 20 70 61 64 64 69 6E 67 2D 6C 65 66 74 3A 20 34 70 74 3B 20 62 6F 72 64 65 72 2D 6C 65 66 74 3A 20 23 38 30 30 30 30 30 20 32 70 78 20 73 6F 6C 69 64 3B 20 7D 20 2D 2D 3E 3C 2F 73 74 79 6C 65 3E 3C 2F 68 65 61 64 3E 0D 0A 3C 62 6F 64 79 3E 0D 0A 3C 66 6F 6E 74 20 73 69 7A 65 3D 22 32 22 3E 3C 73 70 61 6E 20 73 74 79 6C 65 3D 22 66 6F 6E 74 2D 73 69 7A 65 3A 31 30 70 74 3B 22 3E 3C 64 69 76 20 63 6C 61 73 73 3D 22 50 6C 61 69 6E 54 65 78 74 22 3E 4C 6F 72 65 6D 20 69 70 73 75 6D 20 64 6F 6C 6F 72 20 73 69 74 20 61 6D 65 74 2C 20 63 6F 6E 73 65 63 74 65 74 75 72 20 61 64 69 70 69 73 69 63 69 6E 67 20 65 6C 69 74 2C 20 73 65 64 20 64 6F 20 65 69 75 73 6D 6F 64 20 74 65 6D 70 6F 72 20 69 6E 63 69 64 69 64 75 6E 74 20 75 74 20 6C 61 62 6F 72 65 20 65 74 20 64 6F 6C 6F 72 65 20 6D 61 67 6E 61 20 61 6C 69 71 75 61 2E 20 55 74 20 65 6E 69 6D 20 61 64 00 01 58 03 4C 6F 72 65 6D 20 69 70 73 75 6D 20 64 6F 6C 6F 72 20 73 69 74 20 61 6D 65 74 2C 20 63 6F 6E 73 65 63 74 65 74 75 72 20 61 64 69 70 69 73 69 63 69 6E 67 20 65 6C 69 74 2C 20 73 65 64 20 64 6F 20 65 69 75 73 6D 6F 64 20 74 65 6D 70 6F 72 20 69 6E 63 69 64 69 64 75 6E 74 20 75 74 20 6C 61 62 6F 72 65 00 01 01 00 02 53 03 49 50 4D 2E 4E 6F 74 65 00 01 79 03 32 30 31 32 37 00 01 3A 7C 03 75 72 6E 3A 63 6F 6E 74 65 6E 74 2D 63 6C 61 73 73 65 73 3A 6D 65 73 73 61 67 65 00 01 00 11 56 03 31 00 01 00 16 49 C3 10 8F C0 B7 6E 2A 0F 48 FC B0 5F CC E9 59 18 D8 6D 01 4A C3 05 CD E5 0D BB AC 01 00 02 1B 01 01 01 01 01 01

     

     

    Non-Working Response:

    03 01 6A 00 45 5C 4F 4B 03 32 32 35 37 39 36 37 34 39 00 01 52 03 37 00 01 4E 03 31 00 01 56 47 4D 03 37 3A 31 00 01 5D 00 02 56 03 22 4B 72 61 6D 65 72 20 54 65 73 74 20 5B 31 5D 22 20 3C 6B 72 61 6D 65 72 74 65 73 74 31 40 6C 72 77 74 65 63 68 6E 6F 6C 6F 67 69 65 73 2E 63 6F 6D 3E 00 01 58 03 22 45 64 20 4B 72 61 6D 65 72 22 20 3C 65 6B 72 61 6D 65 72 40 6C 72 77 74 65 63 68 6E 6F 6C 6F 67 69 65 73 2E 63 6F 6D 3E 00 01 54 03 54 45 53 54 49 4E 47 20 5B 31 30 5D 20 6F 66 20 5B 31 30 5D 00 01 4F 03 32 30 31 32 2D 31 32 2D 32 38 54 31 35 3A 31 32 3A 32 32 2E 31 31 31 5A 00 01 51 03 4B 72 61 6D 65 72 20 54 65 73 74 20 5B 31 5D 00 01 75 03 54 45 53 54 49 4E 47 20 5B 31 30 5D 20 6F 66 20 5B 31 30 5D 00 01 52 03 30 00 01 55 03 31 00 01 00 11 4A 46 03 32 00 01 4C 03 38 39 32 00 01 4D 03 31 00 01 4B 03 3C 68 74 6D 6C 3E 3C 68 65 61 64 3E 3C 6D 65 74 61 20 68 74 74 70 2D 65 71 75 69 76 3D 22 43 6F 6E 74 65 6E 74 2D 54 79 70 65 22 20 63 6F 6E 74 65 6E 74 3D 22 74 65 78 74 2F 68 74 6D 6C 3B 20 63 68 61 72 73 65 74 3D 75 74 66 2D 38 22 3E 0D 0A 3C 6D 65 74 61 20 6E 61 6D 65 3D 22 47 65 6E 65 72 61 74 6F 72 22 20 63 6F 6E 74 65 6E 74 3D 22 4D 69 63 72 6F 73 6F 66 74 20 45 78 63 68 61 6E 67 65 20 53 65 72 76 65 72 22 3E 0D 0A 3C 21 2D 2D 20 63 6F 6E 76 65 72 74 65 64 20 66 72 6F 6D 20 74 65 78 74 20 2D 2D 3E 0D 0A 3C 73 74 79 6C 65 3E 3C 21 2D 2D 20 2E 45 6D 61 69 6C 51 75 6F 74 65 20 7B 20 6D 61 72 67 69 6E 2D 6C 65 66 74 3A 20 31 70 74 3B 20 70 61 64 64 69 6E 67 2D 6C 65 66 74 3A 20 34 70 74 3B 20 62 6F 72 64 65 72 2D 6C 65 66 74 3A 20 23 38 30 30 30 30 30 20 32 70 78 20 73 6F 6C 69 64 3B 20 7D 20 2D 2D 3E 3C 2F 73 74 79 6C 65 3E 3C 2F 68 65 61 64 3E 0D 0A 3C 62 6F 64 79 3E 0D 0A 3C 66 6F 6E 74 20 73 69 7A 65 3D 22 32 22 3E 3C 73 70 61 6E 20 73 74 79 6C 65 3D 22 66 6F 6E 74 2D 73 69 7A 65 3A 31 30 70 74 3B 22 3E 3C 64 69 76 20 63 6C 61 73 73 3D 22 50 6C 61 69 6E 54 65 78 74 22 3E 4C 6F 72 65 6D 20 69 70 73 75 6D 20 64 6F 6C 6F 72 20 73 69 74 20 61 6D 65 74 2C 20 63 6F 6E 73 65 63 74 65 74 75 72 20 61 64 69 70 69 73 69 63 69 6E 67 20 65 6C 69 74 2C 20 73 65 64 20 64 6F 20 65 69 75 73 6D 6F 64 20 74 65 6D 70 6F 72 20 69 6E 63 69 64 69 64 75 6E 74 20 75 74 20 6C 61 62 6F 72 65 20 65 74 20 64 6F 6C 6F 72 65 20 6D 61 67 6E 61 20 61 6C 69 71 75 61 2E 20 55 74 20 65 6E 69 6D 20 61 64 00 01 58 03 4C 6F 72 65 6D 20 69 70 73 75 6D 20 64 6F 6C 6F 72 20 73 69 74 20 61 6D 65 74 2C 20 63 6F 6E 73 65 63 74 65 74 75 72 20 61 64 69 70 69 73 69 63 69 6E 67 20 65 6C 69 74 2C 20 73 65 64 20 64 6F 20 65 69 75 73 6D 6F 64 20 74 65 6D 70 6F 72 20 69 6E 63 69 64 69 64 75 6E 74 20 75 74 20 6C 61 62 6F 72 65 00 01 01 00 02 53 03 49 50 4D 2E 4E 6F 74 65 00 01 79 03 32 30 31 32 37 00 01 3A 7C 03 75 72 6E 3A 63 6F 6E 74 65 6E 74 2D 63 6C 61 73 73 65 73 3A 6D 65 73 73 61 67 65 00 01 00 11 56 03 31 00 01 00 16 49 C3 10 8F C0 B7 6E 2A 0F 48 FC B0 5F CC E9 59 18 D8 6D 01 4A C3 05 CD E5 0D BB AC 01 00 02 1B 01 01 01 01 01 01


    Josh Curry (jcurry) | Escalation Engineer | Open Specifications Support Team

    Friday, February 22, 2013 4:47 PM
    Moderator
  • Looking at it now. I'll see what I can see.

    One of my side projects for this is to write a WBXMLBinaryReader & writers once I've got this all nailed down. That way all the fiddly bits are black boxed and all you need to do is call 'ReadMultiByteInteger()' and so forth a the right place. We'll have to see how that goes.

    Thanks for your help so far, Josh. I'll let you know what I find.

    Friday, February 22, 2013 5:14 PM
  • That got it!

    Looking through the 'non working' code, i was feeding the HTTPResponse into a function in order to display it as something human readable. This function was using a StreamReader and reading in the response as one long string. The string was then put through a Encoder.UTF8 to get the bytes back and then that was plugged into my WBXMLDocument for translation. 

    Once I pulled out this interim step and had the respons byte array passed directly into my WBXMLDocument class the anomaly cleared up. I'm guessing something in the encoder didn't like the bytes it was getting and was munging them around a bit before passing them back.

    Anyways it appears to be functional now. Thank you so much for kicking me in the right direction.

    Cheers!

    Friday, February 22, 2013 5:22 PM