none
EWS - Create a message with extended property return internal server error RRS feed

  • Question

  • I want to try to create a message with a mime content. and I add extended property tag so the message not flagged as a draft. This the example xml request

    <?xml version="1.0"?>
      <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <soap:Header>
            <t:RequestServerVersion Version="Exchange2013_SP1"/>
        </soap:Header>
        <soap:Body>
            <CreateItem xmlns="http://schemas.microsoft.com/exchange/services/2006/messages" MessageDisposition="SaveOnly">
                <SavedItemFolderId>
                    <t:FolderId Id="AAMkAGE1YTU3MjkyLWFmMjItNGYyZC05Y2ZiLTIwMWY4MjJhMTVlNAA`enter code here`uAAAAAAChtMCk52J3RLzcG5WcyzUkAQCsm0+9jDPcQakVSrf3fxOXAAAAAAEMAAA="/>
                </SavedItemFolderId>
                <Items>
                    <t:Message>
                        <t:MimeContent>
                        #-- Mime content goes here --#
                        </t:MimeContent>
                        <t:ExtendedProperty>
                            <t:ExtendedFieldURI PropertyTag="3591" PropertyType="Integer">
                                <t:Value>1</t:Value>
                            </t:ExtendedFieldURI>
                        </t:ExtendedProperty>
                    </t:Message>
                </Items>
            </CreateItem>
        </soap:Body>
    </soap:Envelope>

    after I submit, I got the internal server error.

    <?xml version="1.0" encoding="utf-8"?>
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
        <s:Header>
            <Action s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">*
            </Action>
        </s:Header>
        <s:Body>
            <s:Fault>
                <faultcode xmlns:a="http://schemas.microsoft.com/exchange/services/2006/types">
                    a:ErrorInternalServerError
                </faultcode>
                <faultstring xml:lang="en-US">
                    An internal server error occurred. The operation failed.    
                </faultstring>
                <detail>
                    <e:ResponseCode xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">
                        ErrorInternalServerError
                    </e:ResponseCode>
                    <e:Message xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">
                        An internal server error occurred. The operation failed.
                    </e:Message>
                </detail>
            </s:Fault>
        </s:Body>
     </s:Envelope>

    When I try to remove the extended property tag it works fine. but the message flagged as a draft.

    Please advice me how to send the xml request properly.

    Wednesday, February 8, 2017 3:18 AM

All replies

  • I would guess that its happening because changing the flag on that item once you upload it is resulting is not a valid request at the server level. But without seeing the actual MimeContent it hard for anybody to say either way.

    Cheers
    Glen

    Thursday, February 9, 2017 3:18 AM
  • I try to save it first then update the item, it still return internal server error.
    Monday, February 13, 2017 3:26 AM
  • As I said its probably because of the Item itself but without the MimeContent it pretty hard to provide any other suggestions

    Tuesday, February 14, 2017 3:42 AM