Lists.CheckInFile method

Allows documents to be checked in to a SharePoint document library remotely.

Namespace:  WebSvcLists
Assembly:  STSSOAP (in STSSOAP.dll)

[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
Type: System.String

A string that contains the full path to the document to check in.

comment
Type: System.String

A string containing optional check-in comments.

CheckinType
Type: System.String

A string representation of the values 0, 1 or 2, where 0 = MinorCheckIn, 1 = MajorCheckIn, and 2 = OverwriteCheckIn.

Return value

Type: System.Boolean
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");
Show: