Quantcast
Channel: Exchange Server Development forum
Viewing all articles
Browse latest Browse all 7132

[EWS] GetAttachment returns other Ids in response than used in the request

$
0
0

Hello,

I have a problem using the Exchange WebServices to retrieve Attachments from a (journal) postbox. In my request I provide the IDs of multiple Attachments that are not neccessarily within the same e-mail. I get then a successful response but the attachments have different IDs so that I cannot connect the attachments to the right e-mails.

Is this a bug in the Exchange Server? I use the Exchange Version 15.1.1713.5 / V2017_07_11. Strange is that this works most of the time. But sometimes the response contains different IDs.

Here are my request and my response, content is trimmed:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header>
    <ns2:ExchangeImpersonation xmlns="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:ns2="http://schemas.microsoft.com/exchange/services/2006/types">
      <ns2:ConnectingSID>
        <ns2:PrimarySmtpAddress>Postbox-Journal@example.com</ns2:PrimarySmtpAddress>
      </ns2:ConnectingSID>
    </ns2:ExchangeImpersonation>
    <ns2:RequestServerVersion xmlns="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:ns2="http://schemas.microsoft.com/exchange/services/2006/types" Version="Exchange2007_SP1"/>
  </soap:Header>
  <soap:Body>
    <GetAttachment xmlns="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:ns2="http://schemas.microsoft.com/exchange/services/2006/types">
      <AttachmentShape>
        <ns2:BodyType>Best</ns2:BodyType>
        <ns2:AdditionalProperties>
          <ns2:ExtendedFieldURI PropertyTag="0x300B" PropertyType="Binary"/>
        </ns2:AdditionalProperties>
      </AttachmentShape>
      <AttachmentIds>
        <ns2:AttachmentIdxmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Id="AAMkAGEyOTJlMzU0LTUwZWUtNDc3MC04ZTE1LTY4YjVmMWUyYjUxMQBGAAAAAAC/joJFqIkXRafKDVM8iX/wBwDpbknHO7FhQ49g8MyiZ6fUAAAA2PWaAADJX0LVO4HsRY+jGcWYgzSCAAA20UetAAACEgAQAJ2YkUhLm6hPpxTwzkayv6USABAAwLKRE+Yxsk6P4xcouWepCw==" xsi:type="ns2:AttachmentIdType"/>
        <ns2:AttachmentIdxmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Id="AAMkAGEyOTJlMzU0LTUwZWUtNDc3MC04ZTE1LTY4YjVmMWUyYjUxMQBGAAAAAAC/joJFqIkXRafKDVM8iX/wBwDpbknHO7FhQ49g8MyiZ6fUAAAA2PWaAADJX0LVO4HsRY+jGcWYgzSCAAA2zBPYAAACEgAQAHd0ys1t0A9ArJ9YLo8Rfr0SABAABgfVQlzsb0W9Xi/334Yghw==" xsi:type="ns2:AttachmentIdType"/>
      </AttachmentIds>
    </GetAttachment>
  </soap:Body>
</soap:Envelope>

Response:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Header>
    <h:ServerVersionInfo xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" MajorVersion="15" MinorVersion="1" MajorBuildNumber="1713" MinorBuildNumber="5" Version="V2017_07_11"/>
  </s:Header>
  <s:Body>
    <m:GetAttachmentResponsexmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
      <m:ResponseMessages>
        <m:GetAttachmentResponseMessage ResponseClass="Success">
          <m:ResponseCode>NoError</m:ResponseCode>
          <m:Attachments>
            <t:FileAttachment>
              <t:AttachmentIdId="AAMkAGEyOTJlMzU0LTUwZWUtNDc3MC04ZTE1LTY4YjVmMWUyYjUxMQBGAAAAAAC/joJFqIkXRafKDVM8iX/wBwDpbknHO7FhQ49g8MyiZ6fUAAAA2PWaAADJX0LVO4HsRY+jGcWYgzSCAAA20UetAAABEgAQAMCykRPmMbJOj+MXKLlnqQs="/>
              <t:Name>a.pdf</t:Name>
              <t:ContentType>application/pdf</t:ContentType>
              <t:ContentId>B300EBA4BF3D684BBFFA25DB26203D8D@klinikum-os.net</t:ContentId>
              <t:Content>JVBERi0xLjQKJeLj0YK</t:Content>
            </t:FileAttachment>
          </m:Attachments>
        </m:GetAttachmentResponseMessage>
        <m:GetAttachmentResponseMessage ResponseClass="Success">
          <m:ResponseCode>NoError</m:ResponseCode>
          <m:Attachments>
            <t:FileAttachment>
              <t:AttachmentIdId="AAMkAGEyOTJlMzU0LTUwZWUtNDc3MC04ZTE1LTY4YjVmMWUyYjUxMQBGAAAAAAC/joJFqIkXRafKDVM8iX/wBwDpbknHO7FhQ49g8MyiZ6fUAAAA2PWaAADJX0LVO4HsRY+jGcWYgzSCAAA2zBPYAAABEgAQAAYH1UJc7G9FvV4v99+GIIc="/>
              <t:Name>image001.jpg</t:Name>
              <t:ContentType>image/jpeg</t:ContentType>
              <t:ContentId>image001.jpg@01D50B2A.9BCCCD40</t:ContentId>
              <t:Content>/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAoHBwkHBgoJCAkLCwo=</t:Content>
            </t:FileAttachment>
          </m:Attachments>
        </m:GetAttachmentResponseMessage>
      </m:ResponseMessages>
    </m:GetAttachmentResponse>
  </s:Body>
</s:Envelope>

Kind Regards


Viewing all articles
Browse latest Browse all 7132


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>