Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This example describes a simple method for creating a file using the protocols covered in this system. This example uses the Creating a SharePoint Document Library File from the Client Console use case described in section 2.5.1. This example is specifically for operations involving Microsoft SharePoint Foundation 2010.
Note The following steps and diagram consolidate multiple front-end web server to back-end database server actions, and multiple front-end web server to Active Directory actions into single flows. The step descriptions indicate where multiple actions are occurring and specify examples that provide more detail about those actions. In addition, the diagram and steps do not describe some initial interactions between the client and server that optionally happen on some clients, and which can also depend on whether the client has connected to the site previously to verify that the server is able to support WebDAV.
The main member protocols used in this sequence are [MS-WSSFO2] covering the stored procedures listed in the steps, and [MS-WDV].
The following assumptions are made for the purposes of this example:
The user has read/write access permissions to an existing SharePoint Foundation 2010 document library called "http://server/site/doclib".
The user is logged on to a client computer running Windows 7 operating system with an authenticated Windows session, and can access the Windows SharePoint Services site containing the document library.
From a command prompt window on the end-user client machine, the user has typed the following command:
echo hello >\\server\site\doclib\hello.txt
Figure 14: Create a SharePoint Document Library file from the client console
The [MS-WSSFO2] examples referenced for more details in the following steps use the SharePoint programming API; the actual steps can vary when the request is generated by user interaction with the front-end web server, as in this case.
The following actions happen:
The user initiates the
echo
command and the end-user client sends a WebDAV request to the server asking it to perform a PUT operation on the hello.txt file in the document library.The front-end web server (IIS) authenticates the user with Active Directory. In practice, this can involve multiple LDAP requests with the Active Directory, especially if the user has not previously visited the site (2).
Active Directory responds with multiple LDAP results.
For more information about authentication, see section 2.9.2.1.
For more information about the scenario when the user has not previously visited the site, see [MS-WSSFO2] section 4.2 for SharePoint Foundation 2010.
In multiple roundtrips with the back-end database server, the front-end web server locates the content database for the document library, and verifies that the library exists.
The back-end database server returns multiple objects for the site collection, website and library to the front-end web server.
For more information about steps 4 and 5, see [MS-WSSFO2] section 4.6 for SharePoint Foundation 2010.
In multiple roundtrips with the back-end database server, the front-end web server creates an empty file in the document library, and then, if successful, the front-end web server also verifies that the user has permissions to access and write to the document library.
The back-end database server returns multiple result sets as part of the process to create the file.
For more information about file creation in steps 6 and 7, see [MS-WSSFO2] section 4.9 for SharePoint Foundation 2010.
The front-end web server returns a WebDAV response indicating the file was created successfully.
The client sends a WebDAV HEAD request to front-end web server with the URL to the hello.txt file in the document library, to verify the success of the previous call.
In multiple roundtrips with the back-end database server, the front-end web server retrieves the file.
The back-end database server returns multiple results sets as part of the process to retrieve the file.
For more information about file retrieval in steps 10 and 11, see [MS-WSSFO2] section 4.1 for SharePoint Foundation 2010.
In response to the HEAD request, the front-end web server sends a response reporting that the request was successful.
Then the client sends a WebDAV PUT request to the front-end web server containing multiple parts, to upload the file and to update the file properties.
The client sends a WebDAV request to the front-end web server with an XML payload that has the file properties from the client.
The client sends a HTTP request to the front-end web server with an HTTP payload that has the file content; in this example, that content is simply the text "hello".
In multiple roundtrips with the back-end database server, the front-end web server updates the file and its properties in the document library.
The back-end database server returns multiple result sets as part of the process to update the files.
For more information about file retrieval and update in Steps 16 and 17, see [MS-WSSFO2] sections 4.1 and 4.9 for SharePoint Foundation 2010. There is overlap with previous steps because stored procedures such as proc_FetchDocForUpdate ([MS-WSSFO2] section 3.1.5.21) are part of file updates as well as file creation.
18. Upon completing the update, the front-end web server sends a WebDAV response reporting that the request was successful.