Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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


Panel

...

titlePwsAcquireProjectorLocks Request

...

code
<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>
  • PwsAcquireProjectorLocks
    languagexml
    titleExample 01 - Acquiring an Available Lock
    collapsetrue

    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)


    Code Block
    languagexml
    titleExample 01 - Acquiring an Available Lock
    collapsetrue
    <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>
               <com <req:EntityUid>1152921504607429941<RequestId>1</comreq:EntityUid>RequestId>
                <req:SessionTicket>AYlq2lioh82F1PapkJ+Npg==</req:SessionTicket>
              <com  <req:LockType>P<LockDurationSeconds>120</comreq:LockType>LockDurationSeconds>
                <req:Locks>
         </com:EntityIdentity>          <com:PwsProjectorLockRequest>
         </com:PwsProjectorLockRequest>             </req:Locks><com:EntityIdentity>
              </pws:serviceRequest>       </pws:PwsAcquireProjectorLocks>    <com:EntityCode>P001468-001</com:EntityCode>
                         <<com:EntityUid>1152921504607429941</soapenv:Body>
    </soapenv:Envelope>
    Code Block
    languagexml
    titleExample 02 - Stealing a Lock
    collapsetrue
    <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>com:EntityUid>
                         <com:LockType>P</com:LockType>
                    <pws:PwsAcquireProjectorLocks>  </com:EntityIdentity>
           <pws:serviceRequest>             <req:RequestId>1</req:RequestId></com:PwsProjectorLockRequest>
                <req:SessionTicket>AYlq2lioh82F1PapkJ+Npg==</req:SessionTicket>Locks>
                <req:LockDurationSeconds>120</req:LockDurationSeconds></pws:serviceRequest>
          </pws:PwsAcquireProjectorLocks>
         <req:Locks>
                   <com:PwsProjectorLockRequest>
                      <com:EntityIdentity>
        </soapenv:Body>
    </soapenv:Envelope>


    Code Block
    languagexml
    titleExample 02 - Stealing a Lock
    collapsetrue
    <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>
             <com:EntityCode>P001468-001</com:EntityCode><pws:serviceRequest>
                <req:RequestId>1</req:RequestId>
                <com:EntityUid>1152921504607429941</com:EntityUid><req:SessionTicket>AYlq2lioh82F1PapkJ+Npg==</req:SessionTicket>
                <req:LockDurationSeconds>120</req:LockDurationSeconds>
             <com:LockType>P</com:LockType>   <req:Locks>
                   </com:EntityIdentity><com:PwsProjectorLockRequest>
                      </com:PwsProjectorLockRequest><com:EntityIdentity>
                  </req:Locks>       <com:EntityCode>P001468-001</com:EntityCode>
         <req:LocksToSteal>                <com:PwsEntityLockSummary>EntityUid>1152921504607429941</com:EntityUid>
                      <com:EntityIdentity>   <com:LockType>P</com:LockType>
                      <com:EntityCode>P001468-001<</com:EntityCode>EntityIdentity>
                   </com:PwsProjectorLockRequest>
          <com:EntityUid>1152921504607429941</com:EntityUid>      </req:Locks>
                   <com:LockType>P</com:LockType><req:LocksToSteal>
                      </com:EntityIdentity><com:PwsEntityLockSummary>
                      <com:EntityLockSummary>EntityIdentity>
                         <com:PwsEntityLockSummaryItem>
    :EntityCode>P001468-001</com:EntityCode>
                           <com:LockCount>1<EntityUid>1152921504607429941</com:LockCount>
      EntityUid>
                         <com:LockHolderUserIdentity>LockType>P</com:LockType>
                        </com:EntityIdentity>
            <com:UserDisplayName>IT Manager</com:UserDisplayName>         <com:EntityLockSummary>
                         <com:UserReferenceSystemId>ITPwsEntityLockSummaryItem>
    Manager</com:UserReferenceSystemId>                         <<com:LockCount>1</com:LockHolderUserIdentity>LockCount>
                            <com:MostRecentLockAcquisitionTimestamp>2018-10-16T13:59:12.903Z</com:MostRecentLockAcquisitionTimestamp>LockHolderUserIdentity>
                         </com:PwsEntityLockSummaryItem>         <com:UserDisplayName>IT Manager</com:UserDisplayName>
                </com:EntityLockSummary>               <com:UserReferenceSystemId>IT <Manager</com:PwsEntityLockSummary>UserReferenceSystemId>
                            </req:LocksToSteal>com:LockHolderUserIdentity>
                </pws:serviceRequest>       </pws:PwsAcquireProjectorLocks>    </soapenv:Body>
    </soapenv:Envelope>

    Response Format

    Response Elements

    Response Usage Example(s)

    Code Block
    languagexml
    titleExample 01 - Acquiring an Available Lock
    collapsetrue
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
       <s:Body> <com:MostRecentLockAcquisitionTimestamp>2018-10-16T13:59:12.903Z</com:MostRecentLockAcquisitionTimestamp>
                        <PwsAcquireProjectorLocksResponse xmlns="http://projectorpsa.com/PwsProjectorServices/"> </com:PwsEntityLockSummaryItem>
                     <PwsAcquireProjectorLocksResult xmlns:a="http://projectorpsa.com/DataContracts/Responses/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> </com:EntityLockSummary>
                  <Messages xmlns="http://projectorpsa.com/CommonServices/" xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/"/> </com:PwsEntityLockSummary>
                <ResponseId xmlns="http://projectorpsa.com/CommonServices/">1</ResponseId></req:LocksToSteal>
                <Status xmlns="http://projectorpsa.com/CommonServices/">Ok</Status></pws:serviceRequest>
          </pws:PwsAcquireProjectorLocks>
         <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>
       </soapenv:Body>
    </soapenv:Envelope>

    Response Format


    Panel
    titlePwsAcquireProjectorLocks 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)


    Code Block
    languagexml
    titleExample 01 - Acquiring an Available Lock
    collapsetrue
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
       <s:Body>
            </a:Locks><PwsAcquireProjectorLocksResponse xmlns="http://projectorpsa.com/PwsProjectorServices/">
             <PwsAcquireProjectorLocksResult   <a:ProjectorLockSetId>2602</a:ProjectorLockSetId>xmlns:a="http://projectorpsa.com/DataContracts/Responses/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
             </PwsAcquireProjectorLocksResult>       </PwsAcquireProjectorLocksResponse>
       </s:Body>
    </s:Envelope>
    Code Block
    languagexml
    titleExample 02 - Stealing a Lock
    collapsetrue
    <s:Envelope xmlns:s<Messages xmlns="http://projectorpsa.com/CommonServices/" xmlns:b="http://schemas.xmlsoap.org/soap/envelope/"projectorpsa.com/DataContracts/Shared/Common/"/>
       <s:Body>       <s:Fault>          <faultcode>s:Client</faultcode>
         <ResponseId xmlns="http://projectorpsa.com/CommonServices/">1</ResponseId>
       <faultstring xml:lang="en-US">The creator of this fault did not specify a Reason.</faultstring><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">>
                   <b:PwsProjectorLock>
             <Messages>         <b:EntityIdentity>
             <PwsMessage>            <b:EntityCode>P001468-001</b:EntityCode>
             <AdditionalErrorText>Error 50469: EntityAlreadyLocked</AdditionalErrorText>          <b:EntityId i:nil="true"/>
              <ErrorCode>EntityAlreadyLocked</ErrorCode>           <b:EntityUid>1152921504607429941</b:EntityUid>
              <ErrorNumber>50469</ErrorNumber>           <b:LockType>P</b:LockType>
              <ErrorText>One or more existing locks prevent acquisition of requested lock.</ErrorText>
         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/>
                      </PwsMessage>b:PwsProjectorLock>
                </a:Locks>
      </Messages>          <a:ProjectorLockSetId>2602</a:ProjectorLockSetId>
         <ResponseId>1</ResponseId>    </PwsAcquireProjectorLocksResult>
          </PwsAcquireProjectorLocksResponse>
       </s:Body>
    <ServiceName>PwsAcquireProjectorLocksRs</ServiceName>
      </s:Envelope>


    Code Block
    languagexml
    titleExample 02 - Stealing a Lock
    collapsetrue
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
       <s:Body>
          <PwsAcquireProjectorLocksResponse  <LockHolderUserIdentity>xmlns="http://projectorpsa.com/PwsProjectorServices/">
             <PwsAcquireProjectorLocksResult          <UserDisplayName>IT Manager</UserDisplayName>xmlns:a="http://projectorpsa.com/DataContracts/Responses/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
                <Messages      <UserId i:nil="true"/>
       xmlns="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

    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.

    ...