PwsAcquireProjectorLocks

Overview


This web service acquires a lock for a specified entity, or a set of specified entities. It can also, optionally, steal the locks of any specified entities that are already locked at the time this service is run.

Request Format


PwsAcquireProjectorLocks Request

Request Elements


Element

Data Type

Required?

Description

Sample Data

RequestId

Int32

No

Click here for more information

1

SessionTicket

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 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.


ProjectorLockSetId

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)


Example 01 - Acquiring an Available Lock
<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:RequestId>1</req:RequestId>
            <req:SessionTicket>AYlq2lioh82F1PapkJ+Npg==</req:SessionTicket>
            <req:LockDurationSeconds>120</req:LockDurationSeconds>
            <req:Locks>
               <com: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>
Example 02 - Stealing a Lock
<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:RequestId>1</req:RequestId>
            <req:SessionTicket>AYlq2lioh82F1PapkJ+Npg==</req:SessionTicket>
            <req:LockDurationSeconds>120</req:LockDurationSeconds>
            <req:Locks>
               <com: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>
            <req:LocksToSteal>
               <com:PwsEntityLockSummary>
                  <com:EntityIdentity>
                     <com:EntityCode>P001468-001</com:EntityCode>
                     <com:EntityUid>1152921504607429941</com:EntityUid>
                     <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-16T13:59:12.903Z</com:MostRecentLockAcquisitionTimestamp>
                     </com:PwsEntityLockSummaryItem>
                  </com:EntityLockSummary>
               </com:PwsEntityLockSummary>
            </req:LocksToSteal>
         </pws:serviceRequest>
      </pws:PwsAcquireProjectorLocks>
   </soapenv:Body>
</soapenv:Envelope>

Response Format


PwsAcquireProjectorLocks Response


Response Elements


Element

Data Type

DescriptionSample Data

Messages

PwsMessage[]

The web service response status and message. Click here for more information

ResponseId

Int32

Click here for more information
1

Status

RequestStatus

Click here for more information
Ok

ServerTimestampUtc

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)

ProjectorLockSetId

Int32

Click here for more information

2602


Response Usage Example(s)


Example 01 - Acquiring an Available Lock
<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>
            <a:ProjectorLockSetId>2602</a:ProjectorLockSetId>
         </PwsAcquireProjectorLocksResult>
      </PwsAcquireProjectorLocksResponse>
   </s:Body>
</s:Envelope>
Example 02 - Stealing a Lock
<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-17T15:28:07.9156991Z</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>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-17T15:24:42.897Z</b:MostRecentLockAcquisitionTimestamp>
                     </b:PwsEntityLockSummaryItem>
                  </b:StolenLocks>
               </b:PwsProjectorLock>
            </a:Locks>
            <a:ProjectorLockSetId>2621</a:ProjectorLockSetId>
         </PwsAcquireProjectorLocksResult>
      </PwsAcquireProjectorLocksResponse>
   </s:Body>
</s:Envelope>


PwsAcquireProjectorLocks - Common Errors and Warnings

ErrorNumber

ErrorCode

ErrorText

10126InvalidEnumerationValueSpecifiedAn invalid value was specified for LockType. Valid values are E, C, P, R, RT, CP, CB, I.
50007ItemHasBeenUpdatedUnable to complete request -- another user changed the data while you were editing.
50469EntityAlreadyLockedOne or more existing locks prevent acquisition of requested lock.
50483InvalidLockDurationLock duration must between one second and one day.