Workflow Name: amset11movenode#

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 moves a node from one folder to another.

Input/Output#

Code snippet 11.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>
        <ns:move>
          <!--You have a CHOICE of the next 2 items at this level-->
          <!--Optional:-->
          <ns:to>
            <!--Optional:-->
            <ns1:store>
              <!--Optional:-->
              <ns1:scheme>workspace</ns1:scheme>
              <!--Optional:-->
              <ns1:address>SpacesStore</ns1:address>
            </ns1:store>
            <!--Optional:-->
            <ns1:uuid>d8016a51-7df8-4fdb-aee7-64977dbfc6a3</ns1:uuid>
            <!--Optional:-->
            <ns1:path></ns1:path>
            <!--Optional:-->
            <ns1:associationType>{http://www.alfresco.org/model/content/1.0}contains</ns1:associationType>
            <!--Optional:-->
            <ns1:childName>{http://www.alfresco.org/model/content/1.0}contains</ns1:childName>
          </ns:to>
          
          <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>471d4bc3-5285-4f9e-9bab-f923943a76e0</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>
          <!--Optional:-->
          <ns:where_id></ns:where_id>
        </ns:move>
      </updateRequest>
    </init:InitCreateContentWSOperation>
  </soapenv:Body>
</soapenv:Envelope>

Code snippet 11.2. RepsoitoryService.move() 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-28T17:12:59.99+00:00</wsu:Created>
                <wsu:Expires>2009-08-28T17:16:59.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_4760d96fb69ac6d53bee16cf7115f2ed7ee65c45</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:move>
                    <ns:to>
                        <ns1:store>
                            <ns1:scheme>workspace</ns1:scheme>
                            <ns1:address>SpacesStore</ns1:address>
                        </ns1:store>
                        <ns1:uuid>d8016a51-7df8-4fdb-aee7-64977dbfc6a3</ns1:uuid>
                        <ns1:path/>
                        <ns1:associationType>{http://www.alfresco.org/model/content/1.0}contains</ns1:associationType>
                        <ns1:childName>{http://www.alfresco.org/model/content/1.0}contains</ns1:childName>
                    </ns:to>
                    <ns:where>
                        <ns1:nodes>
                            <ns1:store>
                                <ns1:scheme>workspace</ns1:scheme>
                                <ns1:address>SpacesStore</ns1:address>
                            </ns1:store>
                            <ns1:uuid>471d4bc3-5285-4f9e-9bab-f923943a76e0</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:where_id/>
                </ns:move>
            </ns0:statements>
        </update>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Code snippet 11.3. RepositoryService.move() 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>move</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">471d4bc3-5285-4f9e-9bab-f923943a76e0</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/cm:contains</ns3:path>
                </source>
                <destination>
                    <ns4:store xmlns:ns4="http://www.alfresco.org/ws/model/content/1.0">
                        <ns4:scheme>workspace</ns4:scheme>
                        <ns4:address>SpacesStore</ns4:address>
                    </ns4:store>
                    <ns5:uuid xmlns:ns5="http://www.alfresco.org/ws/model/content/1.0">471d4bc3-5285-4f9e-9bab-f923943a76e0</ns5:uuid>
                    <ns6:path xmlns:ns6="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/cm:contains</ns6:path>
                </destination>
            </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