S
Sadhna
HI ,
I am using MOSS 2007 API's to implement the version controls like check in
and check out in Visual Studio 2005.
I have a sharepoint 2007 server and i am accessing the MOSS API (on
sharepoint server) from dotnet web application on my local machine using a
custom webservice. I am able to check out the document on the sharepoint
server by calling the API "item.File.CheckOut();" method via custom
webservice. But once i check out the document i need to open the document
and check it in back to the sharepoint server from my application. When i try
to do this i can open the document using the following code
SPDocumentLibrary docLib =
(SPDocumentLibrary)web.Lists[System.Configuration.ConfigurationSettings.AppSettings["CarizmaDocumentLibraryName"].ToString()];SPListItem
item = docLib.GetItemById(int.Parse(documentID));
SPFile document = web.GetFile(item["URL Path"].ToString());
byte[] documentContent = document.OpenBinary();
Response.ClearContent();
Response.ContentType =
Carizma.Common.CarizmaConfiguration.GetAppSetting("CONTENT_TYPE_" + itemType);
Response.AddHeader("Content-Disposition", "attachment;filename=" +
documentName);
Response.BinaryWrite(documentContent );
Response.End();
But i am not able to check in the changes made on the document back to the
sharepoint server from my local application. How will i be able to do this?
I am using MOSS 2007 API's to implement the version controls like check in
and check out in Visual Studio 2005.
I have a sharepoint 2007 server and i am accessing the MOSS API (on
sharepoint server) from dotnet web application on my local machine using a
custom webservice. I am able to check out the document on the sharepoint
server by calling the API "item.File.CheckOut();" method via custom
webservice. But once i check out the document i need to open the document
and check it in back to the sharepoint server from my application. When i try
to do this i can open the document using the following code
SPDocumentLibrary docLib =
(SPDocumentLibrary)web.Lists[System.Configuration.ConfigurationSettings.AppSettings["CarizmaDocumentLibraryName"].ToString()];SPListItem
item = docLib.GetItemById(int.Parse(documentID));
SPFile document = web.GetFile(item["URL Path"].ToString());
byte[] documentContent = document.OpenBinary();
Response.ClearContent();
Response.ContentType =
Carizma.Common.CarizmaConfiguration.GetAppSetting("CONTENT_TYPE_" + itemType);
Response.AddHeader("Content-Disposition", "attachment;filename=" +
documentName);
Response.BinaryWrite(documentContent );
Response.End();
But i am not able to check in the changes made on the document back to the
sharepoint server from my local application. How will i be able to do this?