Example 4: Deploy a SCORM content

In this case, the CID server is an e-learning platform which accepts SCORM packages. The deployment of SCORM packages needs the intervention of a user in order to fill some platform-specific information and to then deploy the package in a pedagogical activity.

Server manifest

num. | Line | text | copy |
CTRL+C to copy, CTRL-V to paste
1
<?xml version="1.0" encoding="UTF-8"?>
2
<cid:manifest xmlns:cid="http://www.cid-protocol/schema/v1/core" xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.cid-protocol/schema/v1/core ../manifest/cid-core.xsd ">
3
    <!-- 
4
        This manifest declares two transports : the first without cookies, the 
5
        second with. Two processes are also defined. They are respectively binded 
6
        to the two different webtransports.
7
    -->
8
9
    <!-- 
10
        This process is binded to standard Transport. It uses a session property to
11
        enable statefull servers.
12
    -->
13
    <cid:process transports="standardTransport" is="http://schema.org/SendAction">
14
        <cid:label xml:lang="en">SCORM deployment</cid:label>
15
16
        <!-- 
17
            A restriction is similar to a meta with the difference that the 
18
            restriction is implicit in the process. The value is unique and set only
19
            once in the manifest and never sent by the client.
20
        -->
21
        <cid:restriction name="Zip-file-names-encoding" value="UTF-8">
22
            <cid:label xml:lang="en">Encoding of the files-name</cid:label>
23
        </cid:restriction>
24
25
        <!-- Definition of custom mimeType -->
26
        <cid:meta name="Content-type" is="http://purl.org/dc/elements/1.1/type">
27
            <cid:value>application/xx-scorm;v1.2</cid:value>
28
            <cid:value>application/xx-scorm;v2004</cid:value>
29
        </cid:meta>
30
31
        <cid:upload url="http://example.com/upload?response=noCookies" needMetas="Content-type" required="true"/>
32
        <cid:interact url="http://example.com/interact?response=noCookies" required="true"/>
33
    </cid:process>
34
35
    <!-- 
36
            This process is binded to the second transport. It needs a client which 
37
            supports cookies 
38
        -->
39
    <cid:process transports="transportWithCookies" is="http://schema.org/SendAction">
40
        <cid:restriction name="Zip-file-names-encoding" value="UTF-8"/>
41
42
        <!-- Definition of custom mimeType -->
43
        <cid:meta name="Content-type" is="http://purl.org/dc/elements/1.1/type">
44
            <cid:value>application/xx-scorm;v1.2</cid:value>
45
            <cid:value>application/xx-scorm;v2004</cid:value>
46
        </cid:meta>
47
48
        <cid:upload url="http://example.com/upload?response=withCookies" needMetas="Content-type" required="true"/>
49
        <cid:interact url="http://example.com/interact?response=withCookies" required="true"/>
50
    </cid:process>
51
52
    <cid:transports>
53
        <cid:webTransport id="standardTransport">
54
            <cid:authentications>
55
                <cid:basicHttp/>
56
            </cid:authentications>
57
            <cid:webInteract>
58
                <cid:request method="GET" properties="header queryString"/>
59
                <cid:request method="POST;application/x-www-form-urlencoded" properties="queryString header post"/>
60
                <cid:request method="POST;multipart/form-data" properties="header queryString post"/>
61
            </cid:webInteract>
62
63
            <cid:webUpload>
64
                <cid:request method="GET" properties="header queryString"/>
65
                <cid:request method="POST" properties="queryString header"/>
66
                <cid:request method="POST;multipart/form-data" properties="header queryString post"/>
67
            </cid:webUpload>
68
        </cid:webTransport>
69
70
        <cid:webTransport id="transportWithCookies" needCookies="true">
71
            <cid:authentications>
72
                <cid:basicHttp/>
73
            </cid:authentications>
74
            <cid:webInteract>
75
                <cid:request method="GET" properties="header queryString"/>
76
                <cid:request method="POST;application/x-www-form-urlencoded" properties="queryString header post"/>
77
                <cid:request method="POST;multipart/form-data" properties="header queryString post"/>
78
            </cid:webInteract>
79
80
            <cid:webUpload>
81
                <cid:request method="GET" properties="header queryString"/>
