Workflow Name: amset8clearcontent#

Constituent Services: AuthenticationService, ContentService, InitClearContentWS, DateTimeWS#

Technical Notes#

Platform: GlassFishESB V2.1, NetBeans IDE 6.5.1 (Build 200905151554)
Java: 1.6.0_12; Java HotSpot(TM) Client VM 11.2-b01
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.

Note that this workflow was created by modifying a copy of amset7. I haven't taken the trouble to change the namespaces and variable names, most of which still refer to amset7. Practically it makes no difference, but it's about 30 minutes work to clean things up.

Workflow Description#

This workflow uses the clear operation of the ContentService to remove content from a node (name: NodeForContentServiceWrite, uuid: e83a8ab8-3be7-4d03-be53-7de316a6b31b) that has been created using amset4.

Note that this does not delete the node, only the content.

Code snippet 8.1. ContentService.clear() 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-25T20:30:38.35+00:00</wsu:Created>
                <wsu:Expires>2009-08-25T20:34:38.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_2647ad26b9e3ac940aabb1f50be4cfb0a7f1413d</Password>
                <Username>admin</Username>
            </UsernameToken>
        </Security>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body>
        <clear xmlns="http://www.alfresco.org/ws/service/content/1.0" xmlns:msgns="http://www.alfresco.org/ws/service/content/1.0">
            <ns0:items
                xmlns:con="http://xml.netbeans.org/schema/content"
                xmlns:init="http://j2ee.netbeans.org/wsdl/amset7writecontent2/InitWriteContent2WS"
                xmlns:msgns="http://j2ee.netbeans.org/wsdl/amset7writecontent2/InitWriteContent2WS"
                xmlns:ns="http://www.alfresco.org/ws/model/content/1.0" xmlns:ns0="http://www.alfresco.org/ws/service/content/1.0">
                <ns:nodes>
                    <ns:store>
                        <ns:scheme>workspace</ns:scheme>
                        <ns:address>SpacesStore</ns:address>
                    </ns:store>
                    <ns:uuid>e83a8ab8-3be7-4d03-be53-7de316a6b31b</ns:uuid>
                    <ns:path/>
                </ns:nodes>
                <ns:store>
                    <ns:scheme/>
                    <ns:address/>
                </ns:store>
                <ns:query>
                    <ns:language/>
                    <ns:statement/>
                </ns:query>
            </ns0:items>
            <msgns:property>{http://www.alfresco.org/model/content/1.0}content</msgns:property>
        </clear>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Code snippet 8.2. ContentService.clear() 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>
        <clearResponse xmlns="http://www.alfresco.org/ws/service/content/1.0">
            <content>
                <node>
                    <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">e83a8ab8-3be7-4d03-be53-7de316a6b31b</ns2:uuid>
                    <ns3:path xmlns:ns3="http://www.alfresco.org/ws/model/content/1.0">/app:company_home/cm:Waffle_x0020_Bus_x0020_Workflows/cm:What_x0020_is_x0020_the_x0020_Protein_x0020_Folding_x0020_Problem/cm:contains</ns3:path>
                </node>
                <property>{http://www.alfresco.org/model/content/1.0}content</property>
                <length>0</length>
                <format xsi:nil="true"/>
                <url xsi:nil="true"/>
            </content>
        </clearResponse>
    </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:37 by clayton