Projet

Général

Profil

MaarchWSClient_cs_vcte_db.xml

Gaelle guegan, 27/06/2023 16:07

 
1
<?xml version="1.0" encoding="UTF-8"?>
2
<MaarchWSClient>
3
    <!-- REST FRONTAL -->
4
    <WS name="MaarchRestWS" type="REST" uri="https://cchaplin:maarch@courrier.vitrecommunaute.bzh/rest/" SSL="true" cacheUse="0" />
5

    
6
    <!-- REST SAMPLES -->
7
    <process name="MaarchRestWSProcessFromScan">
8
        <loop xpath="/Batch/Documents/Document">
9
            <call name="/resources" method="POST">
10
                <argument type="entity" name="modelId">1</argument>
11
                <argument type="entity" name="encodedFile" eval="base64_encode(file_get_contents($Element-&gt;path))"/>
12
                <argument type="entity" name="format" attribute="extension"/>
13
                <argument type="entity" name="doctype">119</argument>
14
                <argument type="entity" name="chrono">true</argument>
15
                <!--<argument type="entity" name="destination">30</argument>-->
16
                <!--<argument type="entity" name="destination" eval="explode('_', $Element-&gt;filename)&#91;0&#93;"/>-->
17
                <argument type="entity" name="priority">poiuytre1357nbvc</argument>
18
                <argument type="entity" name="status">INIT</argument>
19
                <return>
20
                    <resId metadata="resId" />
21
                </return>
22
            </call>
23
        </loop>
24
    </process>
25

    
26
    <process name="MaarchRestWSProcessFromScanMassVcte">
27
        <loop xpath="/Batch/Documents/Document">
28
            <call name="/resources" method="POST">
29
                <argument type="entity" name="modelId">1</argument>
30
                <argument type="entity" name="encodedFile" eval="base64_encode(file_get_contents($Element-&gt;path))"/>
31
                <argument type="entity" name="format" attribute="extension"/>
32
                <argument type="entity" name="doctype">119</argument>
33
                <argument type="entity" name="chrono">true</argument>
34
                <!--<argument type="entity" name="destination">30</argument>-->
35
                <argument type="entity" name="destination" eval="explode('_', $Element-&gt;filename)&#91;0&#93;"/>
36
                <argument type="entity" name="priority">poiuytre1357nbvc</argument>
37
                <argument type="entity" name="status">INIT</argument>
38
                <return>
39
                    <resId metadata="resId" />
40
                </return>
41
            </call>
42
        </loop>
43
    </process>
44

    
45
    <process name="MaarchRestWSProcessFromMail">
46
        <loop xpath="/Batch/Documents/Document">
47
            <call name="/resources" method="POST">
48
                <argument type="entity" name="modelId">1</argument>
49
                <argument type="entity" name="encodedFile" eval="base64_encode(file_get_contents($Element-&gt;path))"/>
50
                <argument type="entity" name="format" attribute="extension"/>
51
                <argument type="entity" name="status">INIT</argument>
52
                <argument type="entity" name="chrono">true</argument>
53
                <argument type="entity" name="doctype">119</argument>
54
                <argument type="entity" name="subject" metadata="subject"/>
55
                <!--<argument type="entity" name="destination">30</argument>-->
56
                <argument type="entity" name="priority">poiuytre1357nbvc</argument>
57
                <return>
58
                    <resId metadata="resId" />
59
                </return>
60
            </call>
61
            <loop xpath="Attachments/Attachment">
62
                <call name="/attachments" method="POST">
63
                    <argument type="entity" name="resIdMaster" xvalue="ancestor::Document/Metadata/resId"/>
64
                    <argument type="entity" name="type">incoming_mail_attachment</argument>
65
                    <argument type="entity" name="encodedFile" eval="base64_encode(file_get_contents($Element-&gt;path))"/>
66
                    <argument type="entity" name="format" attribute="extension"/>
67
                    <argument type="entity" name="title" metadata="filename"/>                    
68
                    <return>
69
                        <id metadata="resId" />
70
                    </return>
71
                </call>
72
            </loop>
73
        </loop>
74
    </process>
75
</MaarchWSClient>