Monday, August 24, 2015

Objective c Create Folder SharerPoint Soap Service

Hope whoever reading this article is familiar with SharePoint authentication and content fetch using Objective c. If not checkout my posts on these using Objective c, to get better idea on connecting and getting authenticated and fetching content from SharePoint server. 

Objective c SharePoint login service
Objective c SharePoint content fetch soap service

Now we know how to fetch content from SharePoint. Let's say we have a 'Create Folder' functionality in the SharePoint from our iOS app, which is a common functionality that we need to give to our app users. Let's see 'Create Folder' functionality for the SharePoint using Objective c and with the help of SharePoint SOAP services.

The SOAP service end point for 'CreateFolder' is _vti_bin/DWS.asmx. And SOAP action for this is given below. In this end point DWS stands for Document WorkSpace.



http://schemas.microsoft.com/sharepoint/soap/dws/CreateFolder


The SOAP action name itself says 'CreateFolder'. Now, we know the end point of the SOAP service and the SOAP action, but the main thing here is the SOAP body which is the most crucial one. Let's have a look at the SOAP body and the parameters that we need to pass to create folder item. The SOAP body for 'CreateFolder' is as shown below.






By seeing at the SOAP body, we can observe that there is only one string placeholder(%@), which is the url of the new folder that we are trying to create. Let's see how and what to pass in this parameter with an example.

Let's say, below url is the root folder url, that means whose content we fetched for display purpose in the app.

http://basedomain.com/sharepoint/mylist/folder1

Here, 'mylist' is the list and 'folder1' is the root folder. Now, we want to create a folder named 'newfolder' in the folder1. Then the parameter we need it pass in the SOAP body is as shown below.

http://basedomain.com/sharepoint/mylist/folder1/newfolder

That's it. This service is very simple. If there are any duplications in creating folder, the service response let's us know with the detailed description.

Hope this article is useful to SharePoint newbies.

Feel free to comment in case of any queries/concerns.

No comments:

Post a Comment