Lists.CheckInFile Method
Allows documents to be checked in to a SharePoint document library remotely.
Web Service: ListsWeb Reference: http://<Site>/_vti_bin/Lists.asmx
Syntax
<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 Function CheckInFile ( _
pageUrl As String, _
comment As String, _
CheckinType As String _
) As Boolean
Dim instance As Lists
Dim pageUrl As String
Dim comment As String
Dim CheckinType As String
Dim returnValue As Boolean
returnValue = instance.CheckInFile(pageUrl, comment, CheckinType)
[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.
Example
The following example checks in a file to Shared Documents on a subsite.
Dim listService As New Web_Reference_Folder.Lists()
listService.Credentials = System.Net.CredentialCache.DefaultCredentials
Dim fileCheckin As String = "http://Server_Name/sites/Subsite/Shared Documents/MyFile.txt"
Dim myResults As Boolean = listService.CheckIn(fileCheckin, "Completed revision.", "1")
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");