BinaryMessageEncodingBindingElementTest.cs 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459
  1. //
  2. // BinaryMessageEncodingBindingElementTest.cs
  3. //
  4. // Author:
  5. // Atsushi Enomoto <[email protected]>
  6. //
  7. // Copyright (C) 2009 Novell, Inc. http://www.novell.com
  8. //
  9. // Permission is hereby granted, free of charge, to any person obtaining
  10. // a copy of this software and associated documentation files (the
  11. // "Software"), to deal in the Software without restriction, including
  12. // without limitation the rights to use, copy, modify, merge, publish,
  13. // distribute, sublicense, and/or sell copies of the Software, and to
  14. // permit persons to whom the Software is furnished to do so, subject to
  15. // the following conditions:
  16. //
  17. // The above copyright notice and this permission notice shall be
  18. // included in all copies or substantial portions of the Software.
  19. //
  20. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  21. // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  22. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  23. // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  24. // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  25. // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  26. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  27. //
  28. using System;
  29. using System.Collections.ObjectModel;
  30. using System.IO;
  31. using System.Net.Sockets;
  32. using System.ServiceModel;
  33. using System.ServiceModel.Channels;
  34. using System.ServiceModel.Description;
  35. using System.Text;
  36. using System.Xml;
  37. using NUnit.Framework;
  38. using Element = System.ServiceModel.Channels.BinaryMessageEncodingBindingElement;
  39. namespace MonoTests.System.ServiceModel.Channels
  40. {
  41. [TestFixture]
  42. public class BinaryMessageEncodingBindingElementTest
  43. {
  44. [Test]
  45. public void DefaultValues ()
  46. {
  47. Element el = new Element ();
  48. Assert.AreEqual (64, el.MaxReadPoolSize, "#1");
  49. Assert.AreEqual (16, el.MaxWritePoolSize, "#2");
  50. Assert.AreEqual (MessageVersion.Default, el.MessageVersion, "#3");
  51. // FIXME: test ReaderQuotas
  52. }
  53. [Test]
  54. [ExpectedException (typeof (ArgumentNullException))]
  55. public void BuildChannelListenerNullArg ()
  56. {
  57. new Element ().BuildChannelListener<IReplyChannel> (null);
  58. }
  59. [Test]
  60. public void CanBuildChannelFactory ()
  61. {
  62. CustomBinding cb = new CustomBinding (
  63. new HttpTransportBindingElement ());
  64. BindingContext ctx = new BindingContext (
  65. cb, new BindingParameterCollection ());
  66. Element el = new Element ();
  67. Assert.IsTrue (el.CanBuildChannelFactory<IRequestChannel> (ctx), "#1");
  68. Assert.IsFalse (el.CanBuildChannelFactory<IRequestSessionChannel> (ctx), "#2");
  69. }
  70. [Test]
  71. public void BuildChannelFactory ()
  72. {
  73. CustomBinding cb = new CustomBinding (
  74. new HttpTransportBindingElement ());
  75. BindingContext ctx = new BindingContext (
  76. cb, new BindingParameterCollection ());
  77. Element el = new Element ();
  78. IChannelFactory<IRequestChannel> cf =
  79. el.BuildChannelFactory<IRequestChannel> (ctx);
  80. }
  81. [Test]
  82. [ExpectedException (typeof (InvalidOperationException))]
  83. public void BuildChannelListenerEmptyCustomBinding ()
  84. {
  85. CustomBinding cb = new CustomBinding ();
  86. BindingContext ctx = new BindingContext (
  87. cb, new BindingParameterCollection ());
  88. new Element ().BuildChannelListener<IReplyChannel> (ctx);
  89. }
  90. [Test]
  91. public void BuildChannelListenerWithTransport ()
  92. {
  93. CustomBinding cb = new CustomBinding (
  94. new HttpTransportBindingElement ());
  95. BindingContext ctx = new BindingContext (
  96. cb, new BindingParameterCollection (),
  97. new Uri ("http://localhost:8080"), String.Empty, ListenUriMode.Unique);
  98. new Element ().BuildChannelListener<IReplyChannel> (ctx);
  99. }
  100. [Test]
  101. [ExpectedException (typeof (ProtocolException))]
  102. public void ReadMessageWrongContentType ()
  103. {
  104. var encoder = new BinaryMessageEncodingBindingElement ().CreateMessageEncoderFactory ().Encoder;
  105. encoder.ReadMessage (new MemoryStream (new byte [0]), 100, "application/octet-stream");
  106. }
  107. [Test]
  108. public void ReadMessage ()
  109. {
  110. using (var ms = File.OpenRead ("Test/System.ServiceModel.Channels/binary-message.raw")) {
  111. var session = new XmlBinaryReaderSession ();
  112. byte [] rsbuf = new BinaryFrameSupportReader (ms).ReadSizedChunk ();
  113. int count = 0;
  114. using (var rms = new MemoryStream (rsbuf, 0, rsbuf.Length)) {
  115. var rbr = new BinaryReader (rms, Encoding.UTF8);
  116. while (rms.Position < rms.Length)
  117. session.Add (count++, rbr.ReadString ());
  118. }
  119. var xr = XmlDictionaryReader.CreateBinaryReader (ms, BinaryFrameSupportReader.soap_dictionary, new XmlDictionaryReaderQuotas (), session);
  120. string soapNS = "http://www.w3.org/2003/05/soap-envelope";
  121. string addrNS = "http://www.w3.org/2005/08/addressing";
  122. string xmlnsNS = "http://www.w3.org/2000/xmlns/";
  123. string peerNS = "http://schemas.microsoft.com/net/2006/05/peer";
  124. xr.MoveToContent ();
  125. AssertNode (xr, 0, XmlNodeType.Element, "s", "Envelope", soapNS, String.Empty, "#1");
  126. Assert.AreEqual (2, xr.AttributeCount, "#1-1-1");
  127. Assert.IsTrue (xr.MoveToAttribute ("s", xmlnsNS), "#1-2");
  128. AssertNode (xr, 1, XmlNodeType.Attribute, "xmlns", "s", xmlnsNS, soapNS, "#2");
  129. Assert.IsTrue (xr.MoveToAttribute ("a", xmlnsNS), "#2-2");
  130. AssertNode (xr, 1, XmlNodeType.Attribute, "xmlns", "a", xmlnsNS, addrNS, "#3");
  131. Assert.IsTrue (xr.Read (), "#3-2");
  132. AssertNode (xr, 1, XmlNodeType.Element, "s", "Header", soapNS, String.Empty, "#4");
  133. Assert.IsTrue (xr.Read (), "#4-2");
  134. AssertNode (xr, 2, XmlNodeType.Element, "a", "Action", addrNS, String.Empty, "#5");
  135. Assert.IsTrue (xr.MoveToAttribute ("mustUnderstand", soapNS), "#5-2");
  136. AssertNode (xr, 3, XmlNodeType.Attribute, "s", "mustUnderstand", soapNS, "1", "#6");
  137. Assert.IsTrue (xr.Read (), "#6-2");
  138. AssertNode (xr, 3, XmlNodeType.Text, "", "", "", "http://schemas.microsoft.com/net/2006/05/peer/resolver/Resolve", "#7");
  139. Assert.IsTrue (xr.Read (), "#7-2");
  140. AssertNode (xr, 2, XmlNodeType.EndElement, "a", "Action", addrNS, String.Empty, "#8");
  141. Assert.IsTrue (xr.Read (), "#8-2");
  142. AssertNode (xr, 2, XmlNodeType.Element, "a", "MessageID", addrNS, String.Empty, "#9");
  143. Assert.IsTrue (xr.Read (), "#9-2");
  144. Assert.AreEqual (XmlNodeType.Text, xr.NodeType, "#10");
  145. Assert.IsTrue (xr.Read (), "#10-2");
  146. AssertNode (xr, 2, XmlNodeType.EndElement, "a", "MessageID", addrNS, String.Empty, "#11");
  147. Assert.IsTrue (xr.Read (), "#11-2"); // -> a:ReplyTo
  148. AssertNode (xr, 2, XmlNodeType.Element, "a", "ReplyTo", addrNS, String.Empty, "#12");
  149. xr.Skip (); // -> a:To
  150. AssertNode (xr, 2, XmlNodeType.Element, "a", "To", addrNS, String.Empty, "#13");
  151. xr.Skip (); // -> /s:Header
  152. AssertNode (xr, 1, XmlNodeType.EndElement, "s", "Header", soapNS, String.Empty, "#14");
  153. Assert.IsTrue (xr.Read (), "#14-2");
  154. AssertNode (xr, 1, XmlNodeType.Element, "s", "Body", soapNS, String.Empty, "#15");
  155. Assert.IsTrue (xr.Read (), "#15-2");
  156. AssertNode (xr, 2, XmlNodeType.Element, "", "Resolve", peerNS, String.Empty, "#16");
  157. Assert.IsTrue (xr.MoveToAttribute ("xmlns"), "#16-2");
  158. AssertNode (xr, 3, XmlNodeType.Attribute, "", "xmlns", xmlnsNS, peerNS, "#17");
  159. Assert.IsTrue (xr.Read (), "#17-2");
  160. AssertNode (xr, 3, XmlNodeType.Element, "", "ClientId", peerNS, String.Empty, "#18");
  161. /*
  162. while (!xr.EOF) {
  163. xr.Read ();
  164. Console.WriteLine ("{0}: {1}:{2} {3} {4}", xr.NodeType, xr.Prefix, xr.LocalName, xr.NamespaceURI, xr.Value);
  165. for (int i = 0; i < xr.AttributeCount; i++) {
  166. xr.MoveToAttribute (i);
  167. Console.WriteLine (" Attribute: {0}:{1} {2} {3}", xr.Prefix, xr.LocalName, xr.NamespaceURI, xr.Value);
  168. }
  169. }
  170. */
  171. }
  172. }
  173. [Test]
  174. public void ConnectionTcpTransport ()
  175. {
  176. var host = new ServiceHost (typeof (Foo));
  177. var bindingsvc = new CustomBinding (new BindingElement [] {
  178. new BinaryMessageEncodingBindingElement (),
  179. new TcpTransportBindingElement () });
  180. host.AddServiceEndpoint (typeof (IFoo), bindingsvc, "net.tcp://localhost:37564/");
  181. host.Description.Behaviors.Find<ServiceBehaviorAttribute> ().IncludeExceptionDetailInFaults = true;
  182. host.Open (TimeSpan.FromSeconds (5));
  183. try {
  184. for (int i = 0; i < 2; i++) {
  185. var bindingcli = new NetTcpBinding ();
  186. bindingcli.Security.Mode = SecurityMode.None;
  187. var cli = new ChannelFactory<IFooClient> (bindingcli, new EndpointAddress ("net.tcp://localhost:37564/")).CreateChannel ();
  188. Assert.AreEqual ("test for echo", cli.Echo ("TEST FOR ECHO"), "#1");
  189. var sid = cli.SessionId;
  190. Assert.AreEqual (3000, cli.Add (1000, 2000), "#2");
  191. Assert.AreEqual (sid, cli.SessionId, "#3");
  192. cli.Close ();
  193. }
  194. } finally {
  195. host.Close (TimeSpan.FromSeconds (5));
  196. var t = new TcpListener (37564);
  197. t.Start ();
  198. t.Stop ();
  199. }
  200. }
  201. [Test]
  202. public void ConnectionHttpTransport ()
  203. {
  204. var host = new ServiceHost (typeof (Foo));
  205. var bindingsvc = new CustomBinding (new BindingElement [] {
  206. new BinaryMessageEncodingBindingElement (),
  207. new HttpTransportBindingElement () });
  208. host.AddServiceEndpoint (typeof (IFoo), bindingsvc, "http://localhost:37564/");
  209. host.Description.Behaviors.Find<ServiceBehaviorAttribute> ().IncludeExceptionDetailInFaults = true;
  210. host.Open (TimeSpan.FromSeconds (5));
  211. try {
  212. for (int i = 0; i < 2; i++) {
  213. var bindingcli = new CustomBinding (new BindingElement [] {
  214. new BinaryMessageEncodingBindingElement (),
  215. new HttpTransportBindingElement () });
  216. var cli = new ChannelFactory<IFooClient> (bindingcli, new EndpointAddress ("http://localhost:37564/")).CreateChannel ();
  217. Assert.AreEqual ("test for echo", cli.Echo ("TEST FOR ECHO"), "#1");
  218. var sid = cli.SessionId;
  219. Assert.AreEqual (3000, cli.Add (1000, 2000), "#2");
  220. Assert.AreEqual (sid, cli.SessionId, "#3");
  221. cli.Close ();
  222. }
  223. } finally {
  224. host.Close (TimeSpan.FromSeconds (5));
  225. var t = new TcpListener (37564);
  226. t.Start ();
  227. t.Stop ();
  228. }
  229. }
  230. public interface IFooClient : IFoo, IClientChannel
  231. {
  232. }
  233. [ServiceContract]
  234. public interface IFoo
  235. {
  236. [OperationContract]
  237. string Echo (string msg);
  238. [OperationContract]
  239. uint Add (uint v1, uint v2);
  240. }
  241. class Foo : IFoo
  242. {
  243. public string Echo (string msg)
  244. {
  245. return msg.ToLower ();
  246. }
  247. public uint Add (uint v1, uint v2)
  248. {
  249. return v1 + v2;
  250. }
  251. }
  252. void AssertNode (XmlReader reader, int depth, XmlNodeType nodeType, string prefix, string localName, string ns, string value, string label)
  253. {
  254. Assert.AreEqual (nodeType, reader.NodeType, label + ".NodeType");
  255. Assert.AreEqual (localName, reader.LocalName, label + ".LocalName");
  256. Assert.AreEqual (prefix, reader.Prefix, label + ".Prefix");
  257. Assert.AreEqual (ns, reader.NamespaceURI, label + ".NS");
  258. Assert.AreEqual (value, reader.Value, label + ".Value");
  259. Assert.AreEqual (depth, reader.Depth, label + ".Depth");
  260. }
  261. }
  262. class BinaryFrameSupportReader : BinaryReader
  263. {
  264. public BinaryFrameSupportReader (Stream s)
  265. : base (s)
  266. {
  267. }
  268. public byte [] ReadSizedChunk ()
  269. {
  270. int length = Read7BitEncodedInt ();
  271. if (length > 65536)
  272. throw new InvalidOperationException ("The message is too large.");
  273. byte [] buffer = new byte [length];
  274. Read (buffer, 0, length);
  275. return buffer;
  276. }
  277. // Copied from BinaryMessageEncoder.cs.
  278. internal static XmlDictionary soap_dictionary;
  279. // See [MC-NBFS] in Microsoft OSP. The strings are copied from the PDF, so the actual values might be wrong.
  280. static readonly string [] dict_strings = {
  281. "mustUnderstand", "Envelope",
  282. "http://www.w3.org/2003/05/soap-envelope",
  283. "http://www.w3.org/2005/08/addressing", "Header", "Action", "To", "Body", "Algorithm", "RelatesTo",
  284. "http://www.w3.org/2005/08/addressing/anonymous", "URI", "Reference", "MessageID", "Id", "Identifier",
  285. "http://schemas.xmlsoap.org/ws/2005/02/rm", "Transforms", "Transform", "DigestMethod", "DigestValue", "Address", "ReplyTo", "SequenceAcknowledgement", "AcknowledgementRange", "Upper", "Lower", "BufferRemaining",
  286. "http://schemas.microsoft.com/ws/2006/05/rm",
  287. "http://schemas.xmlsoap.org/ws/2005/02/rm/SequenceAcknowledgement", "SecurityTokenReference", "Sequence", "MessageNumber",
  288. "http://www.w3.org/2000/09/xmldsig#",
  289. "http://www.w3.org/2000/09/xmldsig#enveloped-signature", "KeyInfo",
  290. "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd",
  291. "http://www.w3.org/2001/04/xmlenc#",
  292. "http://schemas.xmlsoap.org/ws/2005/02/sc", "DerivedKeyToken", "Nonce", "Signature", "SignedInfo", "CanonicalizationMethod", "SignatureMethod", "SignatureValue", "DataReference", "EncryptedData", "EncryptionMethod", "CipherData", "CipherValue",
  293. "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd", "Security", "Timestamp", "Created", "Expires", "Length", "ReferenceList", "ValueType", "Type", "EncryptedHeader",
  294. "http://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd", "RequestSecurityTokenResponseCollection",
  295. "http://schemas.xmlsoap.org/ws/2005/02/trust",
  296. "http://schemas.xmlsoap.org/ws/2005/02/trust#BinarySecret",
  297. "http://schemas.microsoft.com/ws/2006/02/transactions", "s", "Fault", "MustUnderstand", "role", "relay", "Code", "Reason", "Text", "Node", "Role", "Detail", "Value", "Subcode", "NotUnderstood", "qname", "", "From", "FaultTo", "EndpointReference", "PortType", "ServiceName", "PortName", "ReferenceProperties", "RelationshipType", "Reply", "a",
  298. "http://schemas.xmlsoap.org/ws/2006/02/addressingidentity", "Identity", "Spn", "Upn", "Rsa", "Dns", "X509v3Certificate",
  299. "http://www.w3.org/2005/08/addressing/fault", "ReferenceParameters", "IsReferenceParameter",
  300. "http://www.w3.org/2005/08/addressing/reply",
  301. "http://www.w3.org/2005/08/addressing/none", "Metadata",
  302. "http://schemas.xmlsoap.org/ws/2004/08/addressing",
  303. "http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous",
  304. "http://schemas.xmlsoap.org/ws/2004/08/addressing/fault",
  305. "http://schemas.xmlsoap.org/ws/2004/06/addressingex", "RedirectTo", "Via",
  306. "http://www.w3.org/2001/10/xml-exc-c14n#", "PrefixList", "InclusiveNamespaces", "ec", "SecurityContextToken", "Generation", "Label", "Offset", "Properties", "Cookie", "wsc",
  307. "http://schemas.xmlsoap.org/ws/2004/04/sc",
  308. "http://schemas.xmlsoap.org/ws/2004/04/security/sc/dk",
  309. "http://schemas.xmlsoap.org/ws/2004/04/security/sc/sct",
  310. "http://schemas.xmlsoap.org/ws/2004/04/security/trust/RST/SCT",
  311. "http://schemas.xmlsoap.org/ws/2004/04/security/trust/RSTR/SCT", "RenewNeeded", "BadContextToken", "c",
  312. "http://schemas.xmlsoap.org/ws/2005/02/sc/dk",
  313. "http://schemas.xmlsoap.org/ws/2005/02/sc/sct",
  314. "http://schemas.xmlsoap.org/ws/2005/02/trust/RST/SCT",
  315. "http://schemas.xmlsoap.org/ws/2005/02/trust/RSTR/SCT",
  316. "http://schemas.xmlsoap.org/ws/2005/02/trust/RST/SCT/Renew",
  317. "http://schemas.xmlsoap.org/ws/2005/02/trust/RSTR/SCT/Renew",
  318. "http://schemas.xmlsoap.org/ws/2005/02/trust/RST/SCT/Cancel",
  319. "http://schemas.xmlsoap.org/ws/2005/02/trust/RSTR/SCT/Cancel",
  320. "http://www.w3.org/2001/04/xmlenc#aes128-cbc",
  321. "http://www.w3.org/2001/04/xmlenc#kw-aes128",
  322. "http://www.w3.org/2001/04/xmlenc#aes192-cbc",
  323. "http://www.w3.org/2001/04/xmlenc#kw-aes192",
  324. "http://www.w3.org/2001/04/xmlenc#aes256-cbc",
  325. "http://www.w3.org/2001/04/xmlenc#kw-aes256",
  326. "http://www.w3.org/2001/04/xmlenc#des-cbc",
  327. "http://www.w3.org/2000/09/xmldsig#dsa-sha1",
  328. "http://www.w3.org/2001/10/xml-exc-c14n#WithComments",
  329. "http://www.w3.org/2000/09/xmldsig#hmac-sha1",
  330. "http://www.w3.org/2001/04/xmldsig-more#hmac-sha256",
  331. "http://schemas.xmlsoap.org/ws/2005/02/sc/dk/p_sha1",
  332. "http://www.w3.org/2001/04/xmlenc#ripemd160",
  333. "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p",
  334. "http://www.w3.org/2000/09/xmldsig#rsa-sha1",
  335. "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256",
  336. "http://www.w3.org/2001/04/xmlenc#rsa-1_5",
  337. "http://www.w3.org/2000/09/xmldsig#sha1",
  338. "http://www.w3.org/2001/04/xmlenc#sha256",
  339. "http://www.w3.org/2001/04/xmlenc#sha512",
  340. "http://www.w3.org/2001/04/xmlenc#tripledes-cbc",
  341. "http://www.w3.org/2001/04/xmlenc#kw-tripledes",
  342. "http://schemas.xmlsoap.org/2005/02/trust/tlsnego#TLS_Wrap",
  343. "http://schemas.xmlsoap.org/2005/02/trust/spnego#GSS_Wrap",
  344. "http://schemas.microsoft.com/ws/2006/05/security", "dnse", "o", "Password", "PasswordText", "Username", "UsernameToken", "BinarySecurityToken", "EncodingType", "KeyIdentifier",
  345. "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary",
  346. "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#HexBinary",
  347. "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Text",
  348. "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509SubjectKeyIdentifier",
  349. "http://docs.oasis-open.org/wss/oasis-wss-kerberos-token-profile-1.1#GSS_Kerberosv5_AP_REQ",
  350. "http://docs.oasis-open.org/wss/oasis-wss-kerberos-token-profile-1.1#GSS_Kerberosv5_AP_REQ1510",
  351. "http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.0#SAMLAssertionID", "Assertion", "urn:oasis:names:tc:SAML:1.0:assertion",
  352. "http://docs.oasis-open.org/wss/oasis-wss-rel-token-profile-1.0.pdf#license", "FailedAuthentication", "InvalidSecurityToken", "InvalidSecurity", "k", "SignatureConfirmation", "TokenType",
  353. "http://docs.oasis-open.org/wss/oasis-wss-soap-message-security-1.1#ThumbprintSHA1",
  354. "http://docs.oasis-open.org/wss/oasis-wss-soap-message-security-1.1#EncryptedKey",
  355. "http://docs.oasis-open.org/wss/oasis-wss-soap-message-security-1.1#EncryptedKeySHA1",
  356. "http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1",
  357. "http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0",
  358. "http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLID", "AUTH-HASH", "RequestSecurityTokenResponse", "KeySize", "RequestedTokenReference", "AppliesTo", "Authenticator", "CombinedHash", "BinaryExchange", "Lifetime", "RequestedSecurityToken", "Entropy", "RequestedProofToken", "ComputedKey", "RequestSecurityToken", "RequestType", "Context", "BinarySecret",
  359. "http://schemas.xmlsoap.org/ws/2005/02/trust/spnego",
  360. "http://schemas.xmlsoap.org/ws/2005/02/trust/tlsnego", "wst",
  361. "http://schemas.xmlsoap.org/ws/2004/04/trust",
  362. "http://schemas.xmlsoap.org/ws/2004/04/security/trust/RST/Issue",
  363. "http://schemas.xmlsoap.org/ws/2004/04/security/trust/RSTR/Issue",
  364. "http://schemas.xmlsoap.org/ws/2004/04/security/trust/Issue",
  365. "http://schemas.xmlsoap.org/ws/2004/04/security/trust/CK/PSHA1",
  366. "http://schemas.xmlsoap.org/ws/2004/04/security/trust/SymmetricKey",
  367. "http://schemas.xmlsoap.org/ws/2004/04/security/trust/Nonce", "KeyType",
  368. "http://schemas.xmlsoap.org/ws/2004/04/trust/SymmetricKey",
  369. "http://schemas.xmlsoap.org/ws/2004/04/trust/PublicKey", "Claims", "InvalidRequest", "RequestFailed", "SignWith", "EncryptWith", "EncryptionAlgorithm", "CanonicalizationAlgorithm", "ComputedKeyAlgorithm", "UseKey",
  370. "http://schemas.microsoft.com/net/2004/07/secext/WS-SPNego",
  371. "http://schemas.microsoft.com/net/2004/07/secext/TLSNego", "t",
  372. "http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue",
  373. "http://schemas.xmlsoap.org/ws/2005/02/trust/RSTR/Issue",
  374. "http://schemas.xmlsoap.org/ws/2005/02/trust/Issue",
  375. "http://schemas.xmlsoap.org/ws/2005/02/trust/SymmetricKey",
  376. "http://schemas.xmlsoap.org/ws/2005/02/trust/CK/PSHA1",
  377. "http://schemas.xmlsoap.org/ws/2005/02/trust/Nonce", "RenewTarget", "CancelTarget", "RequestedTokenCancelled", "RequestedAttachedReference", "RequestedUnattachedReference", "IssuedTokens",
  378. "http://schemas.xmlsoap.org/ws/2005/02/trust/Renew",
  379. "http://schemas.xmlsoap.org/ws/2005/02/trust/Cancel",
  380. "http://schemas.xmlsoap.org/ws/2005/02/trust/PublicKey", "Access", "AccessDecision", "Advice", "AssertionID", "AssertionIDReference", "Attribute", "AttributeName", "AttributeNamespace", "AttributeStatement", "AttributeValue", "Audience", "AudienceRestrictionCondition", "AuthenticationInstant", "AuthenticationMethod", "AuthenticationStatement", "AuthorityBinding", "AuthorityKind", "AuthorizationDecisionStatement", "Binding", "Condition", "Conditions", "Decision", "DoNotCacheCondition", "Evidence", "IssueInstant", "Issuer", "Location", "MajorVersion", "MinorVersion", "NameIdentifier", "Format", "NameQualifier", "Namespace", "NotBefore", "NotOnOrAfter", "saml", "Statement", "Subject", "SubjectConfirmation", "SubjectConfirmationData", "ConfirmationMethod", "urn:oasis:names:tc:SAML:1.0:cm:holder-of-key", "urn:oasis:names:tc:SAML:1.0:cm:sender-vouches", "SubjectLocality", "DNSAddress", "IPAddress", "SubjectStatement", "urn:oasis:names:tc:SAML:1.0:am:unspecified", "xmlns", "Resource", "UserName", "urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName", "EmailName", "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", "u", "ChannelInstance",
  381. "http://schemas.microsoft.com/ws/2005/02/duplex", "Encoding", "MimeType", "CarriedKeyName", "Recipient", "EncryptedKey", "KeyReference", "e",
  382. "http://www.w3.org/2001/04/xmlenc#Element",
  383. "http://www.w3.org/2001/04/xmlenc#Content", "KeyName", "MgmtData", "KeyValue", "RSAKeyValue", "Modulus", "Exponent", "X509Data", "X509IssuerSerial", "X509IssuerName", "X509SerialNumber", "X509Certificate", "AckRequested",
  384. "http://schemas.xmlsoap.org/ws/2005/02/rm/AckRequested", "AcksTo", "Accept", "CreateSequence",
  385. "http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence", "CreateSequenceRefused", "CreateSequenceResponse",
  386. "http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequenceResponse", "FaultCode", "InvalidAcknowledgement", "LastMessage",
  387. "http://schemas.xmlsoap.org/ws/2005/02/rm/LastMessage", "LastMessageNumberExceeded", "MessageNumberRollover", "Nack", "netrm", "Offer", "r", "SequenceFault", "SequenceTerminated", "TerminateSequence",
  388. "http://schemas.xmlsoap.org/ws/2005/02/rm/TerminateSequence", "UnknownSequence",
  389. "http://schemas.microsoft.com/ws/2006/02/tx/oletx", "oletx", "OleTxTransaction", "PropagationToken",
  390. "http://schemas.xmlsoap.org/ws/2004/10/wscoor", "wscoor", "CreateCoordinationContext", "CreateCoordinationContextResponse", "CoordinationContext", "CurrentContext", "CoordinationType", "RegistrationService", "Register", "RegisterResponse", "ProtocolIdentifier", "CoordinatorProtocolService", "ParticipantProtocolService",
  391. "http://schemas.xmlsoap.org/ws/2004/10/wscoor/CreateCoordinationContext",
  392. "http://schemas.xmlsoap.org/ws/2004/10/wscoor/CreateCoordinationContextResponse",
  393. "http://schemas.xmlsoap.org/ws/2004/10/wscoor/Register",
  394. "http://schemas.xmlsoap.org/ws/2004/10/wscoor/RegisterResponse",
  395. "http://schemas.xmlsoap.org/ws/2004/10/wscoor/fault", "ActivationCoordinatorPortType", "RegistrationCoordinatorPortType", "InvalidState", "InvalidProtocol", "InvalidParameters", "NoActivity", "ContextRefused", "AlreadyRegistered",
  396. "http://schemas.xmlsoap.org/ws/2004/10/wsat", "wsat",
  397. "http://schemas.xmlsoap.org/ws/2004/10/wsat/Completion",
  398. "http://schemas.xmlsoap.org/ws/2004/10/wsat/Durable2PC",
  399. "http://schemas.xmlsoap.org/ws/2004/10/wsat/Volatile2PC", "Prepare", "Prepared", "ReadOnly", "Commit", "Rollback", "Committed", "Aborted", "Replay",
  400. "http://schemas.xmlsoap.org/ws/2004/10/wsat/Commit",
  401. "http://schemas.xmlsoap.org/ws/2004/10/wsat/Rollback",
  402. "http://schemas.xmlsoap.org/ws/2004/10/wsat/Committed",
  403. "http://schemas.xmlsoap.org/ws/2004/10/wsat/Aborted",
  404. "http://schemas.xmlsoap.org/ws/2004/10/wsat/Prepare",
  405. "http://schemas.xmlsoap.org/ws/2004/10/wsat/Prepared",
  406. "http://schemas.xmlsoap.org/ws/2004/10/wsat/ReadOnly",
  407. "http://schemas.xmlsoap.org/ws/2004/10/wsat/Replay",
  408. "http://schemas.xmlsoap.org/ws/2004/10/wsat/fault", "CompletionCoordinatorPortType", "CompletionParticipantPortType", "CoordinatorPortType", "ParticipantPortType", "InconsistentInternalState", "mstx", "Enlistment", "protocol", "LocalTransactionId", "IsolationLevel", "IsolationFlags", "Description", "Loopback", "RegisterInfo", "ContextId", "TokenId", "AccessDenied", "InvalidPolicy", "CoordinatorRegistrationFailed", "TooManyEnlistments", "Disabled", "ActivityId",
  409. "http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics",
  410. "http://docs.oasis-open.org/wss/oasis-wss-kerberos-token-profile-1.1#Kerberosv5APREQSHA1",
  411. "http://schemas.xmlsoap.org/ws/2002/12/policy", "FloodMessage", "LinkUtility", "Hops",
  412. "http://schemas.microsoft.com/net/2006/05/peer/HopCount", "PeerVia",
  413. "http://schemas.microsoft.com/net/2006/05/peer", "PeerFlooder", "PeerTo",
  414. "http://schemas.microsoft.com/ws/2005/05/routing", "PacketRoutable",
  415. "http://schemas.microsoft.com/ws/2005/05/addressing/none",
  416. "http://schemas.microsoft.com/ws/2005/05/envelope/none",
  417. "http://www.w3.org/2001/XMLSchema-instance",
  418. "http://www.w3.org/2001/XMLSchema", "nil", "type", "char", "boolean", "byte", "unsignedByte", "short", "unsignedShort", "int", "unsignedInt", "long", "unsignedLong", "float", "double", "decimal", "dateTime", "string", "base64Binary", "anyType", "duration", "guid", "anyURI", "QName", "time", "date", "hexBinary", "gYearMonth", "gYear", "gMonthDay", "gDay", "gMonth", "integer", "positiveInteger", "negativeInteger", "nonPositiveInteger", "nonNegativeInteger", "normalizedString", "ConnectionLimitReached",
  419. "http://schemas.xmlsoap.org/soap/envelope/", "Actor", "Faultcode", "Faultstring", "Faultactor", "Detail"
  420. };
  421. static BinaryFrameSupportReader ()
  422. {
  423. var d = new XmlDictionary ();
  424. soap_dictionary = d;
  425. foreach (var s in dict_strings)
  426. d.Add (s);
  427. }
  428. }
  429. }