none
Problem with Create Attachment using XML Soap Calls RRS feed

  • Question

  • I have a SOAP call with the following XML:

    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"                
    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"                
    xmlns="http://schemas.microsoft.com/exchange/services/2006/messages"              
    xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">    
    <soap:Body>        
    <CreateAttachment xmlns="http://schemas.microsoft.com/exchange/services/2006/messages"
    xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
                <ParentItemId Id="AAATAHR..." ChangeKey="CQAA..." />
                    <Attachments>
                        <t:FileAttachment>
                            <t:Name>file1.png</t:Name>
                            <t:ContentType>image/png</t:ContentType>
                            <t:Content>[B@40932c68</t:Content>
                        </t:FileAttachment>
                    </Attachments>
            </CreateAttachment>
        </soap:Body></soap:Envelope>

    It is failing with the HttpResponse of 500 (Internal Server Error).

    I normally see this when the XML isn't formatted correctly.  But I've checked all the doc and it looks correct.

    Anyone know why this is happening?

    Thanks!


    • Edited by pvd-app Friday, July 27, 2012 7:49 PM
    Friday, July 27, 2012 7:46 PM

Answers

  • I'm not sure if the <t:Content/> value you have given above is something you typed in as an example, or if it is what you are actually sending to the server, but it doesn't look like a valid Base64 string to me.

    Mobile OWA For Smartphone
    www.leederbyshire.com
    email a@t leederbyshire d.0.t c.0.m

    • Marked as answer by pvd-app Friday, August 3, 2012 1:08 AM
    Thursday, August 2, 2012 12:55 PM

All replies

  • I'm not sure if the <t:Content/> value you have given above is something you typed in as an example, or if it is what you are actually sending to the server, but it doesn't look like a valid Base64 string to me.

    Mobile OWA For Smartphone
    www.leederbyshire.com
    email a@t leederbyshire d.0.t c.0.m

    • Marked as answer by pvd-app Friday, August 3, 2012 1:08 AM
    Thursday, August 2, 2012 12:55 PM
  • Yes, that was it.  Thanks!
    Friday, August 3, 2012 1:08 AM