none
[EWS] [Java] Difference in setting ExProp between Ex'10 and Ex'07? RRS feed

  • Question

  • Hello,

    I have some code to create an e-mail message. This code also sets some extended properties for the ItemType:

    • 0x0039 Sent_Date (Type: SYSTEM_TIME = 0x0040)
    • 0x0E06 Received_Date (Type: SYSTEM_TIME)
    • 0x0E07 Msg_Flag (Type: Integer)

    These properties are set to recreate a previously deleted message and not to have it appear like a created and ready to sent message (I hope you know what I mean, not a kind of draft message). This must be done by extended properties as doing something like message.setDateTimeSent(XMLGregorianCalendar) will not work and gives an error for the CreateItem call.

    To make it short: this setting of these extended properties with the webservices worked for Exchange Server 2007 but not for Exchange Server 2010. I coded it for 2007 and wanted to try it for 2010 but it gave this error:

    "The extended property value is inconsistent with its type." (some debug information from the MessageXML object: propertyName=; propertyType=SYSTEM_TIME; propertySetId=; class=; propertyTag=0x39)

    The value was the following string (without quotation marks): "12/15/2010 1:16PM"

    So is it in Exch2010WS not any longer allowed to set explicitly the sent/received date for a newly created message? Or do I have to (as the error message suggests) set the value in another form? As said: the previous worked for Exch2007 WebServices

    Kind regards and thanks for any help, Alex

    Friday, December 17, 2010 8:12 AM

All replies

  • Problem solved: These SYSTIME properties are now set in the following format: "yyyy-MM-ddTHH:mm:ss", for example "2011-02-08T12:09:50" (no AM/PM)
    Tuesday, February 8, 2011 11:10 AM