Overview
This web service returns can be used to check the locked state of an entity or set of entities. It can also, optionally, steal any existing locks on a the specified entity or entities. It can be used to determine whether your existing lock is still valid (has not expired and has not been stolen) – by specifying a Projector lock set id, or just to determine whether the specified entity or entities are already locked or not – by not specifying a Projector lock set id.
Request Format
Panel | ||
---|---|---|
| ||
|
Request Elements
Element | Data Type | Required? |
---|
Description | ||
---|---|---|
Int32 |
No | Click here for more information | 1 |
String |
Yes | Click /wiki/spaces/QA/pages/11796515 for more information | AXMhtleRqwAazB/BUJaCKA== |
Locks | PwsProjectorLockRequest [1..100] |
ProjectorLockSetId
Int32
LocksToSteal
Request Usage Example(s)
...
language | xml |
---|---|
title | Example 01 - Check Locks without Stealing |
collapse | true |
...
Yes | This structure contains the complete set of entities to check for existing locks. | |||
Int32 | No | If you hold an existing lock set over these entities and want to verify that the lock set is still valid, specify the lock set id here. Otherwise leave this null or omit it. Note if you do hold a lock set and do not specify the lock set id here, the service will report that the entities are currently locked. Click here for more information | ||
LocksToSteal | PwsEntityLockSummary [1..100] | No | The detailed information of the locks that 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. |
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:PwsCheckProjectorLocks> <com<pws:PwsProjectorLockRequest>serviceRequest> <req:RequestId>1</req:RequestId> <com:EntityIdentity> <req:SessionTicket>AXMhtleRqwAazB/BUJaCKA==</req:SessionTicket> <com:EntityCode>P001468-001</com:EntityCode><req:Locks> <com:PwsProjectorLockRequest> <com:LockType>P</com:LockType> <com:EntityIdentity> </com:EntityIdentity> <<com:EntityCode>P001468-001</com:PwsProjectorLockRequest>EntityCode> </req:Locks> </pws:serviceRequest><com:LockType>P</com:LockType> </pws:PwsCheckProjectorLocks> </soapenv:Body> </soapenv:Envelope> | ||||||
Code Block | ||||||
| ||||||
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pws="http://projectorpsa.com/PwsProjectorServices/" xmlns:reqcom:EntityIdentity> </com:PwsProjectorLockRequest> </req:Locks> </pws:serviceRequest> </pws:PwsCheckProjectorLocks> </soapenv:Body> </soapenv:Envelope> |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pws="http://projectorpsa.com/DataContracts/RequestsPwsProjectorServices/" xmlns:comreq="http://projectorpsa.com/DataContracts/Requests/" xmlns:com="http://projectorpsa.com/DataContracts/Shared/Common/"> <soapenv:Header/> <soapenv:Body> <pws:PwsCheckProjectorLocks> <pws:serviceRequest> <req:RequestId>1</req:RequestId> <req:SessionTicket>AXMhtleRqwAazB/BUJaCKA==</req:SessionTicket> <req:Locks> <com:PwsProjectorLockRequest> <com:EntityIdentity> <com:EntityCode>P001468-001</com:EntityCode> <com:LockType>P</com:LockType> </com:EntityIdentity> </com:PwsProjectorLockRequest> </req:Locks> <req:LocksToSteal> <com:PwsEntityLockSummary> <com:EntityIdentity> <com:EntityCode>P001468-001</com:EntityCode> <com:LockType>P</com:LockType> </com:EntityIdentity> <com:EntityLockSummary> <com:PwsEntityLockSummaryItem> <com:LockCount>1</com:LockCount> <com:LockHolderUserIdentity> <com:UserDisplayName>IT Manager</com:UserDisplayName> <com:UserReferenceSystemId>IT Manager</com:UserReferenceSystemId> </com:LockHolderUserIdentity> <com:MostRecentLockAcquisitionTimestamp>2018-10-16T19:27:26.967Z</com:MostRecentLockAcquisitionTimestamp> </com:PwsEntityLockSummaryItem> </com:EntityLockSummary> </com:PwsEntityLockSummary> </req:LocksToSteal> </pws:serviceRequest> </pws:PwsCheckProjectorLocks> </soapenv:Body> </soapenv:Envelope> |
Response Format
Panel |
---|
...
|
...
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<s:Fault>
<faultcode>s:Client</faultcode>
<faultstring xml:lang="en-US">The creator of this fault did not specify a Reason.</faultstring>
<detail>
<PwsFault xmlns="http://projectorpsa.com/DataContracts/Shared/Common/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Messages>
<PwsMessage>
<AdditionalErrorText>Error 50469: EntityAlreadyLocked</AdditionalErrorText>
<ErrorCode>EntityAlreadyLocked</ErrorCode>
<ErrorNumber>50469</ErrorNumber>
<ErrorText>One or more existing locks prevent acquisition of requested lock.</ErrorText>
<Type>Error</Type>
<ReferenceId1 i:nil="true"/>
<ReferenceId2 i:nil="true"/>
</PwsMessage>
</Messages>
<ResponseId>1</ResponseId>
<ServiceName>PwsCheckProjectorLocksRs</ServiceName>
<LockHolderUserIdentity>
<UserDisplayName>IT Manager</UserDisplayName>
<UserId i:nil="true"/>
<UserReferenceSystemId>IT Manager</UserReferenceSystemId>
<UserUid>1152921504607134339</UserUid>
</LockHolderUserIdentity>
<LockHolders>
<PwsEntityLockSummary>
<EntityIdentity>
<EntityCode>P001468-001</EntityCode>
<EntityId i:nil="true"/>
<EntityUid>1152921504607429941</EntityUid>
<LockType>P</LockType>
</EntityIdentity>
<EntityLockSummary>
<PwsEntityLockSummaryItem>
<LockCount>1</LockCount>
| ||||||
| ||||||
|
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-17T16:05:06.4708496Z | |
Locks | PwsProjectorLock[1..100] | The complete set of information about the lock(s) |
Response Usage Example(s)
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body> <PwsCheckProjectorLocksResponse xmlns="http://projectorpsa.com/PwsProjectorServices/"> <PwsCheckProjectorLocksResult 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/"/> <LockHolderUserIdentity> <ResponseId xmlns="http://projectorpsa.com/CommonServices/">1</ResponseId> <UserDisplayName>IT Manager</UserDisplayName><Status xmlns="http://projectorpsa.com/CommonServices/">Ok</Status> <ServerTimestampUtc xmlns="http://projectorpsa.com/CommonServices/">2018-10-17T16:05:06.4708496Z</ServerTimestampUtc> <UserId i:nil="true"/<a:Locks xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/"> <b:PwsProjectorLock> <UserReferenceSystemId>IT Manager</UserReferenceSystemId> <b:EntityIdentity> <b:EntityCode>P001468-001</b:EntityCode> <UserUid>1152921504607134339</UserUid> <b:EntityId i:nil="true"/> </LockHolderUserIdentity> <b:EntityUid>1152921504607429941</b:EntityUid> <MostRecentLockAcquisitionTimestamp>2018-10-16T19:34:20.55Z</MostRecentLockAcquisitionTimestamp> <b:LockType i:nil="true"/> </PwsEntityLockSummaryItem> </b:EntityIdentity> <b:EntityTimestamp>AAAAABCI2CY=</EntityLockSummary>b:EntityTimestamp> </PwsEntityLockSummary><b:LockStolenFlag>false</b:LockStolenFlag> <<b:StolenLocks/LockHolders>> <LockTaker i:nil="true"/></b:PwsProjectorLock> </PwsFault>a:Locks> </detail>PwsCheckProjectorLocksResult> </s:Fault>PwsCheckProjectorLocksResponse> </s:Body> </s:Envelope> |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body> <PwsCheckProjectorLocksResponse xmlns="http://projectorpsa.com/PwsProjectorServices/"> <PwsCheckProjectorLocksResult 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-16T19:36:50.6646738Z</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 i:nil="true"/> </b:EntityIdentity> <b:EntityTimestamp>AAAAABCnqY8=</b:EntityTimestamp> <b:LockStolenFlag>true</b:LockStolenFlag> <b:StolenLocks> <b:PwsEntityLockSummaryItem> <b:LockCount>1</b:LockCount> <b:LockHolderUserIdentity> <b:UserDisplayName>IT Manager</b:UserDisplayName> <b:UserId i:nil="true"/> <b:UserReferenceSystemId>IT Manager</b:UserReferenceSystemId> <b:UserUid>1152921504607134339</b:UserUid> </b:LockHolderUserIdentity> <b:MostRecentLockAcquisitionTimestamp>2018-10-16T19:34:20.55Z</b:MostRecentLockAcquisitionTimestamp> </b:PwsEntityLockSummaryItem> </b:StolenLocks> </b:PwsProjectorLock> </a:Locks> </PwsCheckProjectorLocksResult> </PwsCheckProjectorLocksResponse> </s:Body> </s:Envelope> |
...
ErrorNumber | ErrorCode | ErrorText |
---|---|---|
10126 | InvalidEnumerationValueSpecified | An invalid value was specified for LockType. Valid values are E, C, P, R, RT, CP, CB, I. |
50024 | EntityNotFound | Entity (entity-reference-type) was not found. |
50469 | EntityAlreadyLocked | One or more existing locks prevent acquisition of requested lock. |