82
                <cid:request method="PUT" properties="header queryString"/>
83
                <cid:request method="POST" properties="queryString header"/>
84
                <cid:request method="POST;multipart/form-data" properties="header queryString post"/>
85
            </cid:webUpload>
86
        </cid:webTransport>
87
    </cid:transports>
88
</cid:manifest>
<?xml version="1.0" encoding="UTF-8"?>
<cid:manifest xmlns:cid="http://www.cid-protocol/schema/v1/core" xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.cid-protocol/schema/v1/core ../manifest/cid-core.xsd ">
    <!-- 
        This manifest declares two transports : the first without cookies, the 
        second with. Two processes are also defined. They are respectively binded 
        to the two different webtransports.
    -->

    <!-- 
        This process is binded to standard Transport. It uses a session property to
        enable statefull servers.
    -->
    <cid:process transports="standardTransport" is="http://schema.org/SendAction">
        <cid:label xml:lang="en">SCORM deployment</cid:label>

        <!-- 
            A restriction is similar to a meta with the difference that the 
            restriction is implicit in the process. The value is unique and set only
            once in the manifest and never sent by the client.
        -->
        <cid:restriction name="Zip-file-names-encoding" value="UTF-8">
            <cid:label xml:lang="en">Encoding of the files-name</cid:label>
        </cid:restriction>

        <!-- Definition of custom mimeType -->
        <cid:meta name="Content-type" is="http://purl.org/dc/elements/1.1/type">
            <cid:value>application/xx-scorm;v1.2</cid:value>
            <cid:value>application/xx-scorm;v2004</cid:value>
        </cid:meta>

        <cid:upload url="http://example.com/upload?response=noCookies" needMetas="Content-type" required="true"/>
        <cid:interact url="http://example.com/interact?response=noCookies" required="true"/>
    </cid:process>

    <!-- 
            This process is binded to the second transport. It needs a client which 
            supports cookies 
        -->
    <cid:process transports="transportWithCookies" is="http://schema.org/SendAction">
        <cid:restriction name="Zip-file-names-encoding" value="UTF-8"/>

        <!-- Definition of custom mimeType -->
        <cid:meta name="Content-type" is="http://purl.org/dc/elements/1.1/type">
            <cid:value>application/xx-scorm;v1.2</cid:value>
            <cid:value>application/xx-scorm;v2004</cid:value>
        </cid:meta>

        <cid:upload url="http://example.com/upload?response=withCookies" needMetas="Content-type" required="true"/>
        <cid:interact url="http://example.com/interact?response=withCookies" required="true"/>
    </cid:process>

    <cid:transports>
        <cid:webTransport id="standardTransport">
            <cid:authentications>
                <cid:basicHttp/>
            </cid:authentications>
            <cid:webInteract>
                <cid:request method="GET" properties="header queryString"/>
                <cid:request method="POST;application/x-www-form-urlencoded" properties="queryString header post"/>
                <cid:request method="POST;multipart/form-data" properties="header queryString post"/>
            </cid:webInteract>

            <cid:webUpload>
                <cid:request method="GET" properties="header queryString"/>
                <cid:request method="POST" properties="queryString header"/>
                <cid:request method="POST;multipart/form-data" properties="header queryString post"/>
            </cid:webUpload>
        </cid:webTransport>

        <cid:webTransport id="transportWithCookies" needCookies="true">
            <cid:authentications>
                <cid:basicHttp/>
            </cid:authentications>
            <cid:webInteract>
                <cid:request method="GET" properties="header queryString"/>
                <cid:request method="POST;application/x-www-form-urlencoded" properties="queryString header post"/>
                <cid:request method="POST;multipart/form-data" properties="header queryString post"/>
            </cid:webInteract>

            <cid:webUpload>
                <cid:request method="GET" properties="header queryString"/>
                <cid:request method="PUT" properties="header queryString"/>
                <cid:request method="POST" properties="queryString header"/>
                <cid:request method="POST;multipart/form-data" properties="header queryString post"/>
            </cid:webUpload>
        </cid:webTransport>
    </cid:transports>
</cid:manifest>

The process step by step

Procedure

  1. Manifest exposition

    The server must expose the XML manifest to an accessible URL. For example, at http://example.com/manifest.xml.