Lists.CheckInFile Method
Windows SharePoint Services 3
Allows documents to be checked in to a SharePoint document library remotely.
Web Service: ListsWeb Reference: http://<Site>/_vti_bin/Lists.asmx
[SoapDocumentMethodAttribute("http://schemas.microsoft.com/sharepoint/soap/CheckInFile", RequestNamespace="http://schemas.microsoft.com/sharepoint/soap/", ResponseNamespace="http://schemas.microsoft.com/sharepoint/soap/", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped)] public bool CheckInFile ( string pageUrl, string comment, string CheckinType )
Parameters
- pageUrl
A string that contains the full path to the document to check in.
- comment
A string containing optional check-in comments.
- CheckinType
A string representation of the values 0, 1 or 2, where 0 = MinorCheckIn, 1 = MajorCheckIn, and 2 = OverwriteCheckIn.
Note: These values map to the Microsoft.SharePoint.SPCheckinType enumeration.
Return Value
true if the operation succeeded; otherwise, false.The following example checks in a file to Shared Documents on a subsite.
Web_Reference_Folder.Lists listService = new Web_Reference_Folder.Lists(); listService.Credentials = System.Net.CredentialCache.DefaultCredentials; string fileCheckin = "http://Server_Name/sites/Subsite/Shared Documents/MyFile.txt"; bool myResults = listService.CheckIn(fileCheckin, "Completed revision.", "1");
Error in Sample Code
The web method should be CheckInFile in the sample code...
- 1/8/2009
- Vic209130
- 7/8/2010
- Thomas Lee