...
This web service acquires a lock for a specified entity, and it or a set of specified entities. It can also, optionally, steal the lock locks of a any specified entity entities that is are already locked at the time this service is run.
...
Panel | ||
---|---|---|
| ||
|
Request Elements
Element | Data Type | Required? |
---|
Default
Description | Sample Data | |
---|---|---|
Int32 | No |
Click here for more information | 1 | |
String (50) | Yes |
Click here for more information | AYlq2lioh82F1PapkJ+Npg== | |
LockDurationSeconds | Int32 | Yes |
The number of seconds the lock will be held |
. Must be between 1 second and 1 day (86400 seconds) | 120 | |
Locks | PwsProjectorLockRequest[1..100] | Yes |
The detailed information of the |
locks that |
are to be acquired | ||
LocksToSteal | PwsEntityLockSummary[1..100] | No |
The detailed information of the |
locks that |
ProjectorLockSetId
Int32
No
A unique identifier of a lock on an entity
Request Usage Example(s)
...
language | xml |
---|---|
title | Example 01 - Acquiring an Available Lock |
collapse | true |
...
are to be stolen. If not specified, the request will fail if any requested locks are already held. If specified, the information supplied must exactly match the current state of existing locks or the attempt to steal the existing locks will fail. Typically, this service is invoked with LocksToSteal empty or null. If there are existing locks, they will be returned in the LockHolders member of PwsFault. This data can then be sent, as is, back to the server in a second invocation of this service, as LocksToSteal, if the caller desires to steal the locks. | ||||
Int32 | No | Specify an existing Projector Lock Set Id to lock additional entities associated with an existing lock set. If not specified, a new lock set is created. Click here for more information |
Request Usage Example(s)
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pws="http://projectorpsa.com/PwsProjectorServices/" xmlns:req="http://projectorpsa.com/DataContracts/Requests/" xmlns:com="http://projectorpsa.com/DataContracts/Shared/Common/"> <soapenv:Header/> <soapenv:Body> <pws:PwsAcquireProjectorLocks> <pws:serviceRequest> <req:Locks>RequestId>1</req:RequestId> <req:SessionTicket>AYlq2lioh82F1PapkJ+Npg==</req:SessionTicket> <com:PwsProjectorLockRequest> <req:LockDurationSeconds>120</req:LockDurationSeconds> <com:EntityIdentity> <req:Locks> <com:EntityCode>P001468-001</com:EntityCode>PwsProjectorLockRequest> <com:EntityIdentity> <com:EntityCode>P001468-001</com:EntityCode> <com:EntityUid>1152921504607429941</com:EntityUid> <com:LockType>P</com:LockType> </com:EntityIdentity> </com:PwsProjectorLockRequest> </req:Locks> </pws:serviceRequest> </pws:PwsAcquireProjectorLocks> </soapenv:Body> </soapenv:Envelope> |
...
Panel | ||
---|---|---|
| ||
|
Response Elements
Element | Data Type | Description | Sample Data |
---|---|---|---|
Messages | The web service response status and message. Click here for more information | ||
Int32 | Click here for more information | 1 | |
Status | Click here for more information | Ok | |
DateTime | Click here for more information | 2018-10-16T17:28:12.1700152Z | |
Locks | PwsProjectorLock[1..100] | The complete set of information about the lock(s) | |
Int32 |
Click here for more information | 2602 |
Response Usage Example(s)
Code Block | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<PwsAcquireProjectorLocksResponse xmlns="http://projectorpsa.com/PwsProjectorServices/">
<PwsAcquireProjectorLocksResult xmlns:a="http://projectorpsa.com/DataContracts/Responses/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Messages xmlns="http://projectorpsa.com/CommonServices/" xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/"/>
<ResponseId xmlns="http://projectorpsa.com/CommonServices/">1</ResponseId>
<Status xmlns="http://projectorpsa.com/CommonServices/">Ok</Status>
<ServerTimestampUtc xmlns="http://projectorpsa.com/CommonServices/">2018-10-16T17:28:12.1700152Z</ServerTimestampUtc>
<a:Locks xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/">
<b:PwsProjectorLock>
<b:EntityIdentity>
<b:EntityCode>P001468-001</b:EntityCode>
<b:EntityId i:nil="true"/>
<b:EntityUid>1152921504607429941</b:EntityUid>
<b:LockType>P</b:LockType>
</b:EntityIdentity>
<b:EntityTimestamp>AAAAABCnqW4=</b:EntityTimestamp>
<b:LockStolenFlag>false</b:LockStolenFlag>
<b:StolenLocks/>
</b:PwsProjectorLock>
</a:Locks>
| |||||||||
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body> <a:ProjectorLockSetId>2602</a:ProjectorLockSetId> </PwsAcquireProjectorLocksResult><PwsAcquireProjectorLocksResponse xmlns="http://projectorpsa.com/PwsProjectorServices/"> </PwsAcquireProjectorLocksResponse> </s:Body> </s:Envelope> |
Response Usage Example(s)
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<s:Envelope xmlns:s<PwsAcquireProjectorLocksResult xmlns:a="http://projectorpsa.com/DataContracts/Responses/" xmlns:i="http://schemaswww.xmlsoapw3.org/soap/envelope/2001/XMLSchema-instance"> <s:Body> <s:Fault> <Messages <faultcode>s:Client</faultcode>xmlns="http://projectorpsa.com/CommonServices/" xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/"/> <faultstring<ResponseId xml:lang="en-US">The creator of this fault did not specify a Reason.</faultstring>xmlns="http://projectorpsa.com/CommonServices/">1</ResponseId> <Status xmlns="http://projectorpsa.com/CommonServices/">Ok</Status> <detail><ServerTimestampUtc xmlns="http://projectorpsa.com/CommonServices/">2018-10-16T17:28:12.1700152Z</ServerTimestampUtc> <PwsFault<a:Locks xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <Messages><b:PwsProjectorLock> <PwsMessage><b:EntityIdentity> <AdditionalErrorText>Error 50469: EntityAlreadyLocked</AdditionalErrorText><b:EntityCode>P001468-001</b:EntityCode> <ErrorCode>EntityAlreadyLocked</ErrorCode><b:EntityId i:nil="true"/> <ErrorNumber>50469</ErrorNumber><b:EntityUid>1152921504607429941</b:EntityUid> <ErrorText>One or more existing locks prevent acquisition of requested lock.</ErrorText><b:LockType>P</b:LockType> </b:EntityIdentity> <Type>Error</Type> <b:EntityTimestamp>AAAAABCnqW4=</b:EntityTimestamp> <ReferenceId1 i:nil="true"/> <b:LockStolenFlag>false</b:LockStolenFlag> <ReferenceId2 i:nil="true"<b:StolenLocks/> </b:PwsProjectorLock> </PwsMessage> </a:Locks> </Messages> <a:ProjectorLockSetId>2602</a:ProjectorLockSetId> <ResponseId>1<</ResponseId>PwsAcquireProjectorLocksResult> </PwsAcquireProjectorLocksResponse> </s:Body> <ServiceName>PwsAcquireProjectorLocksRs</ServiceName></s:Envelope> |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body> <PwsAcquireProjectorLocksResponse xmlns="http://projectorpsa.com/PwsProjectorServices/"> <LockHolderUserIdentity> <UserDisplayName>IT Manager</UserDisplayName><PwsAcquireProjectorLocksResult xmlns:a="http://projectorpsa.com/DataContracts/Responses/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <Messages <UserId i:nil="truexmlns="http://projectorpsa.com/CommonServices/" xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/"/> <UserReferenceSystemId>IT Manager</UserReferenceSystemId><ResponseId xmlns="http://projectorpsa.com/CommonServices/">1</ResponseId> <UserUid>1152921504607134339</UserUid> <Status xmlns="http://projectorpsa.com/CommonServices/">Ok</Status> </LockHolderUserIdentity> <ServerTimestampUtc xmlns="http://projectorpsa.com/CommonServices/">2018-10-17T15:28:07.9156991Z</ServerTimestampUtc> <LockHolders> <a:Locks xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/"> <PwsEntityLockSummary> <b:PwsProjectorLock> <EntityIdentity> <b:EntityIdentity> <EntityCode>P001468<b:EntityCode>P001468-001</b:EntityCode> <EntityId<b:EntityId i:nil="true"/> <EntityUid>1152921504607429941</<b:EntityUid>1152921504607429941</b:EntityUid> <LockType>P</LockType> <b:LockType>P</b:LockType> </b:EntityIdentity> <EntityLockSummary> <b:EntityTimestamp>AAAAABCnqY8=</b:EntityTimestamp> <PwsEntityLockSummaryItem><b:LockStolenFlag>true</b:LockStolenFlag> <b:StolenLocks> <LockCount>1</LockCount> <b:PwsEntityLockSummaryItem> <LockHolderUserIdentity> <b:LockCount>1</b:LockCount> <UserDisplayName>IT Manager</UserDisplayName> <b:LockHolderUserIdentity> <UserId i:nil="true"/><b:UserDisplayName>IT Manager</b:UserDisplayName> <UserReferenceSystemId>IT Manager</UserReferenceSystemId><b:UserId i:nil="true"/> <UserUid>1152921504607134339</UserUid><b:UserReferenceSystemId>IT Manager</b:UserReferenceSystemId> </LockHolderUserIdentity><b:UserUid>1152921504607134339</b:UserUid> <MostRecentLockAcquisitionTimestamp>2018-10-16T17:34:43.037Z</MostRecentLockAcquisitionTimestamp></b:LockHolderUserIdentity> </PwsEntityLockSummaryItem><b:MostRecentLockAcquisitionTimestamp>2018-10-17T15:24:42.897Z</b:MostRecentLockAcquisitionTimestamp> </EntityLockSummary>b:PwsEntityLockSummaryItem> </PwsEntityLockSummary>b:StolenLocks> </LockHolders>b:PwsProjectorLock> <LockTaker i:nil="true"/></a:Locks> </PwsFault><a:ProjectorLockSetId>2621</a:ProjectorLockSetId> </detail>PwsAcquireProjectorLocksResult> </s:Fault>PwsAcquireProjectorLocksResponse> </s:Body> </s:Envelope> |
PwsAcquireProjectorLocks - Common Errors and Warnings
...
ErrorNumber | ErrorCode | ErrorText |
---|---|---|
10126 | InvalidEnumerationValueSpecified | An invalid value was specified for LockType. Valid values are E, C, P, R, RT, CP, CB, I. |
50007 | ItemHasBeenUpdated | Unable to complete request -- another user changed the data while you were editing. |
50469 | EntityAlreadyLocked | One or more existing locks prevent acquisition of requested lock. |
50483 | InvalidLockDuration | Lock duration must between one second and one day. |
...