3.1.4.5.1 Get Lock

If the ExclusiveLockRequestType attribute is set to "GetLock", the protocol server considers this exclusive lock subrequest to be of type "Get lock". The protocol server process the request to get an exclusive lock on the file.

The protocol server returns an error code value set to "FileAlreadyLockedOnServer" if one of the following conditions is true:

  • The file is already locked with an exclusive lock with a different exclusive lock identifier.

  • The file is already locked with a shared lock.

If the file is locked with the same exclusive lock identifier that is sent in the exclusive lock subrequest of type "Get lock", the protocol server refreshes the existing exclusive lock and returns an error code value set to "Success".

If the protocol server encounters an error because the document is not being checked out on the server and the file is saved to a document library that requires checking out files, the protocol server returns an error code value set to "DocumentCheckoutRequired". The "DocumentCheckoutRequired" error code value indicates to the protocol client that a checkout needs to be done before the file can be locked. The checkout of the file is done by the client using the CheckoutFile web service call as specified in [MS-LISTSWS].

If the protocol server encounters an issue in locking the file because a checkout has already been done by another client, the protocol server returns an error code value set to "FileAlreadyCheckedOutOnServer". If the checkout of the file has been done by the current client, the protocol server MUST allow an exclusive lock on the file. If the protocol server encounters unknown exceptions or failures when trying to get a lock on the file, the protocol server returns an error code value that is set to "LockRequestFail" to indicate an unknown failure.

If any failure occurs such that the subrequest cannot be processed successfully, the protocol server returns an error. The error that the protocol server returns is implementation-specific. Errors that are directly returned by the protocol server are implementation-specific. DependencyCheckRelatedErrorCodeTypes is defined in section 2.2.5.2. LockAndCoauthRelatedErrorCodeTypes is defined in section 2.2.5.8.