Any idea how to create a folder in document library through web service.
If your document library is located at <<http://portal/sites/test/SharedDocuments>> and you want to create a folder called "test folder", thenfrom a command prompt type:MKDIR "\\portal\sites\test\Shared Documents\test folder"
But I want to create windows application tocreate a folder in document library using web service as I need tocreate it from client machine.
Using Windows scripting...Dim objFSOSet objFSO = CreateObject("Scripting.FileSystemObject")objFSO.CreateFolder("\\portal\sites\test\Shared Documents\test folder")
What is our requirement is something byadding web-refernce some asmx(Imaging.asmx,List.asmx,custom.asmx)file.Then something like folder.add("docLib/Myfolder"); should create afolder in mentioned document library docLib.
I'm not sure of the syntax for the specific web application, but as longas the WebClient service is running on the client machine, then creatingfolders in SharePoint is the same as creating them on the local filesystem.
There is a CreateFolder method for a document workspace. I don't know if you can use that on a Team site...You may have to write a custom web service to accomplish this. There is a document on MSDN that discusses creating a custom web service.
In Sharepoint object model we have the below piece of code to createnew folderSPSite site = SPControl.GetContextSite(Context);SPFolderCollection folders = site.GetFolder("SharedDocuments").SubFolders;folders.Add("Folder_Name");but I want to execute the same with web service. I think there is noweb service for this. do we need to create our own web service?
The document Workspace service is not just for Document Workspaces, but fordoing things against document libraries.Here's how to create a new folder in a document library using the web service.It's killer easy:Add a reference to the dws on the site where you want to create the folder (e.g.http://servername/sites/sitename/_vti_bin/Dws.asmx)Now the code to call the service (the service is called myserver but can bewhatever you want):myserver.Dws ws = new myserver.Dws();ws.Credentials = System.Net.CredentialCache.DefaultCredentials;ws.CreateFolder("DocumentLibraryName/NewFolderName");
CreateFolder in dws.asmx worked fine.............