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

        <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.


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

