Workflow Name: amset7writecontent2#

Constituent Services: AuthenticationService, ContentService, InitWriteContent2WS, 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.

Workflow Description#

This workflow uses the write operation of the ContentService to place content in the form of a byte array into a node (name: NodeForContentServiceWrite, uuid: e83a8ab8-3be7-4d03-be53-7de316a6b31b) that has been created using amset4.

Code snippet 7.1. ContentService.write() 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-24T14:50:50.81+00:00</wsu:Created>
                <wsu:Expires>2009-08-24T14:54:50.00+00:00</wsu:Expires>
            </wsu:Timestamp>
            <UsernameToken>
                <Username>admin</Username>
                <Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">TICKET_d111abd0911d854c96a22e2d7c13990c4ab3e6ed</Password>
            </UsernameToken>
        </Security>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body>
        <write 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/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">
            <con:node>
                <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/>
            </con:node>
            <con:property>{http://www.alfresco.org/model/content/1.0}content</con:property>
            <con:content>TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx5IGJ5IGhpcyByZWFzb24sIGJ1dCBieSB0aGlzIHNpbmd1bGFyIHBhc3Npb24gZnJvbSBvdGhlciBhbmltYWxzLCB3aGljaCBpcyBhIGx1c3Qgb2YgdGhlIG1pbmQsIHRoYXQgYnkgYSBwZXJzZXZlcmFuY2Ugb2YgZGVsaWdodCBpbiB0aGUgY29udGludWVkIGFuZCBpbmRlZmF0aWdhYmxlIGdlbmVyYXRpb24gb2Yga25vd2xlZGdlLCBleGNlZWRzIHRoZSBzaG9ydCB2ZWhlbWVuY2Ugb2YgYW55IGNhcm5hbCBwbGVhc3VyZS4=</con:content>
            <con:format>
                <ns:mimetype>text/plain</ns:mimetype>
                <ns:encoding>UTF-8</ns:encoding>
            </con:format>
        </write>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Code snippet 7.2. ContentService.write() 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>
        <writeResponse 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>269</length>
                <format>
                    <ns4:mimetype xmlns:ns4="http://www.alfresco.org/ws/model/content/1.0">text/plain</ns4:mimetype>
                    <ns5:encoding xmlns:ns5="http://www.alfresco.org/ws/model/content/1.0">UTF-8</ns5:encoding>
                </format>
                <url>http://FBS3PCW142.leeds.ac.uk:5050/alfresco/download/direct/workspace/SpacesStore/e83a8ab8-3be7-4d03-be53-7de316a6b31b/NodeForContentServiceWrite</url>
            </content>
        </writeResponse>
    </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:36 by clayton