The web service method to delete an item is here, send a xml to SharePoint:
<Batch OnError=“Continue” PreCalc=“TRUE” ListVersion=“0” ViewName=“{EF2F5A21-0FD0-4654-84ED-112B4F5A48F8}”>
<Method ID=“1” Cmd=“Delete”>
<Field Name=“ID”>3</Field>
<Field Name=“FileRef”>
http://Server/[sites/][Site/]Shared Documents/File
</Field>
</Method>
</Batch>
Note that to delete a file, other than deleting other type of item, the field “FileRef” must be provided, the url cannot include any encoded characters(exclude / : * .etc that cannot used as folder/file name in SharePoint), for example the above url include a whitespace, if you encode it to ‘%20’, then SharePoint will report an error or do nothing.
Another wired thing is, In my environment, I can browse SharePoint
No comments:
Post a Comment