xml-toolkit 1.0.11 → 1.0.13

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.
@@ -0,0 +1,62 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="urn://x-artefacts-fns-inn-singular/root/270-18/4.0.1" xmlns:tns="urn://x-artefacts-fns-inn/commons/4.0.0" targetNamespace="urn://x-artefacts-fns-inn-singular/root/270-18/4.0.1" elementFormDefault="qualified" attributeFormDefault="unqualified">
3
+ <xs:import namespace="urn://x-artefacts-fns-inn/commons/4.0.0" schemaLocation="commons/fns-common-types.xsd"/>
4
+ <xs:element name="FNSINNSingularRequest">
5
+ <xs:annotation>
6
+ <xs:documentation>Запрос в Федеральную налоговую службу об ИНН физического лица</xs:documentation>
7
+ </xs:annotation>
8
+ <xs:complexType>
9
+ <xs:sequence>
10
+ <xs:element name="СведЮЛ">
11
+ <xs:annotation>
12
+ <xs:documentation>Сведения о юридическом лице, осуществляющем запрос</xs:documentation>
13
+ </xs:annotation>
14
+ <xs:complexType>
15
+ <xs:attribute name="НаимОрг" type="tns:string-1000" use="required">
16
+ <xs:annotation>
17
+ <xs:documentation>Наименование организации</xs:documentation>
18
+ </xs:annotation>
19
+ </xs:attribute>
20
+ <xs:attribute name="ИННЮЛ" type="tns:ИННЮЛТип" use="required">
21
+ <xs:annotation>
22
+ <xs:documentation>ИНН юридического лица</xs:documentation>
23
+ </xs:annotation>
24
+ </xs:attribute>
25
+ <xs:attribute name="ОГРН" type="tns:ОГРН" use="required">
26
+ <xs:annotation>
27
+ <xs:documentation>Основной государственный регистрационный номер юридического лица</xs:documentation>
28
+ </xs:annotation>
29
+ </xs:attribute>
30
+ </xs:complexType>
31
+ </xs:element>
32
+ <xs:element name="СведФЛ" type="tns:СведФЛТип">
33
+ <xs:annotation>
34
+ <xs:documentation>Сведения о запрашиваемом физическом лице</xs:documentation>
35
+ </xs:annotation>
36
+ </xs:element>
37
+ </xs:sequence>
38
+ <xs:attribute name="ИдЗапрос" type="tns:ИдЗапросТип" use="required">
39
+ <xs:annotation>
40
+ <xs:documentation>Идентификатор запроса</xs:documentation>
41
+ </xs:annotation>
42
+ </xs:attribute>
43
+ </xs:complexType>
44
+ </xs:element>
45
+ <xs:element name="FNSINNSingularResponse">
46
+ <xs:annotation>
47
+ <xs:documentation>Ответ на запрос в Федеральную налоговую службу об ИНН физического лица</xs:documentation>
48
+ </xs:annotation>
49
+ <xs:complexType>
50
+ <xs:attribute name="ИдЗапрос" type="tns:ИдЗапросТип" use="required">
51
+ <xs:annotation>
52
+ <xs:documentation>Идентификатор запроса, на который предоставляется ответ</xs:documentation>
53
+ </xs:annotation>
54
+ </xs:attribute>
55
+ <xs:attribute name="ИННФЛ" type="tns:ИННФЛТип" use="optional">
56
+ <xs:annotation>
57
+ <xs:documentation>ИНН физического лица</xs:documentation>
58
+ </xs:annotation>
59
+ </xs:attribute>
60
+ </xs:complexType>
61
+ </xs:element>
62
+ </xs:schema>
@@ -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
@@ -1,6 +1,6 @@
1
1
  const fs = require ('fs')
2
2
  const assert = require ('assert')
3
- const {XMLReader, SAXEvent, XMLLexer, AttributesMap, XMLNode, XMLSchemata} = require ('../')
3
+ const {XMLReader, SAXEvent, XMLLexer, AttributesMap, XMLNode, XMLSchemata, SOAP11} = require ('../')
4
4
 
5
5
  async function test_001_lexer_sync (fn) {
6
6
 
@@ -97,24 +97,10 @@ console.log (xml)
97
97
  */
98
98
  //console.log ([xml, s])
99
99
 
100
-
101
- try {
102
-
103
-
104
-
105
100
  const v = await sax.process (xml).findFirst ()
106
101
 
107
102
  console.log (JSON.stringify (v, null, 2))
108
103
 
109
-
110
- }
111
- catch (x) {
112
- console.log ({x})
113
- }
114
-
115
-
116
-
117
-
118
104
  }
119
105
 
120
106
  async function test_004_schemata (fn) {
@@ -331,6 +317,14 @@ async function test_006_schemata (fn) {
331
317
 
332
318
  }
333
319
 
320
+ async function test_007_wsdl (fn) {
321
+
322
+ const soap = await SOAP11.fromFile ('test/20186.wsdl')
323
+
324
+ console.log (soap.http ({GetForm9Sync: {address: {Region: {Code: 78}}}}))
325
+
326
+ }
327
+
334
328
  async function main () {
335
329
 
336
330
  // await test_001_lexer_sync ('E05a.xml')
@@ -341,13 +335,14 @@ async function main () {
341
335
  // await test_002_lexer_stream ('param_types.xml')
342
336
  // await test_002_lexer_stream ('not-sa02.xml')
343
337
  // await test_003_emitter_sync ('E05a.xml')
344
- await test_003_emitter_sync ('param_types.xml')
338
+ // await test_003_emitter_sync ('param_types.xml')
345
339
  // await test_003_emitter_sync ('not-sa01.xml')
346
340
  // await test_003_emitter_sync ('ent.xml')
347
341
  // await test_003_emitter_sync ('soap.xml')
348
342
  // await test_004_schemata ()
349
343
  // await test_005_schemata ()
350
344
  // await test_006_schemata ()
345
+ await test_007_wsdl ()
351
346
 
352
347
  }
353
348