I am new with sharepoint and I have a problem with uploading files to my site. I am creating Python application communicating with sharepoint by SOAP webservices.

I was able to create new List called "data" and new list item with title "new_file.dat". It created an item with name "5_" and refering to file "5_.000" (which is not found now - 404). Now I want to append an attachement to it by this SOAP command

<?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/">
        <AddAttachment xmlns="http://schemas.microsoft.com/sharepoint/soap/">

The item id is 5 (I found it by GetListItems as ows_ID) and the attachement is only an example of base64 encoded string (the data file).

Here is the problem, the sharepoint still gives me an error 500 with errorstring: "Value does not fall within the expected range" and does not attached the file.

The way of sending the command is probably ok, because all other services works fine for me.

Thank you for any suggestions or hints what I do wrong.


1 Answer 1


Finally, I found the answer. The problem is that if I upload file to Documents it requires a method Copy.CopyIntoItems and adding attachement is not possible.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.