2 * Copyright 2015-2017 Hans Leidekker for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
23 #include "webservices.h"
25 #include "wine/debug.h"
26 #include "wine/list.h"
27 #include "webservices_private.h"
29 WINE_DEFAULT_DEBUG_CHANNEL(webservices
);
31 const char *debugstr_xmlstr( const WS_XML_STRING
*str
)
33 if (!str
) return "(null)";
34 return debugstr_an( (const char *)str
->bytes
, str
->length
);
37 static CRITICAL_SECTION dict_cs
;
38 static CRITICAL_SECTION_DEBUG dict_cs_debug
=
41 { &dict_cs_debug
.ProcessLocksList
,
42 &dict_cs_debug
.ProcessLocksList
},
43 0, 0, {(DWORD_PTR
)(__FILE__
": dict_cs") }
45 static CRITICAL_SECTION dict_cs
= { &dict_cs_debug
, -1, 0, 0, 0, 0 };
47 struct dictionary dict_builtin
=
49 {{0x82704485,0x222a,0x4f7c,{0xb9,0x7b,0xe9,0xa4,0x62,0xa9,0x66,0x2b}}}
52 static inline int cmp_string( const unsigned char *str
, ULONG len
, const unsigned char *str2
, ULONG len2
)
54 if (len
< len2
) return -1;
55 else if (len
> len2
) return 1;
58 if (*str
== *str2
) { str
++; str2
++; }
59 else return *str
- *str2
;
64 /* return -1 and string id if found, sort index if not found */
65 static int find_string( const WS_XML_DICTIONARY
*dict
, const ULONG
*sorted
, const unsigned char *data
,
66 ULONG len
, ULONG
*ret_id
)
68 int i
, c
, min
= 0, max
= dict
->stringCount
- 1;
72 c
= cmp_string( data
, len
, dict
->strings
[sorted
[i
]].bytes
, dict
->strings
[sorted
[i
]].length
);
79 *ret_id
= dict
->strings
[sorted
[i
]].id
;
86 #define MIN_DICTIONARY_SIZE 256
87 #define MAX_DICTIONARY_SIZE 2048
89 static BOOL
grow_dict( struct dictionary
*dict
, ULONG size
)
92 ULONG new_size
, *tmp_sorted
;
94 if (dict
->size
>= dict
->dict
.stringCount
+ size
) return TRUE
;
95 if (dict
->size
+ size
> MAX_DICTIONARY_SIZE
) return FALSE
;
97 if (!dict
->dict
.strings
)
99 new_size
= max( MIN_DICTIONARY_SIZE
, size
);
100 if (!(dict
->dict
.strings
= heap_alloc( new_size
* sizeof(*dict
->dict
.strings
) ))) return FALSE
;
101 if (!(dict
->sorted
= heap_alloc( new_size
* sizeof(*dict
->sorted
) )))
103 heap_free( dict
->dict
.strings
);
104 dict
->dict
.strings
= NULL
;
107 dict
->size
= new_size
;
111 new_size
= max( dict
->size
* 2, size
);
112 if (!(tmp
= heap_realloc( dict
->dict
.strings
, new_size
* sizeof(*tmp
) ))) return FALSE
;
113 dict
->dict
.strings
= tmp
;
114 if (!(tmp_sorted
= heap_realloc( dict
->sorted
, new_size
* sizeof(*tmp_sorted
) ))) return FALSE
;
115 dict
->sorted
= tmp_sorted
;
117 dict
->size
= new_size
;
121 static BOOL
insert_string( struct dictionary
*dict
, unsigned char *data
, ULONG len
, int i
, ULONG
*ret_id
)
123 ULONG id
= dict
->dict
.stringCount
;
124 if (!grow_dict( dict
, 1 )) return FALSE
;
125 memmove( &dict
->sorted
[i
] + 1, &dict
->sorted
[i
], (dict
->dict
.stringCount
- i
) * sizeof(*dict
->sorted
) );
126 dict
->sorted
[i
] = id
;
128 dict
->dict
.strings
[id
].length
= len
;
129 dict
->dict
.strings
[id
].bytes
= data
;
130 dict
->dict
.strings
[id
].dictionary
= &dict
->dict
;
131 dict
->dict
.strings
[id
].id
= id
;
132 dict
->dict
.stringCount
++;
137 HRESULT
add_xml_string( WS_XML_STRING
*str
)
142 if (str
->dictionary
) return S_OK
;
144 EnterCriticalSection( &dict_cs
);
145 if ((index
= find_string( &dict_builtin
.dict
, dict_builtin
.sorted
, str
->bytes
, str
->length
, &id
)) == -1)
147 heap_free( str
->bytes
);
148 *str
= dict_builtin
.dict
.strings
[id
];
149 LeaveCriticalSection( &dict_cs
);
152 if (insert_string( &dict_builtin
, str
->bytes
, str
->length
, index
, &id
))
154 *str
= dict_builtin
.dict
.strings
[id
];
155 LeaveCriticalSection( &dict_cs
);
158 LeaveCriticalSection( &dict_cs
);
159 return WS_E_QUOTA_EXCEEDED
;
162 WS_XML_STRING
*alloc_xml_string( const unsigned char *data
, ULONG len
)
166 if (!(ret
= heap_alloc_zero( sizeof(*ret
) ))) return NULL
;
167 if ((ret
->length
= len
) && !(ret
->bytes
= heap_alloc( len
)))
174 memcpy( ret
->bytes
, data
, len
);
175 if (add_xml_string( ret
) != S_OK
) WARN( "string not added to dictionary\n" );
180 void free_xml_string( WS_XML_STRING
*str
)
183 if (!str
->dictionary
) heap_free( str
->bytes
);
187 WS_XML_STRING
*dup_xml_string( const WS_XML_STRING
*src
)
194 if (!(ret
= heap_alloc( sizeof(*ret
) ))) return NULL
;
201 EnterCriticalSection( &dict_cs
);
202 if ((index
= find_string( &dict_builtin
.dict
, dict_builtin
.sorted
, src
->bytes
, src
->length
, &id
)) == -1)
204 *ret
= dict_builtin
.dict
.strings
[id
];
205 LeaveCriticalSection( &dict_cs
);
208 if (!(data
= heap_alloc( src
->length
)))
211 LeaveCriticalSection( &dict_cs
);
214 memcpy( data
, src
->bytes
, src
->length
);
215 if (insert_string( &dict_builtin
, data
, src
->length
, index
, &id
))
217 *ret
= dict_builtin
.dict
.strings
[id
];
218 LeaveCriticalSection( &dict_cs
);
221 LeaveCriticalSection( &dict_cs
);
223 WARN( "string not added to dictionary\n" );
224 ret
->length
= src
->length
;
226 ret
->dictionary
= NULL
;
231 const struct dictionary dict_builtin_static
;
232 static const WS_XML_STRING dict_strings
[] =
234 #define X(str, id) { sizeof(str) - 1, (BYTE *)(str), (WS_XML_DICTIONARY *)&dict_builtin_static.dict, id },
235 X("mustUnderstand", 0)
237 X("http://www.w3.org/2003/05/soap-envelope", 2)
238 X("http://www.w3.org/2005/08/addressing", 3)
245 X("http://www.w3.org/2005/08/addressing/anonymous", 10)
251 X("http://schemas.xmlsoap.org/ws/2005/02/rm", 16)
254 X("DigestMethod", 19)
258 X("SequenceAcknowledgement", 23)
259 X("AcknowledgementRange", 24)
262 X("BufferRemaining", 27)
263 X("http://schemas.microsoft.com/ws/2006/05/rm", 28)
264 X("http://schemas.xmlsoap.org/ws/2005/02/rm/SequenceAcknowledgement", 29)
265 X("SecurityTokenReference", 30)
267 X("MessageNumber", 32)
268 X("http://www.w3.org/2000/09/xmldsig#", 33)
269 X("http://www.w3.org/2000/09/xmldsig#enveloped-signature", 34)
271 X("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", 36)
272 X("http://www.w3.org/2001/04/xmlenc#", 37)
273 X("http://schemas.xmlsoap.org/ws/2005/02/sc", 38)
274 X("DerivedKeyToken", 39)
278 X("CanonicalizationMethod", 43)
279 X("SignatureMethod", 44)
280 X("SignatureValue", 45)
281 X("DataReference", 46)
282 X("EncryptedData", 47)
283 X("EncryptionMethod", 48)
286 X("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd", 51)
292 X("ReferenceList", 57)
295 X("EncryptedHeader", 60)
296 X("http://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd", 61)
297 X("RequestSecurityTokenResponseCollection", 62)
298 X("http://schemas.xmlsoap.org/ws/2005/02/trust", 63)
299 X("http://schemas.xmlsoap.org/ws/2005/02/trust#BinarySecret", 64)
300 X("http://schemas.microsoft.com/ws/2006/02/transactions", 65)
303 X("MustUnderstand", 68)
314 X("NotUnderstood", 79)
319 X("EndpointReference", 84)
323 X("ReferenceProperties", 88)
324 X("RelationshipType", 89)
327 X("http://schemas.xmlsoap.org/ws/2006/02/addressingidentity", 92)
333 X("X509v3Certificate", 98)
334 X("http://www.w3.org/2005/08/addressing/fault", 99)
335 X("ReferenceParameters", 100)
336 X("IsReferenceParameter", 101)
337 X("http://www.w3.org/2005/08/addressing/reply", 102)
338 X("http://www.w3.org/2005/08/addressing/none", 103)
340 X("http://schemas.xmlsoap.org/ws/2004/08/addressing", 105)
341 X("http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous", 106)
342 X("http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", 107)
343 X("http://schemas.xmlsoap.org/ws/2004/06/addressingex", 108)
346 X("http://www.w3.org/2001/10/xml-exc-c14n#", 111)
348 X("InclusiveNamespaces", 113)
350 X("SecurityContextToken", 115)
357 X("http://schemas.xmlsoap.org/ws/2004/04/sc", 122)
358 X("http://schemas.xmlsoap.org/ws/2004/04/security/sc/dk", 123)
359 X("http://schemas.xmlsoap.org/ws/2004/04/security/sc/sct", 124)
360 X("http://schemas.xmlsoap.org/ws/2004/04/security/trust/RST/SCT", 125)
361 X("http://schemas.xmlsoap.org/ws/2004/04/security/trust/RSTR/SCT", 126)
362 X("RenewNeeded", 127)
363 X("BadContextToken", 128)
365 X("http://schemas.xmlsoap.org/ws/2005/02/sc/dk", 130)
366 X("http://schemas.xmlsoap.org/ws/2005/02/sc/sct", 131)
367 X("http://schemas.xmlsoap.org/ws/2005/02/trust/RST/SCT", 132)
368 X("http://schemas.xmlsoap.org/ws/2005/02/trust/RSTR/SCT", 133)
369 X("http://schemas.xmlsoap.org/ws/2005/02/trust/RST/SCT/Renew", 134)
370 X("http://schemas.xmlsoap.org/ws/2005/02/trust/RSTR/SCT/Renew", 135)
371 X("http://schemas.xmlsoap.org/ws/2005/02/trust/RST/SCT/Cancel", 136)
372 X("http://schemas.xmlsoap.org/ws/2005/02/trust/RSTR/SCT/Cancel", 137)
373 X("http://www.w3.org/2001/04/xmlenc#aes128-cbc", 138)
374 X("http://www.w3.org/2001/04/xmlenc#kw-aes128", 139)
375 X("http://www.w3.org/2001/04/xmlenc#aes192-cbc", 140)
376 X("http://www.w3.org/2001/04/xmlenc#kw-aes192", 141)
377 X("http://www.w3.org/2001/04/xmlenc#aes256-cbc", 142)
378 X("http://www.w3.org/2001/04/xmlenc#kw-aes256", 143)
379 X("http://www.w3.org/2001/04/xmlenc#des-cbc", 144)
380 X("http://www.w3.org/2000/09/xmldsig#dsa-sha1", 145)
381 X("http://www.w3.org/2001/10/xml-exc-c14n#WithComments", 146)
382 X("http://www.w3.org/2000/09/xmldsig#hmac-sha1", 147)
383 X("http://www.w3.org/2001/04/xmldsig-more#hmac-sha256", 148)
384 X("http://schemas.xmlsoap.org/ws/2005/02/sc/dk/p_sha1", 149)
385 X("http://www.w3.org/2001/04/xmlenc#ripemd160", 150)
386 X("http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p", 151)
387 X("http://www.w3.org/2000/09/xmldsig#rsa-sha1", 152)
388 X("http://www.w3.org/2001/04/xmldsig-more#rsa-sha256", 153)
389 X("http://www.w3.org/2001/04/xmlenc#rsa-1_5", 154)
390 X("http://www.w3.org/2000/09/xmldsig#sha1", 155)
391 X("http://www.w3.org/2001/04/xmlenc#sha256", 156)
392 X("http://www.w3.org/2001/04/xmlenc#sha512", 157)
393 X("http://www.w3.org/2001/04/xmlenc#tripledes-cbc", 158)
394 X("http://www.w3.org/2001/04/xmlenc#kw-tripledes", 159)
395 X("http://schemas.xmlsoap.org/2005/02/trust/tlsnego#TLS_Wrap", 160)
396 X("http://schemas.xmlsoap.org/2005/02/trust/spnego#GSS_Wrap", 161)
397 X("http://schemas.microsoft.com/ws/2006/05/security", 162)
401 X("PasswordText", 166)
403 X("UsernameToken", 168)
404 X("BinarySecurityToken", 169)
405 X("EncodingType", 170)
406 X("KeyIdentifier", 171)
407 X("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary", 172)
408 X("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#HexBinary", 173)
409 X("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Text", 174)
410 X("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509SubjectKeyIdentifier", 175)
411 X("http://docs.oasis-open.org/wss/oasis-wss-kerberos-token-profile-1.1#GSS_Kerberosv5_AP_REQ", 176)
412 X("http://docs.oasis-open.org/wss/oasis-wss-kerberos-token-profile-1.1#GSS_Kerberosv5_AP_REQ1510", 177)
413 X("http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.0#SAMLAssertionID", 178)
415 X("urn:oasis:names:tc:SAML:1.0:assertion", 180)
416 X("http://docs.oasis-open.org/wss/oasis-wss-rel-token-profile-1.0.pdf#license", 181)
417 X("FailedAuthentication", 182)
418 X("InvalidSecurityToken", 183)
419 X("InvalidSecurity", 184)
421 X("SignatureConfirmation", 186)
423 X("http://docs.oasis-open.org/wss/oasis-wss-soap-message-security-1.1#ThumbprintSHA1", 188)
424 X("http://docs.oasis-open.org/wss/oasis-wss-soap-message-security-1.1#EncryptedKey", 189)
425 X("http://docs.oasis-open.org/wss/oasis-wss-soap-message-security-1.1#EncryptedKeySHA1", 190)
426 X("http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1", 191)
427 X("http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0", 192)
428 X("http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLID", 193)
430 X("RequestSecurityTokenResponse", 195)
432 X("RequestedTokenReference", 197)
434 X("Authenticator", 199)
435 X("CombinedHash", 200)
436 X("BinaryExchange", 201)
438 X("RequestedSecurityToken", 203)
440 X("RequestedProofToken", 205)
441 X("ComputedKey", 206)
442 X("RequestSecurityToken", 207)
443 X("RequestType", 208)
445 X("BinarySecret", 210)
446 X("http://schemas.xmlsoap.org/ws/2005/02/trust/spnego", 211)
447 X("http://schemas.xmlsoap.org/ws/2005/02/trust/tlsnego", 212)
449 X("http://schemas.xmlsoap.org/ws/2004/04/trust", 214)
450 X("http://schemas.xmlsoap.org/ws/2004/04/security/trust/RST/Issue", 215)
451 X("http://schemas.xmlsoap.org/ws/2004/04/security/trust/RSTR/Issue", 216)
452 X("http://schemas.xmlsoap.org/ws/2004/04/security/trust/Issue", 217)
453 X("http://schemas.xmlsoap.org/ws/2004/04/security/trust/CK/PSHA1", 218)
454 X("http://schemas.xmlsoap.org/ws/2004/04/security/trust/SymmetricKey", 219)
455 X("http://schemas.xmlsoap.org/ws/2004/04/security/trust/Nonce", 220)
457 X("http://schemas.xmlsoap.org/ws/2004/04/trust/SymmetricKey", 222)
458 X("http://schemas.xmlsoap.org/ws/2004/04/trust/PublicKey", 223)
460 X("InvalidRequest", 225)
461 X("RequestFailed", 226)
463 X("EncryptWith", 228)
464 X("EncryptionAlgorithm", 229)
465 X("CanonicalizationAlgorithm", 230)
466 X("ComputedKeyAlgorithm", 231)
468 X("http://schemas.microsoft.com/net/2004/07/secext/WS-SPNego", 233)
469 X("http://schemas.microsoft.com/net/2004/07/secext/TLSNego", 234)
471 X("http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue", 236)
472 X("http://schemas.xmlsoap.org/ws/2005/02/trust/RSTR/Issue", 237)
473 X("http://schemas.xmlsoap.org/ws/2005/02/trust/Issue", 238)
474 X("http://schemas.xmlsoap.org/ws/2005/02/trust/SymmetricKey", 239)
475 X("http://schemas.xmlsoap.org/ws/2005/02/trust/CK/PSHA1", 240)
476 X("http://schemas.xmlsoap.org/ws/2005/02/trust/Nonce", 241)
477 X("RenewTarget", 242)
478 X("CancelTarget", 243)
479 X("RequestedTokenCancelled", 244)
480 X("RequestedAttachedReference", 245)
481 X("RequestedUnattachedReference", 246)
482 X("IssuedTokens", 247)
483 X("http://schemas.xmlsoap.org/ws/2005/02/trust/Renew", 248)
484 X("http://schemas.xmlsoap.org/ws/2005/02/trust/Cancel", 249)
485 X("http://schemas.xmlsoap.org/ws/2005/02/trust/PublicKey", 250)
487 X("AccessDecision", 252)
489 X("AssertionID", 254)
490 X("AssertionIDReference", 255)
492 X("AttributeName", 257)
493 X("AttributeNamespace", 258)
494 X("AttributeStatement", 259)
495 X("AttributeValue", 260)
497 X("AudienceRestrictionCondition", 262)
498 X("AuthenticationInstant", 263)
499 X("AuthenticationMethod", 264)
500 X("AuthenticationStatement", 265)
501 X("AuthorityBinding", 266)
502 X("AuthorityKind", 267)
503 X("AuthorizationDecisionStatement", 268)
508 X("DoNotCacheCondition", 273)
510 X("IssueInstant", 275)
513 X("MajorVersion", 278)
514 X("MinorVersion", 279)
515 X("NameIdentifier", 280)
517 X("NameQualifier", 282)
520 X("NotOnOrAfter", 285)
524 X("SubjectConfirmation", 289)
525 X("SubjectConfirmationData", 290)
526 X("ConfirmationMethod", 291)
527 X("urn:oasis:names:tc:SAML:1.0:cm:holder-of-key", 292)
528 X("urn:oasis:names:tc:SAML:1.0:cm:sender-vouches", 293)
529 X("SubjectLocality", 294)
532 X("SubjectStatement", 297)
533 X("urn:oasis:names:tc:SAML:1.0:am:unspecified", 298)
537 X("urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName", 302)
539 X("urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", 304)
541 X("ChannelInstance", 306)
542 X("http://schemas.microsoft.com/ws/2005/02/duplex", 307)
545 X("CarriedKeyName", 310)
547 X("EncryptedKey", 312)
548 X("KeyReference", 313)
550 X("http://www.w3.org/2001/04/xmlenc#Element", 315)
551 X("http://www.w3.org/2001/04/xmlenc#Content", 316)
555 X("RSAKeyValue", 320)
559 X("X509IssuerSerial", 324)
560 X("X509IssuerName", 325)
561 X("X509SerialNumber", 326)
562 X("X509Certificate", 327)
563 X("AckRequested", 328)
564 X("http://schemas.xmlsoap.org/ws/2005/02/rm/AckRequested", 329)
567 X("CreateSequence", 332)
568 X("http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence", 333)
569 X("CreateSequenceRefused", 334)
570 X("CreateSequenceResponse", 335)
571 X("http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequenceResponse", 336)
573 X("InvalidAcknowledgement", 338)
574 X("LastMessage", 339)
575 X("http://schemas.xmlsoap.org/ws/2005/02/rm/LastMessage", 340)
576 X("LastMessageNumberExceeded", 341)
577 X("MessageNumberRollover", 342)
582 X("SequenceFault", 347)
583 X("SequenceTerminated", 348)
584 X("TerminateSequence", 349)
585 X("http://schemas.xmlsoap.org/ws/2005/02/rm/TerminateSequence", 350)
586 X("UnknownSequence", 351)
587 X("http://schemas.microsoft.com/ws/2006/02/tx/oletx", 352)
589 X("OleTxTransaction", 354)
590 X("PropagationToken", 355)
591 X("http://schemas.xmlsoap.org/ws/2004/10/wscoor", 356)
593 X("CreateCoordinationContext", 358)
594 X("CreateCoordinationContextResponse", 359)
595 X("CoordinationContext", 360)
596 X("CurrentContext", 361)
597 X("CoordinationType", 362)
598 X("RegistrationService", 363)
600 X("RegisterResponse", 365)
601 X("ProtocolIdentifier", 366)
602 X("CoordinatorProtocolService", 367)
603 X("ParticipantProtocolService", 368)
604 X("http://schemas.xmlsoap.org/ws/2004/10/wscoor/CreateCoordinationContext", 369)
605 X("http://schemas.xmlsoap.org/ws/2004/10/wscoor/CreateCoordinationContextResponse", 370)
606 X("http://schemas.xmlsoap.org/ws/2004/10/wscoor/Register", 371)
607 X("http://schemas.xmlsoap.org/ws/2004/10/wscoor/RegisterResponse", 372)
608 X("http://schemas.xmlsoap.org/ws/2004/10/wscoor/fault", 373)
609 X("ActivationCoordinatorPortType", 374)
610 X("RegistrationCoordinatorPortType", 375)
611 X("InvalidState", 376)
612 X("InvalidProtocol", 377)
613 X("InvalidParameters", 378)
615 X("ContextRefused", 380)
616 X("AlreadyRegistered", 381)
617 X("http://schemas.xmlsoap.org/ws/2004/10/wsat", 382)
619 X("http://schemas.xmlsoap.org/ws/2004/10/wsat/Completion", 384)
620 X("http://schemas.xmlsoap.org/ws/2004/10/wsat/Durable2PC", 385)
621 X("http://schemas.xmlsoap.org/ws/2004/10/wsat/Volatile2PC", 386)
630 X("http://schemas.xmlsoap.org/ws/2004/10/wsat/Commit", 395)
631 X("http://schemas.xmlsoap.org/ws/2004/10/wsat/Rollback", 396)
632 X("http://schemas.xmlsoap.org/ws/2004/10/wsat/Committed", 397)
633 X("http://schemas.xmlsoap.org/ws/2004/10/wsat/Aborted", 398)
634 X("http://schemas.xmlsoap.org/ws/2004/10/wsat/Prepare", 399)
635 X("http://schemas.xmlsoap.org/ws/2004/10/wsat/Prepared", 400)
636 X("http://schemas.xmlsoap.org/ws/2004/10/wsat/ReadOnly", 401)
637 X("http://schemas.xmlsoap.org/ws/2004/10/wsat/Replay", 402)
638 X("http://schemas.xmlsoap.org/ws/2004/10/wsat/fault", 403)
639 X("CompletionCoordinatorPortType", 404)
640 X("CompletionParticipantPortType", 405)
641 X("CoordinatorPortType", 406)
642 X("ParticipantPortType", 407)
643 X("InconsistentInternalState", 408)
647 X("LocalTransactionId", 412)
648 X("IsolationLevel", 413)
649 X("IsolationFlags", 414)
650 X("Description", 415)
652 X("RegisterInfo", 417)
655 X("AccessDenied", 420)
656 X("InvalidPolicy", 421)
657 X("CoordinatorRegistrationFailed", 422)
658 X("TooManyEnlistments", 423)
661 X("http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics", 426)
662 X("http://docs.oasis-open.org/wss/oasis-wss-kerberos-token-profile-1.1#Kerberosv5APREQSHA1", 427)
663 X("http://schemas.xmlsoap.org/ws/2002/12/policy", 428)
664 X("FloodMessage", 429)
665 X("LinkUtility", 430)
667 X("http://schemas.microsoft.com/net/2006/05/peer/HopCount", 432)
669 X("http://schemas.microsoft.com/net/2006/05/peer", 434)
670 X("PeerFlooder", 435)
672 X("http://schemas.microsoft.com/ws/2005/05/routing", 437)
673 X("PacketRoutable", 438)
674 X("http://schemas.microsoft.com/ws/2005/05/addressing/none", 439)
675 X("http://schemas.microsoft.com/ws/2005/05/envelope/none", 440)
676 X("http://www.w3.org/2001/XMLSchema-instance", 441)
677 X("http://www.w3.org/2001/XMLSchema", 442)
683 X("unsignedByte", 448)
685 X("unsignedShort", 450)
687 X("unsignedInt", 452)
689 X("unsignedLong", 454)
695 X("base64Binary", 460)
710 X("positiveInteger", 475)
711 X("negativeInteger", 476)
712 X("nonPositiveInteger", 477)
713 X("nonNegativeInteger", 478)
714 X("normalizedString", 479)
715 X("ConnectionLimitReached", 480)
716 X("http://schemas.xmlsoap.org/soap/envelope/", 481)
719 X("faultstring", 484)
722 X("urn:oasis:names:tc:SAML:1.0:cm:bearer", 487)
726 static const ULONG dict_sorted
[] =
728 81, 91, 129, 314, 185, 164, 346, 66, 235, 305, 14, 6, 114, 97, 96, 94, 11, 95, 110, 451,
729 443, 121, 213, 7, 71, 82, 431, 343, 74, 75, 73, 59, 447, 445, 467, 163, 472, 463, 453, 409,
730 69, 286, 466, 444, 383, 67, 117, 26, 40, 345, 465, 90, 25, 77, 482, 455, 470, 344, 353, 80,
731 70, 449, 299, 331, 251, 330, 5, 253, 224, 390, 120, 76, 281, 4, 276, 56, 118, 436, 72, 394,
732 232, 464, 486, 456, 473, 459, 357, 393, 21, 269, 209, 54, 204, 55, 83, 35, 317, 196, 221, 321,
733 433, 387, 22, 78, 288, 419, 461, 446, 457, 474, 261, 272, 424, 308, 1, 274, 322, 93, 319, 202,
734 277, 416, 104, 318, 309, 165, 87, 85, 388, 389, 364, 300, 391, 52, 31, 227, 301, 167, 323, 458,
735 462, 411, 194, 8, 198, 179, 256, 392, 270, 418, 303, 337, 296, 13, 283, 284, 311, 12, 9, 41,
736 287, 53, 187, 18, 58, 483, 471, 468, 425, 49, 271, 295, 410, 116, 15, 379, 112, 119, 109, 42,
737 17, 485, 469, 254, 50, 206, 415, 20, 228, 339, 430, 435, 320, 127, 242, 208, 86, 484, 452, 420,
738 328, 210, 243, 200, 19, 170, 312, 429, 376, 275, 247, 313, 278, 279, 285, 166, 417, 460, 448, 454,
739 257, 199, 267, 46, 47, 421, 171, 32, 282, 79, 57, 226, 347, 168, 450, 252, 260, 201, 310, 380,
740 332, 361, 225, 414, 413, 68, 280, 438, 45, 325, 0, 128, 27, 306, 39, 60, 377, 184, 44, 294,
741 351, 327, 476, 475, 266, 362, 48, 354, 355, 365, 89, 297, 324, 326, 479, 381, 84, 378, 349, 98,
742 258, 259, 291, 412, 366, 348, 423, 478, 477, 169, 360, 406, 273, 229, 113, 407, 100, 88, 363, 205,
743 289, 24, 255, 264, 231, 182, 183, 101, 207, 115, 263, 334, 342, 186, 43, 480, 335, 338, 203, 30,
744 265, 244, 197, 23, 290, 230, 358, 408, 341, 367, 368, 245, 262, 195, 246, 374, 404, 405, 422, 268,
745 375, 442, 359, 37, 33, 3, 180, 487, 62, 155, 156, 157, 111, 2, 122, 16, 38, 316, 315, 144,
746 154, 481, 441, 103, 28, 382, 145, 152, 139, 141, 143, 150, 99, 102, 298, 214, 130, 63, 147, 138,
747 140, 142, 428, 356, 131, 292, 434, 159, 293, 307, 158, 10, 437, 151, 352, 162, 105, 403, 395, 402,
748 238, 241, 248, 153, 108, 398, 399, 373, 149, 249, 211, 148, 400, 401, 396, 132, 212, 146, 65, 123,
749 397, 340, 240, 133, 440, 124, 223, 384, 385, 371, 329, 250, 236, 34, 432, 107, 386, 237, 304, 234,
750 439, 333, 161, 222, 64, 239, 92, 233, 160, 134, 217, 220, 350, 136, 135, 137, 125, 426, 218, 126,
751 372, 215, 216, 106, 336, 29, 219, 61, 302, 193, 369, 191, 192, 181, 370, 178, 189, 36, 188, 51,
752 190, 174, 427, 176, 173, 177, 172, 175,
755 const struct dictionary dict_builtin_static
=
757 {{0xf93578f8,0x5852,0x4eb7,{0xa6,0xfc,0xe7,0x2b,0xb7,0x1d,0xb6,0x22}},
758 (WS_XML_STRING
*)dict_strings
, sizeof(dict_strings
)/sizeof(dict_strings
[0]), TRUE
},
762 /**************************************************************************
763 * WsGetDictionary [webservices.@]
765 HRESULT WINAPI
WsGetDictionary( WS_ENCODING encoding
, WS_XML_DICTIONARY
**dict
, WS_ERROR
*error
)
767 TRACE( "%u %p %p\n", encoding
, dict
, error
);
768 if (error
) FIXME( "ignoring error parameter\n" );
770 if (!dict
) return E_INVALIDARG
;
772 if (encoding
== WS_ENCODING_XML_BINARY_1
|| encoding
== WS_ENCODING_XML_BINARY_SESSION_1
)
773 *dict
= (WS_XML_DICTIONARY
*)&dict_builtin_static
;
780 /**************************************************************************
781 * WsXmlStringEquals [webservices.@]
783 HRESULT WINAPI
WsXmlStringEquals( const WS_XML_STRING
*str1
, const WS_XML_STRING
*str2
, WS_ERROR
*error
)
785 TRACE( "%s %s %p\n", debugstr_xmlstr(str1
), debugstr_xmlstr(str2
), error
);
786 if (error
) FIXME( "ignoring error parameter\n" );
788 if (!str1
|| !str2
) return E_INVALIDARG
;
790 if (str1
->length
!= str2
->length
) return S_FALSE
;
791 if (!memcmp( str1
->bytes
, str2
->bytes
, str1
->length
)) return S_OK
;