xml-toolkit 1.0.10 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/XMLMarshaller.js +7 -1
- package/lib/XMLReader.js +1 -1
- package/package.json +1 -1
- package/test/20186.wsdl +114 -0
- package/test/30282.xsd +29 -0
- package/test/F9ASyncService.xsd +33 -0
- package/test/F9ASyncService_1.wsdl +72 -0
- package/test/F9ASyncService_1.xsd +43 -0
- package/test/F9ASyncService_1_2.xsd +42 -0
- package/test/F9SyncService.xsd +19 -0
- package/test/F9SyncService_1.xsd +33 -0
- package/test/F9SyncService_1_2.xsd +42 -0
- package/test/commons/dom-gosuslugi-ru-smev3-common.xsd +1 -1
- package/test/commons/fns-common-types.xsd +1993 -0
- package/test/commons/smev-supplementary-commons.xsd +689 -0
- package/test/fns-innfdrfio-root.xsd +89 -0
- package/test/test.js +56 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!-- edited with XMLSpy v2007 sp2 (http://www.altova.com) by VI (GNIVC FNS RF) -->
|
|
3
|
+
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn://x-artefacts-fns-innfdrfio/root/085-05/4.0.0" xmlns:smev="urn://x-artefacts-smev-gov-ru/supplementary/commons/1.0.1" xmlns:fns="urn://x-artefacts-fns/commons/4.0.0" targetNamespace="urn://x-artefacts-fns-innfdrfio/root/085-05/4.0.0" elementFormDefault="qualified" attributeFormDefault="unqualified">
|
|
4
|
+
<xs:import namespace="urn://x-artefacts-fns/commons/4.0.0" schemaLocation="commons/fns-common-types.xsd"/>
|
|
5
|
+
<xs:import namespace="urn://x-artefacts-smev-gov-ru/supplementary/commons/1.0.1" schemaLocation="commons/smev-supplementary-commons.xsd"/>
|
|
6
|
+
<xs:element name="INNFDRFIORequest">
|
|
7
|
+
<xs:annotation>
|
|
8
|
+
<xs:documentation>Запрос сведений об ИНН физического лица на основании данных о ФИО и дате рождения</xs:documentation>
|
|
9
|
+
</xs:annotation>
|
|
10
|
+
<xs:complexType>
|
|
11
|
+
<xs:sequence>
|
|
12
|
+
<xs:element name="DataPersonRequest">
|
|
13
|
+
<xs:annotation>
|
|
14
|
+
<xs:documentation>Сведения о физическом лице, в отношении которого выполняется запрос</xs:documentation>
|
|
15
|
+
</xs:annotation>
|
|
16
|
+
<xs:complexType>
|
|
17
|
+
<xs:choice>
|
|
18
|
+
<xs:element name="Patronymic">
|
|
19
|
+
<xs:annotation>
|
|
20
|
+
<xs:documentation>Отчество</xs:documentation>
|
|
21
|
+
</xs:annotation>
|
|
22
|
+
<xs:simpleType>
|
|
23
|
+
<xs:restriction base="fns:string-60"/>
|
|
24
|
+
</xs:simpleType>
|
|
25
|
+
</xs:element>
|
|
26
|
+
<xs:element name="SignLackPatronymic">
|
|
27
|
+
<xs:annotation>
|
|
28
|
+
<xs:documentation>Признак отсутствия отчества </xs:documentation>
|
|
29
|
+
</xs:annotation>
|
|
30
|
+
<xs:simpleType>
|
|
31
|
+
<xs:restriction base="fns:string-1">
|
|
32
|
+
<xs:enumeration value="1"/>
|
|
33
|
+
</xs:restriction>
|
|
34
|
+
</xs:simpleType>
|
|
35
|
+
</xs:element>
|
|
36
|
+
</xs:choice>
|
|
37
|
+
<xs:attribute name="BirthDate" type="xs:date" use="required">
|
|
38
|
+
<xs:annotation>
|
|
39
|
+
<xs:documentation>Дата рождения</xs:documentation>
|
|
40
|
+
</xs:annotation>
|
|
41
|
+
</xs:attribute>
|
|
42
|
+
<xs:attribute name="FamilyName" type="fns:string-60" use="required">
|
|
43
|
+
<xs:annotation>
|
|
44
|
+
<xs:documentation>Фамилия</xs:documentation>
|
|
45
|
+
</xs:annotation>
|
|
46
|
+
</xs:attribute>
|
|
47
|
+
<xs:attribute name="FirstName" type="fns:string-60" use="required">
|
|
48
|
+
<xs:annotation>
|
|
49
|
+
<xs:documentation>Имя</xs:documentation>
|
|
50
|
+
</xs:annotation>
|
|
51
|
+
</xs:attribute>
|
|
52
|
+
</xs:complexType>
|
|
53
|
+
</xs:element>
|
|
54
|
+
</xs:sequence>
|
|
55
|
+
<xs:attribute name="IDRequest" type="fns:IDRequestType" use="required">
|
|
56
|
+
<xs:annotation>
|
|
57
|
+
<xs:documentation>Идентификатор запроса, сформированный запрашивающей стороной</xs:documentation>
|
|
58
|
+
</xs:annotation>
|
|
59
|
+
</xs:attribute>
|
|
60
|
+
</xs:complexType>
|
|
61
|
+
</xs:element>
|
|
62
|
+
<xs:element name="INNFDRFIOResponse">
|
|
63
|
+
<xs:annotation>
|
|
64
|
+
<xs:documentation>Ответ на запрос сведений об ИНН физического лица на основании данных о ФИО и дате рождения</xs:documentation>
|
|
65
|
+
</xs:annotation>
|
|
66
|
+
<xs:complexType>
|
|
67
|
+
<xs:choice>
|
|
68
|
+
<xs:element name="PhysicalPersonINN" type="fns:PhysicalPersonINNType">
|
|
69
|
+
<xs:annotation>
|
|
70
|
+
<xs:documentation>ИНН физического лица</xs:documentation>
|
|
71
|
+
</xs:annotation>
|
|
72
|
+
</xs:element>
|
|
73
|
+
<xs:element name="TreatmentCode">
|
|
74
|
+
<xs:annotation>
|
|
75
|
+
<xs:documentation>Код обработки запроса</xs:documentation>
|
|
76
|
+
</xs:annotation>
|
|
77
|
+
<xs:simpleType>
|
|
78
|
+
<xs:restriction base="fns:digits-2"/>
|
|
79
|
+
</xs:simpleType>
|
|
80
|
+
</xs:element>
|
|
81
|
+
</xs:choice>
|
|
82
|
+
<xs:attribute name="IDRequest" type="fns:IDRequestType" use="optional">
|
|
83
|
+
<xs:annotation>
|
|
84
|
+
<xs:documentation>Идентификатор запроса, сформированный запрашивающей стороной</xs:documentation>
|
|
85
|
+
</xs:annotation>
|
|
86
|
+
</xs:attribute>
|
|
87
|
+
</xs:complexType>
|
|
88
|
+
</xs:element>
|
|
89
|
+
</xs:schema>
|
package/test/test.js
CHANGED
|
@@ -97,10 +97,24 @@ console.log (xml)
|
|
|
97
97
|
*/
|
|
98
98
|
//console.log ([xml, s])
|
|
99
99
|
|
|
100
|
+
|
|
101
|
+
try {
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
100
105
|
const v = await sax.process (xml).findFirst ()
|
|
101
106
|
|
|
102
107
|
console.log (JSON.stringify (v, null, 2))
|
|
103
108
|
|
|
109
|
+
|
|
110
|
+
}
|
|
111
|
+
catch (x) {
|
|
112
|
+
console.log ({x})
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
104
118
|
}
|
|
105
119
|
|
|
106
120
|
async function test_004_schemata (fn) {
|
|
@@ -317,6 +331,46 @@ async function test_006_schemata (fn) {
|
|
|
317
331
|
|
|
318
332
|
}
|
|
319
333
|
|
|
334
|
+
async function test_007_schemata (fn) {
|
|
335
|
+
|
|
336
|
+
const xs = await XMLSchemata.fromFile ('test/20186.wsdl')
|
|
337
|
+
|
|
338
|
+
const data =
|
|
339
|
+
{"GetForm9Sync":{
|
|
340
|
+
"person": {"LastName":"КУПРИН","FirstName":"АНДРЕЙ","SecondName":"АНДРЕЙ","BirthDate":"1967-04-10"},
|
|
341
|
+
"address":{"Region":{"Code":"78","Name":"Санкт-Петербург"},"Street":{"Code":"5381","Name":"Вокзальная ул"},"House":"д. 9 к. 3 литера В","Flat":"50"}
|
|
342
|
+
}}
|
|
343
|
+
|
|
344
|
+
// const m = xs.createMarshaller ('AppDataChildDotation', 'http://smev.gosuslugi.ru/rev111111')
|
|
345
|
+
|
|
346
|
+
console.log (xs.stringify (data))
|
|
347
|
+
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
async function test_008_schemata (fn) {
|
|
351
|
+
|
|
352
|
+
const xs = await XMLSchemata.fromFile ('test/fns-innfdrfio-root.xsd')
|
|
353
|
+
|
|
354
|
+
const IDRequest = '0000000001'
|
|
355
|
+
|
|
356
|
+
const PhysicalPersonINN = '520205004556'
|
|
357
|
+
|
|
358
|
+
// const data = {INNFDRFIOResponse: {'IDRequest ': IDRequest, PhysicalPersonINN}}
|
|
359
|
+
const data = {INNFDRFIORequest: {
|
|
360
|
+
IDRequest: 1,
|
|
361
|
+
DataPersonRequest: {
|
|
362
|
+
BirthDate: "1992-07-28",
|
|
363
|
+
FamilyName: "ИВАНОВ",
|
|
364
|
+
FirstName: "МИХАИЛ",
|
|
365
|
+
Patronymic: "АЛЕКСЕЕВИЧ",
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
console.log (xs.stringify (data))
|
|
371
|
+
|
|
372
|
+
}
|
|
373
|
+
|
|
320
374
|
async function main () {
|
|
321
375
|
|
|
322
376
|
// await test_001_lexer_sync ('E05a.xml')
|
|
@@ -334,6 +388,8 @@ async function main () {
|
|
|
334
388
|
await test_004_schemata ()
|
|
335
389
|
await test_005_schemata ()
|
|
336
390
|
await test_006_schemata ()
|
|
391
|
+
await test_007_schemata ()
|
|
392
|
+
await test_008_schemata ()
|
|
337
393
|
|
|
338
394
|
}
|
|
339
395
|
|