Workflow Name: amset10deletenode#

Constituent Services: AuthenticationService, RepositoryService, InitCreateContentWS, DateTimeWS#

Technical Notes#

Platform: GlassFishESB V2.1, NetBeans IDE 6.5 (including BPEL Designer, implementing WS-BPEL 2.0)
Java: 1.6.0_10; 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#

This is a copy of amset4 with appropriate changes in input XML (namespaces haven't been altered). This removes a node from the repository.

Input/Output#

Code snippet 10.1. Init web service SOAP request.

<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/amset5createcontent1/InitCreateContentWS" xmlns:ns="http://www.alfresco.org/ws/cml/1.0" xmlns:ns1="http://www.alfresco.org/ws/model/content/1.0">
  <soapenv:Body>
    <init:InitCreateContentWSOperation>
      <username>admin</username>
      <password>adminPassword</password>
      <updateRequest>
        <!--Zero or more repetitions:-->
        <ns:delete>
          <ns:where>
            <!--You have a CHOICE of the next 2 items at this level-->
            <!--Zero or more repetitions:-->
            <ns1:nodes>
              <!--Optional:-->
              <ns1:store>
                <!--Optional:-->
                <ns1:scheme>workspace</ns1:scheme>
                <!--Optional:-->
                <ns1:address>SpacesStore</ns1:address>
              </ns1:store>
              <!--Optional:-->
              <ns1:uuid>3212f8a8-6d10-4049-a6cc-d89dd2df1191</ns1:uuid>
              <!--Optional:-->
              <ns1:path></ns1:path>
            </ns1:nodes>
            <!--Optional:-->
            <ns1:store>
              <!--Optional:-->
              <ns1:scheme></ns1:scheme>
              <!--Optional:-->
              <ns1:address></ns1:address>
            </ns1:store>
            <!--Optional:-->
            <ns1:query>
              <ns1:language></ns1:language>
              <ns1:statement></ns1:statement>
            </ns1:query>
          </ns:where>
        </ns:delete>
      </updateRequest>
    </init:InitCreateContentWSOperation>
  </soapenv:Body>
</soapenv:Envelope>

Code snippet 10.2. RepositoryService.delete() SOAP request.

<?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-28T16:46:08.86+00:00</wsu:Created>
                <wsu:Expires>2009-08-28T16:50:08.00+00:00</wsu:Expires>
            </wsu:Timestamp>
            <UsernameToken>
                <Username>admin</Username>
                <Password Id="" Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">TICKET_4ae9d3814f3b55360953e583dc510dfd1a2ecff9</Password>
            </UsernameToken>
        </Security>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body>
        <update
            xmlns="http://www.alfresco.org/ws/service/repository/1.0" xmlns:msgns="http://www.alfresco.org/ws/service/repository/1.0">
            <ns0:statements
                xmlns:init="http://j2ee.netbeans.org/wsdl/amset5createcontent1/InitCreateContentWS"
                xmlns:msgns="http://j2ee.netbeans.org/wsdl/amset5createcontent1/InitCreateContentWS"
                xmlns:ns="http://www.alfresco.org/ws/cml/1.0"
                xmlns:ns0="http://www.alfresco.org/ws/service/repository/1.0" xmlns:ns1="http://www.alfresco.org/ws/model/content/1.0">
                <ns:delete>
                    <ns:where>
                        <ns1:nodes>
                            <ns1:store>
                                <ns1:scheme>workspace</ns1:scheme>
                                <ns1:address>SpacesStore</ns1:address>
                            </ns1:store>
                            <ns1:uuid>3212f8a8-6d10-4049-a6cc-d89dd2df1191</ns1:uuid>
                            <ns1:path/>
                        </ns1:nodes>
                        <ns1:store>
                            <ns1:scheme/>
                            <ns1:address/>
                        </ns1:store>
                        <ns1:query>
                            <ns1:language/>
                            <ns1:statement/>
                        </ns1:query>
                    </ns:where>
                </ns:delete>
            </ns0:statements>
        </update>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Code snippet 10.3. RepositoryService.delete() SOAP response.

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
        <updateResponse xmlns="http://www.alfresco.org/ws/service/repository/1.0">
            <updateReturn>
                <statement>delete</statement>
                <updateCount xsi:nil="true"/>
                <sourceId xsi:nil="true"/>
                <source>
                    <ns1:store xmlns:ns1="http://www.alfresco.org/ws/model/content/1.0">
                        <ns1:scheme>workspace</ns1:scheme>
                        <ns1:address>SpacesStore</ns1:address>
                    </ns1:store>
                    <ns2:uuid xmlns:ns2="http://www.alfresco.org/ws/model/content/1.0">3212f8a8-6d10-4049-a6cc-d89dd2df1191</ns2:uuid>
                </source>
                <destination xsi:nil="true"/>
            </updateReturn>
        </updateResponse>
    </soapenv:Body>
</soapenv:Envelope>

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-) was last changed on 06-Sep-2009 13:39 by clayton