Workflow Name: amset35read#

Constituent Services: AuthenticationService, ContentService, InitReadWS, 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 Final running on remote server, 64-bit Java 1.6.0_13, Tomcat 6 on Red Hat Enterprise Linux 5.

Workflow Description#

This workflow uses the read operation of the ContentService to obtain Content objects for a node or set of nodes. The example shown below uses a Lucene search to retrieve all the nodes in a discussion forum (see amsetf1 ).

Input/Output#

Code snippet 35.1. InitReadWS 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/amset35read/InitReadWS" xmlns:con="http://xml.netbeans.org/schema/content" xmlns:ns="http://www.alfresco.org/ws/model/content/1.0">
  <soapenv:Body>
    <init:InitReadWSOperation>
      <alfrescoAdminUsername>admin</alfrescoAdminUsername>
      <alfrescoAdminPassword>alfr3sc0</alfrescoAdminPassword>
      <part1>
        <con:read>
          <con:items>
            
            <ns:store>
              <ns:scheme>workspace</ns:scheme>
              <ns:address>SpacesStore</ns:address>
            </ns:store>
            <ns:query>
              <ns:language>lucene</ns:language>
              <ns:statement>PATH:"/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//*"</ns:statement>
            </ns:query>
          </con:items>
          <con:property>{http://www.alfresco.org/model/content/1.0}content</con:property>
          
        </con:read>
      </part1>
    </init:InitReadWSOperation>
  </soapenv:Body>
</soapenv:Envelope>

Code snippet 35.2. ContentService.read() 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-09-16T15:23:11.74+00:00</wsu:Created>
                <wsu:Expires>2009-09-16T15:27:11.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_94d78a589fdc58a5c50f5f65c9854ce5f02d56e9</Password>
                <Username>admin</Username>
            </UsernameToken>
        </Security>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body>
        <read xmlns="http://www.alfresco.org/ws/service/content/1.0"
            xmlns:con="http://xml.netbeans.org/schema/content"
            xmlns:init="http://j2ee.netbeans.org/wsdl/amset35read/InitReadWS"
            xmlns:msgns="http://j2ee.netbeans.org/wsdl/amset35read/InitReadWS"
            xmlns:ns="http://www.alfresco.org/ws/model/content/1.0" xmlns:ns0="http://www.alfresco.org/ws/service/content/1.0">
            <con:items>
                <ns:store>
                    <ns:scheme>workspace</ns:scheme>
                    <ns:address>SpacesStore</ns:address>
                </ns:store>
                <ns:query>
                    <ns:language>lucene</ns:language>
                    <ns:statement>PATH:"/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//*"</ns:statement>
                </ns:query>
            </con:items>
            <con:property>{http://www.alfresco.org/model/content/1.0}content</con:property>
        </read>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Code snippet 35.3. ContentService.read() 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>
        <readResponse 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">15980032-3cb3-4900-b6cf-11ac36bdfa5e</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/cm:Superheroes_x0020_today</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>
            <content>
                <node>
                    <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">aff1ba31-823d-43a7-ac65-aeaf18185466</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/cm:Superheroes_x0020_today/cm:posted-16-09-2009-08-15-49-7e02631b-30f6-497b-8f63-e5e80c87f25c.html</ns6:path>
                </node>
                <property>{http://www.alfresco.org/model/content/1.0}content</property>
                <length>39</length>
                <format>
                    <ns7:mimetype xmlns:ns7="http://www.alfresco.org/ws/model/content/1.0">text/html</ns7:mimetype>
                    <ns8:encoding xmlns:ns8="http://www.alfresco.org/ws/model/content/1.0">UTF-8</ns8:encoding>
                </format>
                <url>http://FBS3PCW142.leeds.ac.uk:5050/alfresco/download/direct/workspace/SpacesStore/aff1ba31-823d-43a7-ac65-aeaf18185466/posted-16-09-2009-08-15-49-7e02631b-30f6-497b-8f63-e5e80c87f25c.html</url>
            </content>
            <content>
                <node>
                    <ns9:store xmlns:ns9="http://www.alfresco.org/ws/model/content/1.0">
                        <ns9:scheme>workspace</ns9:scheme>
                        <ns9:address>SpacesStore</ns9:address>
                    </ns9:store>
                    <ns10:uuid xmlns:ns10="http://www.alfresco.org/ws/model/content/1.0">557a4c66-0266-49fa-8829-acb8d4ed5931</ns10:uuid>
                    <ns11:path xmlns:ns11="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/cm:Superheroes_x0020_today/cm:posted-16-09-2009-08-34-27-bd83db1c-f547-4aa2-b5fc-cb6d4cc39e04.html</ns11:path>
                </node>
                <property>{http://www.alfresco.org/model/content/1.0}content</property>
                <length>67</length>
                <format>
                    <ns12:mimetype xmlns:ns12="http://www.alfresco.org/ws/model/content/1.0">text/html</ns12:mimetype>
                    <ns13:encoding xmlns:ns13="http://www.alfresco.org/ws/model/content/1.0">UTF-8</ns13:encoding>
                </format>
                <url>http://FBS3PCW142.leeds.ac.uk:5050/alfresco/download/direct/workspace/SpacesStore/557a4c66-0266-49fa-8829-acb8d4ed5931/posted-16-09-2009-08-34-27-bd83db1c-f547-4aa2-b5fc-cb6d4cc39e04.html</url>
            </content>
            <content>
                <node>
                    <ns14:store xmlns:ns14="http://www.alfresco.org/ws/model/content/1.0">
                        <ns14:scheme>workspace</ns14:scheme>
                        <ns14:address>SpacesStore</ns14:address>
                    </ns14:store>
                    <ns15:uuid xmlns:ns15="http://www.alfresco.org/ws/model/content/1.0">ad47d337-8c1f-4a38-86f3-cd42e2cb7b74</ns15:uuid>
                    <ns16:path xmlns:ns16="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/cm:Superheroes_x0020_today/cm:posted-16-09-2009-08-37-00-64fee98a-053d-4f5d-8cc0-19670217c74c.html</ns16:path>
                </node>
                <property>{http://www.alfresco.org/model/content/1.0}content</property>
                <length>47</length>
                <format>
                    <ns17:mimetype xmlns:ns17="http://www.alfresco.org/ws/model/content/1.0">text/html</ns17:mimetype>
                    <ns18:encoding xmlns:ns18="http://www.alfresco.org/ws/model/content/1.0">UTF-8</ns18:encoding>
                </format>
                <url>http://FBS3PCW142.leeds.ac.uk:5050/alfresco/download/direct/workspace/SpacesStore/ad47d337-8c1f-4a38-86f3-cd42e2cb7b74/posted-16-09-2009-08-37-00-64fee98a-053d-4f5d-8cc0-19670217c74c.html</url>
            </content>
            <content>
                <node>
                    <ns19:store xmlns:ns19="http://www.alfresco.org/ws/model/content/1.0">
                        <ns19:scheme>workspace</ns19:scheme>
                        <ns19:address>SpacesStore</ns19:address>
                    </ns19:store>
                    <ns20:uuid xmlns:ns20="http://www.alfresco.org/ws/model/content/1.0">c2a9089e-bcd9-49a1-bb03-4d670c3ecbae</ns20:uuid>
                    <ns21:path xmlns:ns21="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/cm:Aliens_x0020_or_x0020_mutants_x0020_-_x0020_society_x0027_s_x0020_preference</ns21: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>
            <content>
                <node>
                    <ns22:store xmlns:ns22="http://www.alfresco.org/ws/model/content/1.0">
                        <ns22:scheme>workspace</ns22:scheme>
                        <ns22:address>SpacesStore</ns22:address>
                    </ns22:store>
                    <ns23:uuid xmlns:ns23="http://www.alfresco.org/ws/model/content/1.0">1c936675-994b-49bd-a1df-0f3d5f409b34</ns23:uuid>
                    <ns24:path xmlns:ns24="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/cm:Aliens_x0020_or_x0020_mutants_x0020_-_x0020_society_x0027_s_x0020_preference/cm:posted-16-09-2009-08-49-01-9b24e781-5ee5-4a52-a2f5-ead40a1969e5.html</ns24:path>
                </node>
                <property>{http://www.alfresco.org/model/content/1.0}content</property>
                <length>85</length>
                <format>
                    <ns25:mimetype xmlns:ns25="http://www.alfresco.org/ws/model/content/1.0">text/html</ns25:mimetype>
                    <ns26:encoding xmlns:ns26="http://www.alfresco.org/ws/model/content/1.0">UTF-8</ns26:encoding>
                </format>
                <url>http://FBS3PCW142.leeds.ac.uk:5050/alfresco/download/direct/workspace/SpacesStore/1c936675-994b-49bd-a1df-0f3d5f409b34/posted-16-09-2009-08-49-01-9b24e781-5ee5-4a52-a2f5-ead40a1969e5.html</url>
            </content>
            <content>
                <node>
                    <ns27:store xmlns:ns27="http://www.alfresco.org/ws/model/content/1.0">
                        <ns27:scheme>workspace</ns27:scheme>
                        <ns27:address>SpacesStore</ns27:address>
                    </ns27:store>
                    <ns28:uuid xmlns:ns28="http://www.alfresco.org/ws/model/content/1.0">ee22b905-0ceb-4e80-879b-01c20aac20af</ns28:uuid>
                    <ns29:path xmlns:ns29="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/cm:Aliens_x0020_or_x0020_mutants_x0020_-_x0020_society_x0027_s_x0020_preference/cm:posted-16-09-2009-08-50-52-9e6f1ae9-b6cd-4438-bc60-11b6623dd815.html</ns29:path>
                </node>
                <property>{http://www.alfresco.org/model/content/1.0}content</property>
                <length>32</length>
                <format>
                    <ns30:mimetype xmlns:ns30="http://www.alfresco.org/ws/model/content/1.0">text/html</ns30:mimetype>
                    <ns31:encoding xmlns:ns31="http://www.alfresco.org/ws/model/content/1.0">UTF-8</ns31:encoding>
                </format>
                <url>http://FBS3PCW142.leeds.ac.uk:5050/alfresco/download/direct/workspace/SpacesStore/ee22b905-0ceb-4e80-879b-01c20aac20af/posted-16-09-2009-08-50-52-9e6f1ae9-b6cd-4438-bc60-11b6623dd815.html</url>
            </content>
            <content>
                <node>
                    <ns32:store xmlns:ns32="http://www.alfresco.org/ws/model/content/1.0">
                        <ns32:scheme>workspace</ns32:scheme>
                        <ns32:address>SpacesStore</ns32:address>
                    </ns32:store>
                    <ns33:uuid xmlns:ns33="http://www.alfresco.org/ws/model/content/1.0">cc3d0894-b064-487c-aa9f-def9bb39681e</ns33:uuid>
                    <ns34:path xmlns:ns34="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/cm:Aliens_x0020_or_x0020_mutants_x0020_-_x0020_society_x0027_s_x0020_preference/cm:posted-16-09-2009-08-58-34-1047ff28-e820-4604-b77e-9f48dbf09ba9.html</ns34:path>
                </node>
                <property>{http://www.alfresco.org/model/content/1.0}content</property>
                <length>54</length>
                <format>
                    <ns35:mimetype xmlns:ns35="http://www.alfresco.org/ws/model/content/1.0">text/html</ns35:mimetype>
                    <ns36:encoding xmlns:ns36="http://www.alfresco.org/ws/model/content/1.0">UTF-8</ns36:encoding>
                </format>
                <url>http://FBS3PCW142.leeds.ac.uk:5050/alfresco/download/direct/workspace/SpacesStore/cc3d0894-b064-487c-aa9f-def9bb39681e/posted-16-09-2009-08-58-34-1047ff28-e820-4604-b77e-9f48dbf09ba9.html</url>
            </content>
        </readResponse>
    </soapenv:Body>
</soapenv:Envelope>

Add new attachment

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