Newer
Older
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<MaarchWSClient>
<!-- REST FRONTAL -->
<WS name="MaarchRestWS" type="REST" uri="http://cchaplin:maarch@127.0.0.1/rest/" SSL="false" cacheUse="0" />
<!-- DEVELOP SAMPLES -->
<process name="MaarchRestWSProcessFromScan">
<loop xpath="/Batch/Documents/Document">
<call name="/resources" method="POST">
<argument type="entity" name="modelId">1</argument>
<argument type="entity" name="encodedFile" eval="base64_encode(file_get_contents($Element->path))"/>
<argument type="entity" name="doctype">108</argument>
<argument type="entity" name="destination">10</argument>
<argument type="entity" name="priority">poiuytre1391nbvc</argument>
<!-- <argument type="entity" name="destination" eval="explode('_', $Element->filename)[0]"/> -->
<argument type="entity" name="format" attribute="extension"/>
<argument type="entity" name="status">INIT</argument>
<return>
<resId metadata="resId" />
</return>
</call>
</loop>
</process>
<!-- REST SAMPLES -->
<process name="MaarchRestWSProcessFromScan">
<loop xpath="/Batch/Documents/Document">
<call name="/resources" method="POST">
<argument type="entity" name="modelId">1</argument>
<argument type="entity" name="encodedFile" eval="base64_encode(file_get_contents($Element->path))"/>
<argument type="entity" name="format" attribute="extension"/>
<argument type="entity" name="doctype">108</argument>
<argument type="entity" name="chrono">true</argument>
<argument type="entity" name="destination">15</argument>
<argument type="entity" name="priority">2</argument>
<argument type="entity" name="status">INIT</argument>
<return>
<resId metadata="resId" />
</return>
</call>
</loop>
</process>
<process name="MaarchRestWSProcessFromMail">
<loop xpath="/Batch/Documents/Document">
<call name="/resources" method="POST">
<argument type="entity" name="modelId">1</argument>
<argument type="entity" name="encodedFile" eval="base64_encode(file_get_contents($Element->path))"/>
<argument type="entity" name="format" attribute="extension"/>
<argument type="entity" name="status">INIT</argument>
<argument type="entity" name="chrono">true</argument>
<argument type="entity" name="doctype" metadata="type_id"/>
<argument type="entity" name="subject" metadata="subject"/>
<argument type="entity" name="documentDate" metadata="doc_date"/>
<argument type="entity" name="destination" metadata="destination"/>
<argument type="entity" name="initiator" metadata="destination"/>
<argument type="entity" name="priority">2</argument>
<return>
<resId metadata="resId" />
</return>
</call>
<loop xpath="Attachments/Attachment">
<call name="/attachments" method="POST">
<argument type="entity" name="resIdMaster" xvalue="ancestor::Document/Metadata/resId"/>
<argument type="entity" name="type">incoming_mail_attachment</argument>
<argument type="entity" name="encodedFile" eval="base64_encode(file_get_contents($Element->path))"/>
<argument type="entity" name="format" attribute="extension"/>
<argument type="entity" name="title" metadata="filename"/>
</return>
</call>
</loop>
</loop>
</process>
</MaarchWSClient>