File: document_conversion

package info (click to toggle)
libisds 0.9-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 5,348 kB
  • ctags: 1,659
  • sloc: ansic: 24,898; sh: 11,772; makefile: 393; xml: 375; sed: 16
file content (122 lines) | stat: -rw-r--r-- 5,020 bytes parent folder | download | duplicates (4)
1
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
Document conversion
===================

Source: Reverse engineering of 602XML Filler, version 3.14
Source: Autorizovaná konverze z moci úřední – API
    <http://www.mvcr.cz/clanek/autorizovana-konverze-z-moci-uredni.aspx>


Digital documents can be converted into their analogue projections. Currently 
only PDF 1.3 or higher document with digital signature is allowed to be
converted.

User can send such document through Internet into `Czech POINT' system, which
is responsible for so called authorized conversion.

Other direction from analogue form to digital one is possible too. Of course
software can obtain digital output only.

Public conversion interface is web page <https://www.czechpoint.cz/uschovna/>.
There is nice interactive interface with ugly CAPTCHA.

Proprietary client `602XML Filler' uses similar interface that works
automatically. Without CAPTCHA solving obviously. Description of this batch
interface follows.


Digital to Analogue Direction
=============================

Protocol: SOAP
URL: https://www.czechpoint.cz/uschovna/services.php

Input for XSLT is document subtree (rooted in p:dmFile) of ISDS message
Request XSLT:
<xsl:stylesheet xmlns:p="http://isds.czechpoint.cz/v20"
        xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
        xmlns:xsi="http://www.w3.org/2001/XMLS chema-instance"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
        exclude-result-prefixes="p">
    <xsl:output encoding="UTF-8" method="xml"/>
    <xsl:template match="/">
        <soapenv:Envelope xmlns:ns0="urn:uschovnaWSDL"
                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>
                <ns0:saveDocument>
                    <conversionID soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
                            xsi:type="xsd:string">0</conversionID>
                    <fileName soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
                            xsi:type="xsd:string">
                        <xsl:value-of select="/p:dmFile/@dmFileDescr"/>
                    </fileName>
                    <document soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
                            xsi:type="xsd:base64Binary">
                        <xsl:value-of select="/p:dmFile/p:dmEncodedContent"/>
                    </document>
                </ns0:saveDocument>
            </soapenv:Body>
        </soapenv:Envelope>
    </xsl:template>
</xsl:stylesheet>


Response returns token. Converting officer uses the token to pick up a document
from Czech POINT input storage. Otherwise document expires after 30 days.

According 602XML Filler: Response is standard SOAP Fault error message or
undocumented structure in case of success

According real test:

In case of failure:

<SOAP-ENV:Envelope
        xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
        xmlns:ns1="urn:uschovnaWSDL"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
        SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <SOAP-ENV:Body>
        <ns1:saveDocumentResponse>
            <return xsi:type="ns1:DocumentSaveResponse">
                <status xsi:type="xsd:int">4</status>
                <statusMsg xsi:type="xsd:string">Neni dokument typu PDF |-1</statusMsg>
                <documentID xsi:nil="true"/>
                <dateInserted xsi:type="xsd:date">2010-02-11</dateInserted>
            </return>
        </ns1:saveDocumentResponse>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

In case of success:

<SOAP-ENV:Envelope
        xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
        xmlns:ns1="urn:uschovnaWSDL"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
        SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <SOAP-ENV:Body>
        <ns1:saveDocumentResponse>
            <return xsi:type="ns1:DocumentSaveResponse">
                <status xsi:type="xsd:int">0</status>
                <statusMsg xsi:type="xsd:string">OK 1</statusMsg>
                <documentID xsi:type="xsd:string">816236355942291944571</documentID>
                <dateInserted xsi:type="xsd:date">2010-02-12</dateInserted>
            </return>
        </ns1:saveDocumentResponse>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

As you can see the token is returned in
//ns1:saveDocumentResponse/return/documentID/text().


Analogue to Digital Direction
=============================

Officer stores digital document into output storage and provides a token to the user. User has 3 days to download the document.