I am using the following code to create a file and then check it in:
//Some other code above. The following line works fine.
createdItem = ceoList.UpdateListItems("Pages", newItem);
//But this line throws a file not found error
ceoList.CheckInFile("http://myServer:88/" + newUrl, "Automated version created by the Publish Friday Memo on the internal sharepoint site.", "2");
If I debug this and place the line: "http://myServer:88/" + newUrl in my immediate window I get the url I would expect. If I navigate to that URL i see the page I want. But when I run the CheckInFile line I get a SOAP file not found exception. Any idea why this would happen?
Below is the stack trace:
SOAP exception: System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002) at Microsoft.SharePoint.Library.SPRequestInternalClass.GetMetadataForUrl(String bstrUrl, Int32 METADATAFLAGS, Guid& pgListId, Int32& plItemId, Int32& plType, Object& pvarFileOrFolder) at Microsoft.SharePoint.Library.SPRequest.GetMetadataForUrl(String bstrUrl, Int32 METADATAFLAGS, Guid& pgListId, Int32& plItemId, Int32& plType, Object& pvarFileOrFolder) at Microsoft.SharePoint.SPWeb.GetListItem(String strUrl, Boolean bFields, String[] fields) at Microsoft.SharePoint.SoapServer.ListDataImpl.CheckInFile(String pageUrl, String comment, String CheckinType) at Microsoft.SharePoint.SoapServer.ListDataValidatorImpl.CheckInFile(String pageUrl, String comment, String CheckinType) at Microsoft.SharePoint.SoapServer.Lists.CheckInFile(String pageUrl, String comment, String CheckinType)