Howdy,
I am trying to checkout a file from a SharePoint document library before downloading to my client application for edit.
//documentPath = https://192.168.1.10/Utility/Phys/Document%20Library/document.xml
//listWebServiceURL = https://192.168.1.10/Utility/Phys/Document%20Library/_vti_bin/lists.asmx
private void CheckOutFile(string documentPath)
{
string listWebServiceUrl = this.GetListServiceURL(documentPath);
bool checkedOut;
using (Lists listWebService = new Lists())
{
listWebService.Credentials = CredentialCache.DefaultCredentials;
listWebService.Url = listWebServiceUrl;
checkedOut = listWebService.CheckOutFile(documentPath, "true", string.Empty);
}
}
When the checkedOut = listWebService.CheckOutFile(documentPath, "true", string.Empty); line runs I get a SOAPServerException.
((System.Xml.XmlElement)((System.Web.Services.Protocols.SoapException)(ex)).Detail).InnerText Object reference not set to an instance of an object.
Any help on this would be appreciated.
Thank you,
Keith
EDIT: I have tested the above code against a SharePoint library that does not use SSL and it seems to work fine.