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