!Workflow Name: amset20removeaces

!Constituent Services: AuthenticationService, AccessControlService, InitRemoveACEsWS, DateTimeWS

!Technical Notes

Platform: GlassFishESB V2.1, NetBeans IDE 6.5.1 (including BPEL Designer, implementing WS-BPEL 2.0)\\
Java: 1.6.0_12; Java HotSpot(TM) Client VM 11.0-b15\\
System: Windows XP version 5.1 running on x86; Cp1252; en_GB (nb).
\\

Alfresco Labs 3.1 Final running on remote server, 64-bit Java 1.6.0_13, Tomcat 6 on Red Hat Enterprise Linux 5.


!Workflow Description

What the service giveth, the service taketh away. {{amset19}} added an ACE that gave {{flash}} {{Editor}} rights on a folder and {{AccessControlService.removeACEs()}} is used here to remove it.  As before, the resultant ACLs for the targetted nodes are returned. Note that in the ACL in snippet 20.3 the {{flash}} ACE is no longer present.

!Input/Output 

__Code snippet 20.1.  InitRemoveACEsWS SOAP request.__


%%prettify 
{{{
<soapenv:Envelope xsi:schemaLocation="http://schemas.xmlsoap.org/soap/envelope/ http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:init="http://j2ee.netbeans.org/wsdl/amset20removeaces/InitRemoveACEsWS" xmlns:acc="http://xml.netbeans.org/schema/accesscontrol" xmlns:ns="http://www.alfresco.org/ws/model/content/1.0">
  <soapenv:Body>
    <init:InitRemoveACEsWSOperation>
      <alfrescoAdminUsername>admin</alfrescoAdminUsername>
      <alfrescoAdminPassword>adminPassword</alfrescoAdminPassword>
      <part1>
        <acc:removeACEs>
          <acc:predicate>
            <ns:nodes>
              <ns:store>
                <ns:scheme>workspace</ns:scheme>
                <ns:address>SpacesStore</ns:address>
              </ns:store>
              <ns:uuid>a390583c-1704-4fb5-955f-826d5a9f8563</ns:uuid>
              <ns:path></ns:path>
            </ns:nodes>
            <ns:store>
              <ns:scheme></ns:scheme>
              <ns:address></ns:address>
            </ns:store>
            <ns:query>
              <ns:language></ns:language>
              <ns:statement></ns:statement>
            </ns:query>
          </acc:predicate>
          <acc:aces>
            <acc:authority>flash</acc:authority>
            <acc:permission>Editor</acc:permission>
            <acc:accessStatus>acepted</acc:accessStatus>
          </acc:aces>
        </acc:removeACEs>
      </part1>
    </init:InitRemoveACEsWSOperation>
  </soapenv:Body>
</soapenv:Envelope>
}}}
/%


__Code snippet 20.2.  AccessControlService.removeACEs() SOAP request.__

%%prettify 
{{{
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Header>
        <Security xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
            <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
                <wsu:Created>2009-08-31T17:16:47.27+00:00</wsu:Created>
                <wsu:Expires>2009-08-31T17:20:47.00+00:00</wsu:Expires>
            </wsu:Timestamp>
            <UsernameToken>
                <Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">TICKET_ff04e4feb3b5fa516d9c4dcb1aeaeace19b23a35</Password>
                <Username>admin</Username>
            </UsernameToken>
        </Security>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body>
        <removeACEs
            xmlns="http://www.alfresco.org/ws/service/accesscontrol/1.0"
            xmlns:acc="http://xml.netbeans.org/schema/accesscontrol"
            xmlns:init="http://j2ee.netbeans.org/wsdl/amset20removeaces/InitRemoveACEsWS"
            xmlns:msgns="http://j2ee.netbeans.org/wsdl/amset20removeaces/InitRemoveACEsWS"
            xmlns:ns="http://www.alfresco.org/ws/model/content/1.0" xmlns:ns0="http://www.alfresco.org/ws/service/accesscontrol/1.0">
            <acc:predicate>
                <ns:nodes>
                    <ns:store>
                        <ns:scheme>workspace</ns:scheme>
                        <ns:address>SpacesStore</ns:address>
                    </ns:store>
                    <ns:uuid>a390583c-1704-4fb5-955f-826d5a9f8563</ns:uuid>
                    <ns:path/>
                </ns:nodes>
                <ns:store>
                    <ns:scheme/>
                    <ns:address/>
                </ns:store>
                <ns:query>
                    <ns:language/>
                    <ns:statement/>
                </ns:query>
            </acc:predicate>
            <acc:aces>
                <acc:authority>flash</acc:authority>
                <acc:permission>Editor</acc:permission>
                <acc:accessStatus>acepted</acc:accessStatus>
            </acc:aces>
        </removeACEs>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

}}}
/%