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.
package/README.md CHANGED
@@ -76,4 +76,18 @@ const xml = xs.stringify (data)
76
76
  */
77
77
  ```
78
78
 
79
+ * Invoking a [SOAP 1.1](https://github.com/do-/node-xml-toolkit/wiki/SOAP11) Web Service
80
+
81
+ ```js
82
+ const http = require ('http')
83
+ const {SOAP11} = require ('xml-toolkit')
84
+
85
+ const soap = await SOAP11.fromFile ('their.wsdl')
86
+
87
+ const {method, headers, body} = soap.http ({RequestElementNameOfTheirs: {amount: '0.01'}})
88
+
89
+ const rq = http.request (endpointURL, {method, headers})
90
+ rq.write (body)
91
+ ```
92
+
79
93
  More information available in [wiki docs](https://github.com/do-/node-xml-toolkit/wiki).
package/index.js CHANGED
@@ -7,5 +7,6 @@ for (const name of [
7
7
  'MoxyLikeJsonEncoder',
8
8
  'XMLNode',
9
9
  'XMLSchemata',
10
+ 'SOAP11',
10
11
 
11
12
  ]) module.exports [name] = require ('./lib/' + name)
package/lib/SOAP11.js ADDED
@@ -0,0 +1,110 @@
1
+ const fs = require ('fs')
2
+
3
+ const XMLSchemata = require ('./XMLSchemata.js')
4
+ const XMLReader = require ('./XMLReader.js')
5
+ const XMLNode = require ('./XMLNode.js')
6
+ const SOAPHTTP = require ('./SOAPHTTP.js')
7
+
8
+ const SOAP11 = class {
9
+
10
+ getMessageLocalNameByElementLocalName (elementLocalName) {
11
+
12
+ for (const m of this.definitions.children) if (m.localName === 'message')
13
+
14
+ for (const p of m.children) if (p.localName === 'part')
15
+
16
+ if (XMLNode.getLocalName (p.attributes.get ('element')) === elementLocalName)
17
+
18
+ return m.attributes.get ('name')
19
+
20
+ }
21
+
22
+ getOperationNameByMessageLocalName (messageLocalName) {
23
+
24
+ for (const p of this.definitions.children) if (p.localName === 'portType')
25
+
26
+ for (const o of p.children) if (o.localName === 'operation')
27
+
28
+ for (const i of o.children) if (i.localName === 'input')
29
+
30
+ if (XMLNode.getLocalName (i.attributes.get ('message')) === messageLocalName)
31
+
32
+ return o.attributes.get ('name')
33
+
34
+ }
35
+
36
+
37
+ getSoapActionByOperationName (operationName) {
38
+
39
+ for (const b of this.definitions.children) if (b.localName === 'binding')
40
+
41
+ for (const o of b.children) if (o.localName === 'operation' && o.attributes.get ('name') === operationName)
42
+
43
+ for (const so of o.children) if (o.localName === 'operation')
44
+
45
+ return so.attributes.get ('soapAction')
46
+
47
+ }
48
+
49
+
50
+ getSoapActionByElementLocalName (elementLocalName) {
51
+
52
+ return this.getSoapActionByOperationName (
53
+
54
+ this.getOperationNameByMessageLocalName (
55
+
56
+ this.getMessageLocalNameByElementLocalName (elementLocalName)
57
+
58
+ )
59
+
60
+ )
61
+
62
+ }
63
+
64
+ toSOAPHTTP (o) {
65
+
66
+ let rq = new SOAPHTTP ('1.1')
67
+
68
+ for (const elementLocalName in o) {
69
+
70
+ const SOAPAction = this.getSoapActionByElementLocalName (elementLocalName)
71
+
72
+ if (SOAPAction) rq.http.headers.SOAPAction = SOAPAction
73
+
74
+ }
75
+
76
+ rq.soap.Body.content = this.xs.stringify (o)
77
+
78
+ return rq.build ()
79
+
80
+ }
81
+
82
+ http (o) {
83
+
84
+ return this.toSOAPHTTP (o).http
85
+
86
+ }
87
+
88
+ }
89
+
90
+ const WSDL = {namespaceURI: 'http://schemas.xmlsoap.org/wsdl/'}
91
+
92
+ SOAP11.namespaceURI = 'http://schemas.xmlsoap.org/wsdl/soap/'
93
+
94
+ SOAP11.fromFile = async function (fn, options = {}) {
95
+
96
+ let s = new SOAP11 ()
97
+
98
+ s.xs = await XMLSchemata.fromFile (fn)
99
+
100
+ s.definitions = await new XMLReader ({
101
+ filterElements: e =>
102
+ e.namespaceURI === WSDL.namespaceURI &&
103
+ e.localName === 'definitions'
104
+ }).process (fs.createReadStream (fn)).findFirst ()
105
+
106
+ return s
107
+
108
+ }
109
+
110
+ module.exports = SOAP11
@@ -0,0 +1,84 @@
1
+ const zlib = require ('zlib')
2
+
3
+ const VER = {
4
+
5
+ '1.1': {
6
+ contentType : 'text/xml',
7
+ namespaceURI : 'http://schemas.xmlsoap.org/soap/envelope/',
8
+ },
9
+
10
+ '1.2': {
11
+ contentType : 'application/soap+xml',
12
+ namespaceURI : 'http://www.w3.org/2003/05/soap-envelope',
13
+ },
14
+
15
+ }
16
+
17
+ const SOAPHTTP = class {
18
+
19
+ constructor (versionNumber) {
20
+
21
+ if (!(versionNumber in VER)) throw new Exception ('Unknown SOAP version: ' + version)
22
+
23
+ const {contentType, namespaceURI} = VER [versionNumber]
24
+
25
+ this.charset = 'utf-8'
26
+
27
+ this.http = {
28
+ method : 'POST',
29
+ headers : {"Content-Type": contentType},
30
+ }
31
+
32
+ this.soap = {
33
+ Envelope: {attributes: `xmlns:soap="${namespaceURI}"`},
34
+ Header: {attributes: '', content: ''},
35
+ Body: {attributes: '', content: ''},
36
+ }
37
+
38
+ }
39
+
40
+ el (name) {
41
+
42
+ const {attributes, content} = this.soap [name]
43
+
44
+ const qName = 'soap:' + name
45
+
46
+ let s = '<' + qName
47
+
48
+ if (attributes) s += ' ' + attributes
49
+
50
+ if (!content) return s + '/>'
51
+
52
+ return s + '>' + content + '</' + qName + '>'
53
+
54
+ }
55
+
56
+ build () {
57
+
58
+ this.http.headers ['Content-Type'] += '; charset=' + this.charset
59
+
60
+ this.soap.Envelope.content = this.el ('Header') + this.el ('Body')
61
+
62
+ this.http.body = '<?xml version="1.0" encoding="' + this.charset + '"?>' + this.el ('Envelope')
63
+
64
+ return this
65
+
66
+ }
67
+
68
+ gzip (options = {}) {
69
+
70
+ if (!('level' in options)) options.level = 9
71
+
72
+ this.http.body = zlib.gzipSync (this.http.body, options)
73
+
74
+ this.http.headers ['Content-Encoding'] = 'gzip'
75
+
76
+ this.http.headers ['Content-Length'] = this.http.body.length
77
+
78
+ return this
79
+
80
+ }
81
+
82
+ }
83
+
84
+ module.exports = SOAPHTTP
@@ -148,7 +148,13 @@ const XMLMarshaller = class {
148
148
 
149
149
  let v = data [name]; if (v == null) return
150
150
 
151
- this.buf += ' ' + this.ns.QName (name, targetNamespace) + '="'
151
+ this.buf += ' ' + (
152
+
153
+ this.xs.get (targetNamespace).isAttributeElementFormQualified ? this.ns.QName (name, targetNamespace)
154
+
155
+ : name
156
+
157
+ ) + '="'
152
158
 
153
159
  this.appendScalar (this.xs.getByReference (type), v)
154
160
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xml-toolkit",
3
- "version": "1.0.11",
3
+ "version": "1.0.13",
4
4
  "description": "Collection of classes for dealing with XML",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -0,0 +1,114 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <wsdl:definitions name="F9SyncService" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:tns="http://tempuri.org/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata">
3
+ <wsp:Policy wsu:Id="CustomBinding_IF9Service_policy">
4
+ <wsp:ExactlyOne>
5
+ <wsp:All>
6
+ <sp:AsymmetricBinding xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
7
+ <wsp:Policy>
8
+ <sp:InitiatorToken>
9
+ <wsp:Policy>
10
+ <sp:X509Token sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
11
+ <wsp:Policy>
12
+ <sp:RequireDerivedKeys/>
13
+ <sp:WssX509V3Token10/>
14
+ </wsp:Policy>
15
+ </sp:X509Token>
16
+ </wsp:Policy>
17
+ </sp:InitiatorToken>
18
+ <sp:RecipientToken>
19
+ <wsp:Policy>
20
+ <sp:X509Token sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToInitiator">
21
+ <wsp:Policy>
22
+ <sp:RequireDerivedKeys/>
23
+ <sp:WssX509V3Token10/>
24
+ </wsp:Policy>
25
+ </sp:X509Token>
26
+ </wsp:Policy>
27
+ </sp:RecipientToken>
28
+ <sp:AlgorithmSuite>
29
+ <wsp:Policy>
30
+ <BasicGostObsolete xmlns="urn:ietf:params:xml:ns:cpxmlsec"/>
31
+ </wsp:Policy>
32
+ </sp:AlgorithmSuite>
33
+ <sp:Layout>
34
+ <wsp:Policy>
35
+ <sp:Strict/>
36
+ </wsp:Policy>
37
+ </sp:Layout>
38
+ <sp:OnlySignEntireHeadersAndBody/>
39
+ </wsp:Policy>
40
+ </sp:AsymmetricBinding>
41
+ <sp:Wss10 xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
42
+ <wsp:Policy>
43
+ <sp:MustSupportRefKeyIdentifier/>
44
+ <sp:MustSupportRefIssuerSerial/>
45
+ </wsp:Policy>
46
+ </sp:Wss10>
47
+ <sp:Trust13 xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
48
+ <wsp:Policy>
49
+ <sp:MustSupportIssuedTokens/>
50
+ <sp:RequireClientEntropy/>
51
+ <sp:RequireServerEntropy/>
52
+ </wsp:Policy>
53
+ </sp:Trust13>
54
+ </wsp:All>
55
+ </wsp:ExactlyOne>
56
+ </wsp:Policy>
57
+ <wsp:Policy wsu:Id="CustomBinding_IF9Service_GetForm9Sync_Input_policy">
58
+ <wsp:ExactlyOne>
59
+ <wsp:All>
60
+ <sp:SignedParts xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
61
+ <sp:Body/>
62
+ </sp:SignedParts>
63
+ </wsp:All>
64
+ </wsp:ExactlyOne>
65
+ </wsp:Policy>
66
+ <wsp:Policy wsu:Id="CustomBinding_IF9Service_GetForm9Sync_output_policy">
67
+ <wsp:ExactlyOne>
68
+ <wsp:All>
69
+ <sp:SignedParts xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
70
+ <sp:Body/>
71
+ </sp:SignedParts>
72
+ </wsp:All>
73
+ </wsp:ExactlyOne>
74
+ </wsp:Policy>
75
+ <wsdl:types>
76
+ <xsd:schema targetNamespace="http://tempuri.org/Imports">
77
+ <xsd:import schemaLocation="F9SyncService.xsd" namespace="http://tempuri.org/"/>
78
+ <xsd:import schemaLocation="F9SyncService_1_2.xsd" namespace="http://schemas.microsoft.com/2003/10/Serialization/"/>
79
+ <xsd:import schemaLocation="F9SyncService_1.xsd" namespace="http://schemas.datacontract.org/2004/07/GetForm9ASync"/>
80
+ </xsd:schema>
81
+ </wsdl:types>
82
+ <wsdl:message name="IF9Service_GetForm9Sync_InputMessage">
83
+ <wsdl:part name="parameters" element="tns:GetForm9Sync"/>
84
+ </wsdl:message>
85
+ <wsdl:message name="IF9Service_GetForm9Sync_OutputMessage">
86
+ <wsdl:part name="parameters" element="tns:GetForm9SyncResponse"/>
87
+ </wsdl:message>
88
+ <wsdl:portType name="IF9Service">
89
+ <wsdl:operation name="GetForm9Sync">
90
+ <wsdl:input wsaw:Action="http://tempuri.org/IF9Service/GetForm9Sync" message="tns:IF9Service_GetForm9Sync_InputMessage"/>
91
+ <wsdl:output wsaw:Action="http://tempuri.org/IF9Service/GetForm9SyncResponse" message="tns:IF9Service_GetForm9Sync_OutputMessage"/>
92
+ </wsdl:operation>
93
+ </wsdl:portType>
94
+ <wsdl:binding name="CustomBinding_IF9Service" type="tns:IF9Service">
95
+ <wsp:PolicyReference URI="#CustomBinding_IF9Service_policy"/>
96
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
97
+ <wsdl:operation name="GetForm9Sync">
98
+ <soap:operation soapAction="http://tempuri.org/IF9Service/GetForm9Sync" style="document"/>
99
+ <wsdl:input>
100
+ <wsp:PolicyReference URI="#CustomBinding_IF9Service_GetForm9Sync_Input_policy"/>
101
+ <soap:body use="literal"/>
102
+ </wsdl:input>
103
+ <wsdl:output>
104
+ <wsp:PolicyReference URI="#CustomBinding_IF9Service_GetForm9Sync_output_policy"/>
105
+ <soap:body use="literal"/>
106
+ </wsdl:output>
107
+ </wsdl:operation>
108
+ </wsdl:binding>
109
+ <wsdl:service name="F9SyncService">
110
+ <wsdl:port name="CustomBinding_IF9Service" binding="tns:CustomBinding_IF9Service">
111
+ <soap:address location="http://10.128.56.51/Form9SyncTest/F9SyncService.svc"/>
112
+ </wsdl:port>
113
+ </wsdl:service>
114
+ </wsdl:definitions>
package/test/30282.xsd ADDED
@@ -0,0 +1,29 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://kvs.pfr.com/snils-by-additionalData/1.0.1" xmlns:smev="urn://x-artefacts-smev-gov-ru/supplementary/commons/1.0.1" xmlns:pfr="http://common.kvs.pfr.com/1.0.0" xmlns:jxb="http://java.sun.com/xml/ns/jaxb" targetNamespace="http://kvs.pfr.com/snils-by-additionalData/1.0.1" elementFormDefault="qualified" jxb:version="2.0">
3
+ <import namespace="urn://x-artefacts-smev-gov-ru/supplementary/commons/1.0.1" schemaLocation="commons/smev-supplementary-commons-1.0.1.xsd"/>
4
+ <import namespace="http://common.kvs.pfr.com/1.0.0" schemaLocation="commons/pfr-common-types-1.0.0.xsd"/>
5
+ <element name="SnilsByAdditionalDataRequest">
6
+ <complexType>
7
+ <sequence>
8
+ <group ref="smev:PhysicalPersonQualifiedName-ModelGroup"/>
9
+ <element name="BirthDate" type="date" nillable="false"/>
10
+ <element name="Gender" type="smev:GenderType" nillable="false"/>
11
+ <element name="BirthPlace" type="pfr:BirthPlaceType" minOccurs="0"/>
12
+ <group ref="pfr:AllIdentityDocumentType-Group" minOccurs="0"/>
13
+ </sequence>
14
+ </complexType>
15
+ </element>
16
+ <element name="SnilsByAdditionalDataResponse">
17
+ <complexType>
18
+ <sequence>
19
+ <group ref="smev:PhysicalPersonQualifiedName-ModelGroup"/>
20
+ <element name="Snils" type="smev:SNILSType" nillable="false"/>
21
+ <element name="BirthDate" type="date" nillable="false"/>
22
+ <element name="Gender" type="smev:GenderType" nillable="false"/>
23
+ <element name="BirthPlace" type="pfr:BirthPlaceType" minOccurs="0"/>
24
+ <group ref="pfr:AllIdentityDocumentType-Group" minOccurs="0"/>
25
+ </sequence>
26
+ </complexType>
27
+ </element>
28
+ </schema>
29
+
@@ -0,0 +1,19 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xs:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://tempuri.org/">
3
+ <xs:import schemaLocation="F9SyncService_1.xsd" namespace="http://schemas.datacontract.org/2004/07/GetForm9ASync"/>
4
+ <xs:element name="GetForm9Sync">
5
+ <xs:complexType>
6
+ <xs:sequence>
7
+ <xs:element minOccurs="0" name="person" nillable="true" type="q1:Person" xmlns:q1="http://schemas.datacontract.org/2004/07/GetForm9ASync"/>
8
+ <xs:element minOccurs="0" name="address" nillable="true" type="q2:Address" xmlns:q2="http://schemas.datacontract.org/2004/07/GetForm9ASync"/>
9
+ </xs:sequence>
10
+ </xs:complexType>
11
+ </xs:element>
12
+ <xs:element name="GetForm9SyncResponse">
13
+ <xs:complexType>
14
+ <xs:sequence>
15
+ <xs:element minOccurs="0" name="GetForm9SyncResult" nillable="true" type="q3:Result" xmlns:q3="http://schemas.datacontract.org/2004/07/GetForm9ASync"/>
16
+ </xs:sequence>
17
+ </xs:complexType>
18
+ </xs:element>
19
+ </xs:schema>
@@ -0,0 +1,33 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xs:schema elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/GetForm9ASync" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://schemas.datacontract.org/2004/07/GetForm9ASync">
3
+ <xs:complexType name="Person">
4
+ <xs:sequence>
5
+ <xs:element name="LastName" nillable="true" type="xs:string"/>
6
+ <xs:element name="FirstName" nillable="true" type="xs:string"/>
7
+ <xs:element name="SecondName" nillable="true" type="xs:string"/>
8
+ <xs:element name="BirthDate" type="xs:dateTime"/>
9
+ </xs:sequence>
10
+ </xs:complexType>
11
+ <xs:complexType name="Address">
12
+ <xs:sequence>
13
+ <xs:element name="Region" nillable="true" type="tns:Dict"/>
14
+ <xs:element name="Street" nillable="true" type="tns:Dict"/>
15
+ <xs:element name="House" nillable="true" type="xs:string"/>
16
+ <xs:element minOccurs="0" name="Block" nillable="true" type="xs:string"/>
17
+ <xs:element minOccurs="0" name="Flat" nillable="true" type="xs:string"/>
18
+ </xs:sequence>
19
+ </xs:complexType>
20
+ <xs:complexType name="Dict">
21
+ <xs:sequence>
22
+ <xs:element name="Code" type="xs:int"/>
23
+ <xs:element minOccurs="0" name="Name" nillable="true" type="xs:string"/>
24
+ </xs:sequence>
25
+ </xs:complexType>
26
+ <xs:complexType name="Result">
27
+ <xs:sequence>
28
+ <xs:element minOccurs="0" name="Document" nillable="true" type="xs:string"/>
29
+ <xs:element name="Status" nillable="true" type="tns:Dict"/>
30
+ </xs:sequence>
31
+ </xs:complexType>
32
+ <xs:element name="Result" nillable="true" type="tns:Result"/>
33
+ </xs:schema>
@@ -0,0 +1,42 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/">
3
+ <xs:element name="anyType" nillable="true" type="xs:anyType"/>
4
+ <xs:element name="anyURI" nillable="true" type="xs:anyURI"/>
5
+ <xs:element name="base64Binary" nillable="true" type="xs:base64Binary"/>
6
+ <xs:element name="boolean" nillable="true" type="xs:boolean"/>
7
+ <xs:element name="byte" nillable="true" type="xs:byte"/>
8
+ <xs:element name="dateTime" nillable="true" type="xs:dateTime"/>
9
+ <xs:element name="decimal" nillable="true" type="xs:decimal"/>
10
+ <xs:element name="double" nillable="true" type="xs:double"/>
11
+ <xs:element name="float" nillable="true" type="xs:float"/>
12
+ <xs:element name="int" nillable="true" type="xs:int"/>
13
+ <xs:element name="long" nillable="true" type="xs:long"/>
14
+ <xs:element name="QName" nillable="true" type="xs:QName"/>
15
+ <xs:element name="short" nillable="true" type="xs:short"/>
16
+ <xs:element name="string" nillable="true" type="xs:string"/>
17
+ <xs:element name="unsignedByte" nillable="true" type="xs:unsignedByte"/>
18
+ <xs:element name="unsignedInt" nillable="true" type="xs:unsignedInt"/>
19
+ <xs:element name="unsignedLong" nillable="true" type="xs:unsignedLong"/>
20
+ <xs:element name="unsignedShort" nillable="true" type="xs:unsignedShort"/>
21
+ <xs:element name="char" nillable="true" type="tns:char"/>
22
+ <xs:simpleType name="char">
23
+ <xs:restriction base="xs:int"/>
24
+ </xs:simpleType>
25
+ <xs:element name="duration" nillable="true" type="tns:duration"/>
26
+ <xs:simpleType name="duration">
27
+ <xs:restriction base="xs:duration">
28
+ <xs:pattern value="\-?P(\d*D)?(T(\d*H)?(\d*M)?(\d*(\.\d*)?S)?)?"/>
29
+ <xs:minInclusive value="-P10675199DT2H48M5.4775808S"/>
30
+ <xs:maxInclusive value="P10675199DT2H48M5.4775807S"/>
31
+ </xs:restriction>
32
+ </xs:simpleType>
33
+ <xs:element name="guid" nillable="true" type="tns:guid"/>
34
+ <xs:simpleType name="guid">
35
+ <xs:restriction base="xs:string">
36
+ <xs:pattern value="[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}"/>
37
+ </xs:restriction>
38
+ </xs:simpleType>
39
+ <xs:attribute name="FactoryType" type="xs:QName"/>
40
+ <xs:attribute name="Id" type="xs:ID"/>
41
+ <xs:attribute name="Ref" type="xs:IDREF"/>
42
+ </xs:schema>