Hi All,
A very simple requirement of creating folder in the document library using web service comes many a times. So here is a simple three liner example that creates a folder in the document library.
All you need to do is add reference to the _vti_bin/DWS.asmx. Document workspace is the web service that manages all related to document workspace or even creating folder in normal team site document libraries.
DWorkSpace is webservice instance reference name.
DWorkSpace.Dws dwspace = new DWorkSpace.Dws();
dwspace.Credentials = System.Net.CredentialCache.DefaultCredentials;
dwspace.Url = "{your_site}/_vti_bin/DWS.asmx";
dwspace.CreateFolder("Shared Documents/DemoFolder");
That is it. You have just created DemoFolder inside Shared Documents library of your site url.
SharePoint Kings,Technosavvy guys hunting SharePoint Challenges... SharePoint 2013, SharePoint 2010, MOSS 2007, Windows Workflow Foundation, Project Server and Other Related Technologies.
Tuesday, December 21, 2010
Thursday, December 16, 2010
_vti_bin folder name revealed
Hi All,
Well this post has nothing to do with actual coding or understanding about the SharePoint or workflow. However from this post, we are trying to have a new section in our blog is did you know
Did you know will try to give you some information which may be interesting.
So here is the first post for that section.
Let’s talk about Vermeer Technologies Incorporated. This company was a software company founded in 1994 and has only one product which was FrontPage.
Microsoft then acquired this company to get in to the web arena market.
So even today that company has existence in some or the other way. Can you get that? No, well here is the answer.
We all know that there is _vti_bin folder in SharePoint. So _vti (Vermeer Technologies Incorporated).. Get that? Cool, right?
Well this post has nothing to do with actual coding or understanding about the SharePoint or workflow. However from this post, we are trying to have a new section in our blog is did you know
Did you know will try to give you some information which may be interesting.
So here is the first post for that section.
Let’s talk about Vermeer Technologies Incorporated. This company was a software company founded in 1994 and has only one product which was FrontPage.
Microsoft then acquired this company to get in to the web arena market.
So even today that company has existence in some or the other way. Can you get that? No, well here is the answer.
We all know that there is _vti_bin folder in SharePoint. So _vti (Vermeer Technologies Incorporated).. Get that? Cool, right?
Tuesday, December 14, 2010
Updating list to be on quick launch through web service
Hi All,
We all know that we can create SharePoint list or library from web service provided by SharePoint web services. However there are no full blown functionalities in it which can be achieved so easily from object model.
So basic question that comes in when we create a list or library from web service, there is no direct way to set it up to show in the quick launch bar.
So here is a sample code which shows how to create a list, how to add fields in it and how to display that list in the quick launch from web service.
So here we will get to know three things although two of them are covered separately in earlier posts.
WebListsService.Lists listService = new WebListsService.Lists();
listService.Credentials = System.Net.CredentialCache.DefaultCredentials;
listService.Url = "{list_asmx_url}";
XmlNode xnNewLists = listService.AddList("Products", "This is products list created by web service", 100);
XmlDocument xmlDoc = new XmlDocument();
XmlNode xnNewFields = xmlDoc.CreateNode(XmlNodeType.Element, "Fields", "");
xnNewFields.InnerXml +=
"<Method ID='1'>" +
"<Field Type='Text' Title='ProductName' DisplayName = 'Product Name' Required='TRUE' Description = 'Name of the Product'/>" +
"</Method>";
xnNewFields.InnerXml +=
"<Method ID='2'>" +
"<Field Type='Text' DisplayName='Price'/>" +
"</Method>";
xnNewFields.InnerXml +=
"<Method ID='3'>" +
"<Field Type='Number' DisplayName='Product Code'/>" +
"</Method>";
XmlNode xnProperties = xmlDoc.CreateNode(XmlNodeType.Element, "List", "");
XmlAttribute xnQuickLaunchAttribute = (XmlAttribute)xmlDoc.CreateNode(XmlNodeType.Attribute, "OnQuickLaunch", "");
xnQuickLaunchAttribute.Value = "True";
xnProperties.Attributes.Append(xnQuickLaunchAttribute);
XmlAttribute xnEnableversioningAttribute = (XmlAttribute)xmlDoc.CreateNode(XmlNodeType.Attribute, "EnableVersioning", "");
xnEnableversioningAttribute.Value = "True";
xnProperties.Attributes.Append(xnEnableversioningAttribute);
XmlNode updateList = listService.UpdateList("Products", xnProperties, xnNewFields, null, null, null);
And that's it. your job is done. your list or library is now on quick launch through web service.
We all know that we can create SharePoint list or library from web service provided by SharePoint web services. However there are no full blown functionalities in it which can be achieved so easily from object model.
So basic question that comes in when we create a list or library from web service, there is no direct way to set it up to show in the quick launch bar.
So here is a sample code which shows how to create a list, how to add fields in it and how to display that list in the quick launch from web service.
So here we will get to know three things although two of them are covered separately in earlier posts.
WebListsService.Lists listService = new WebListsService.Lists();
listService.Credentials = System.Net.CredentialCache.DefaultCredentials;
listService.Url = "{list_asmx_url}";
XmlNode xnNewLists = listService.AddList("Products", "This is products list created by web service", 100);
XmlDocument xmlDoc = new XmlDocument();
XmlNode xnNewFields = xmlDoc.CreateNode(XmlNodeType.Element, "Fields", "");
xnNewFields.InnerXml +=
"<Method ID='1'>" +
"<Field Type='Text' Title='ProductName' DisplayName = 'Product Name' Required='TRUE' Description = 'Name of the Product'/>" +
"</Method>";
xnNewFields.InnerXml +=
"<Method ID='2'>" +
"<Field Type='Text' DisplayName='Price'/>" +
"</Method>";
xnNewFields.InnerXml +=
"<Method ID='3'>" +
"<Field Type='Number' DisplayName='Product Code'/>" +
"</Method>";
XmlNode xnProperties = xmlDoc.CreateNode(XmlNodeType.Element, "List", "");
XmlAttribute xnQuickLaunchAttribute = (XmlAttribute)xmlDoc.CreateNode(XmlNodeType.Attribute, "OnQuickLaunch", "");
xnQuickLaunchAttribute.Value = "True";
xnProperties.Attributes.Append(xnQuickLaunchAttribute);
XmlAttribute xnEnableversioningAttribute = (XmlAttribute)xmlDoc.CreateNode(XmlNodeType.Attribute, "EnableVersioning", "");
xnEnableversioningAttribute.Value = "True";
xnProperties.Attributes.Append(xnEnableversioningAttribute);
XmlNode updateList = listService.UpdateList("Products", xnProperties, xnNewFields, null, null, null);
And that's it. your job is done. your list or library is now on quick launch through web service.
Saturday, December 11, 2010
Finally the result is out
Subscribe to:
Posts (Atom)
Share your SharePoint Experiences with us...
As good as the SharePointKings is, we want to make it even better. One of our most valuable sources of input for our Blog Posts comes from ever enthusiastic Visitors/Readers. We welcome every Visitor/Reader to contribute their experiences with SharePoint. It may be in the form of a code stub, snippet, any tips and trick or any crazy thing you have tried with SharePoint.
Send your Articles to sharepointkings@gmail.com with your Profile Summary. We will Post them. The idea is to act as a bridge between you Readers!!!
If anyone would like to have their advertisement posted on this blog, please send us the requirement details to sharepointkings@gmail.com