1 //------------------------------------------------------------------------------ 2 // Copyright (c) Microsoft Corporation. All rights reserved. 3 //------------------------------------------------------------------------------ 4 5 namespace System.Web.Services.Configuration { 6 using System; 7 using System.Collections; 8 using System.Collections.Generic; 9 using System.Configuration; 10 using System.Globalization; 11 using System.Security.Permissions; 12 using System.Threading; 13 using System.Web; 14 using System.Web.Services.Description; 15 using System.Web.Services.Discovery; 16 using System.Web.Services.Protocols; 17 using System.Xml.Serialization; 18 using System.Runtime.CompilerServices; 19 20 public sealed class WebServicesSection : ConfigurationSection { WebServicesSection()21 public WebServicesSection() : base() { 22 this.properties.Add(this.conformanceWarnings); 23 this.properties.Add(this.protocols); 24 this.properties.Add(this.serviceDescriptionFormatExtensionTypes); 25 this.properties.Add(this.soapEnvelopeProcessing); 26 this.properties.Add(this.soapExtensionImporterTypes); 27 this.properties.Add(this.soapExtensionReflectorTypes); 28 this.properties.Add(this.soapExtensionTypes); 29 this.properties.Add(this.soapTransportImporterTypes); 30 this.properties.Add(this.wsdlHelpGenerator); 31 this.properties.Add(this.soapServerProtocolFactoryType); 32 this.properties.Add(this.diagnostics); 33 } 34 35 static object ClassSyncObject { 36 get { 37 if (classSyncObject == null) { 38 object o = new object(); 39 Interlocked.CompareExchange(ref classSyncObject, o, null); 40 } 41 return classSyncObject; 42 } 43 } 44 45 [ConfigurationProperty("conformanceWarnings")] 46 public WsiProfilesElementCollection ConformanceWarnings { 47 get { return (WsiProfilesElementCollection)base[this.conformanceWarnings]; } 48 } 49 50 internal WsiProfiles EnabledConformanceWarnings { 51 get { 52 WsiProfiles retval = WsiProfiles.None; 53 foreach (WsiProfilesElement element in this.ConformanceWarnings) { 54 retval |= element.Name; 55 } 56 57 return retval; 58 } 59 } 60 61 public static WebServicesSection Current { 62 get { 63 WebServicesSection retval = null; 64 65 // check to see if we are running on the server without loading system.web.dll 66 if (Thread.GetDomain().GetData(".appDomain") != null) { 67 retval = GetConfigFromHttpContext(); 68 } 69 if (retval == null) { 70 retval = (WebServicesSection)PrivilegedConfigurationManager.GetSection(WebServicesSection.SectionName); 71 } 72 return retval; 73 } 74 } 75 76 [ConfigurationPermission(SecurityAction.Assert, Unrestricted = true)] 77 [MethodImplAttribute(MethodImplOptions.NoInlining)] GetConfigFromHttpContext()78 static WebServicesSection GetConfigFromHttpContext() { 79 PartialTrustHelpers.FailIfInPartialTrustOutsideAspNet(); 80 HttpContext context = HttpContext.Current; 81 if (context != null) { 82 return (WebServicesSection)context.GetSection(WebServicesSection.SectionName); 83 } 84 return null; 85 } 86 87 internal XmlSerializer DiscoveryDocumentSerializer { 88 get { 89 if (this.discoveryDocumentSerializer == null) { 90 lock (WebServicesSection.ClassSyncObject) { 91 if (this.discoveryDocumentSerializer == null) { 92 XmlAttributeOverrides attrOverrides = new XmlAttributeOverrides(); 93 XmlAttributes attrs = new XmlAttributes(); 94 foreach (Type discoveryReferenceType in this.DiscoveryReferenceTypes) { 95 object[] xmlElementAttribs = discoveryReferenceType.GetCustomAttributes(typeof(XmlRootAttribute), false); 96 if (xmlElementAttribs.Length == 0) { 97 throw new InvalidOperationException(Res.GetString(Res.WebMissingCustomAttribute, discoveryReferenceType.FullName, "XmlRoot")); 98 } 99 string name = ((XmlRootAttribute)xmlElementAttribs[0]).ElementName; 100 string ns = ((XmlRootAttribute)xmlElementAttribs[0]).Namespace; 101 XmlElementAttribute attr = new XmlElementAttribute(name, discoveryReferenceType); 102 attr.Namespace = ns; 103 attrs.XmlElements.Add(attr); 104 } 105 attrOverrides.Add(typeof(DiscoveryDocument), "References", attrs); 106 this.discoveryDocumentSerializer = new DiscoveryDocumentSerializer(); 107 } 108 } 109 } 110 return discoveryDocumentSerializer; 111 } 112 } 113 114 internal Type[] DiscoveryReferenceTypes { 115 get { return this.discoveryReferenceTypes; } 116 } 117 118 public WebServiceProtocols EnabledProtocols { 119 get { 120 if (this.enabledProtocols == WebServiceProtocols.Unknown) { 121 lock (WebServicesSection.ClassSyncObject) { 122 if (this.enabledProtocols == WebServiceProtocols.Unknown) { 123 WebServiceProtocols temp = WebServiceProtocols.Unknown; 124 foreach (ProtocolElement element in this.Protocols) { 125 temp |= (WebServiceProtocols)element.Name; 126 } 127 this.enabledProtocols = temp; 128 } 129 } 130 } 131 return this.enabledProtocols; 132 } 133 } 134 GetAllFormatExtensionTypes()135 internal Type[] GetAllFormatExtensionTypes() { 136 if (this.ServiceDescriptionFormatExtensionTypes.Count == 0) { 137 return this.defaultFormatTypes; 138 } 139 else { 140 Type[] formatTypes = new Type[defaultFormatTypes.Length + this.ServiceDescriptionFormatExtensionTypes.Count]; 141 Array.Copy(defaultFormatTypes, formatTypes, defaultFormatTypes.Length); 142 143 for (int index = 0; index < this.ServiceDescriptionFormatExtensionTypes.Count; ++index) { 144 formatTypes[index + defaultFormatTypes.Length] = this.ServiceDescriptionFormatExtensionTypes[index].Type; 145 } 146 return formatTypes; 147 } 148 } 149 GetExtensionPointAttribute(Type type)150 static XmlFormatExtensionPointAttribute GetExtensionPointAttribute(Type type) { 151 object[] attrs = type.GetCustomAttributes(typeof(XmlFormatExtensionPointAttribute), false); 152 if (attrs.Length == 0) 153 throw new ArgumentException(Res.GetString(Res.TheSyntaxOfTypeMayNotBeExtended1, type.FullName), "type"); 154 return (XmlFormatExtensionPointAttribute)attrs[0]; 155 } 156 157 [ConfigurationPermission(SecurityAction.Assert, Unrestricted = true)] GetSection(Configuration config)158 static public WebServicesSection GetSection(Configuration config) { 159 if (config == null) { 160 throw new ArgumentNullException("config"); 161 } 162 return (WebServicesSection)config.GetSection(WebServicesSection.SectionName); 163 } 164 InitializeDefault()165 protected override void InitializeDefault() { 166 this.ConformanceWarnings.SetDefaults(); 167 this.Protocols.SetDefaults(); 168 // check to see if we are running on the server without loading system.web.dll 169 if (Thread.GetDomain().GetData(".appDomain") != null) { 170 this.WsdlHelpGenerator.SetDefaults(); 171 } 172 this.SoapServerProtocolFactoryType.Type = typeof(SoapServerProtocolFactory); 173 } 174 LoadXmlFormatExtensions(Type[] extensionTypes, XmlAttributeOverrides overrides, XmlSerializerNamespaces namespaces)175 internal static void LoadXmlFormatExtensions(Type[] extensionTypes, XmlAttributeOverrides overrides, XmlSerializerNamespaces namespaces) { 176 Hashtable table = new Hashtable(); 177 table.Add(typeof(ServiceDescription), new XmlAttributes()); 178 table.Add(typeof(Import), new XmlAttributes()); 179 table.Add(typeof(Port), new XmlAttributes()); 180 table.Add(typeof(Service), new XmlAttributes()); 181 table.Add(typeof(FaultBinding), new XmlAttributes()); 182 table.Add(typeof(InputBinding), new XmlAttributes()); 183 table.Add(typeof(OutputBinding), new XmlAttributes()); 184 table.Add(typeof(OperationBinding), new XmlAttributes()); 185 table.Add(typeof(Binding), new XmlAttributes()); 186 table.Add(typeof(OperationFault), new XmlAttributes()); 187 table.Add(typeof(OperationInput), new XmlAttributes()); 188 table.Add(typeof(OperationOutput), new XmlAttributes()); 189 table.Add(typeof(Operation), new XmlAttributes()); 190 table.Add(typeof(PortType), new XmlAttributes()); 191 table.Add(typeof(Message), new XmlAttributes()); 192 table.Add(typeof(MessagePart), new XmlAttributes()); 193 table.Add(typeof(Types), new XmlAttributes()); 194 Hashtable extensions = new Hashtable(); 195 foreach (Type extensionType in extensionTypes) { 196 if (extensions[extensionType] != null) { 197 continue; 198 } 199 extensions.Add(extensionType, extensionType); 200 object[] attrs = extensionType.GetCustomAttributes(typeof(XmlFormatExtensionAttribute), false); 201 if (attrs.Length == 0) { 202 throw new ArgumentException(Res.GetString(Res.RequiredXmlFormatExtensionAttributeIsMissing1, extensionType.FullName), "extensionTypes"); 203 } 204 XmlFormatExtensionAttribute extensionAttr = (XmlFormatExtensionAttribute)attrs[0]; 205 foreach (Type extensionPointType in extensionAttr.ExtensionPoints) { 206 XmlAttributes xmlAttrs = (XmlAttributes)table[extensionPointType]; 207 if (xmlAttrs == null) { 208 xmlAttrs = new XmlAttributes(); 209 table.Add(extensionPointType, xmlAttrs); 210 } 211 XmlElementAttribute xmlAttr = new XmlElementAttribute(extensionAttr.ElementName, extensionType); 212 xmlAttr.Namespace = extensionAttr.Namespace; 213 xmlAttrs.XmlElements.Add(xmlAttr); 214 } 215 attrs = extensionType.GetCustomAttributes(typeof(XmlFormatExtensionPrefixAttribute), false); 216 string[] prefixes = new string[attrs.Length]; 217 Hashtable nsDefs = new Hashtable(); 218 for (int i = 0; i < attrs.Length; i++) { 219 XmlFormatExtensionPrefixAttribute prefixAttr = (XmlFormatExtensionPrefixAttribute)attrs[i]; 220 prefixes[i] = prefixAttr.Prefix; 221 nsDefs.Add(prefixAttr.Prefix, prefixAttr.Namespace); 222 } 223 Array.Sort(prefixes, InvariantComparer.Default); 224 for (int i = 0; i < prefixes.Length; i++) { 225 namespaces.Add(prefixes[i], (string)nsDefs[prefixes[i]]); 226 } 227 } 228 foreach (Type extensionPointType in table.Keys) { 229 XmlFormatExtensionPointAttribute attr = GetExtensionPointAttribute(extensionPointType); 230 XmlAttributes xmlAttrs = (XmlAttributes)table[extensionPointType]; 231 if (attr.AllowElements) { 232 xmlAttrs.XmlAnyElements.Add(new XmlAnyElementAttribute()); 233 } 234 overrides.Add(extensionPointType, attr.MemberName, xmlAttrs); 235 } 236 } 237 238 internal Type[] MimeImporterTypes { 239 get { return this.mimeImporterTypes; } 240 } 241 242 internal Type[] MimeReflectorTypes { 243 get { return this.mimeReflectorTypes; } 244 } 245 246 internal Type[] ParameterReaderTypes { 247 get { return this.parameterReaderTypes; } 248 } 249 250 protected override ConfigurationPropertyCollection Properties { 251 get { return this.properties; } 252 } 253 254 internal Type[] ProtocolImporterTypes { 255 get { 256 if (this.protocolImporterTypes.Length == 0) { 257 lock (WebServicesSection.ClassSyncObject) { 258 if (this.protocolImporterTypes.Length == 0) { 259 WebServiceProtocols enabledProtocols = this.EnabledProtocols; 260 List<Type> protocolImporterList = new List<Type>(); 261 262 // order is important for soap: 1.2 must come after 1.1 263 if ((enabledProtocols & WebServiceProtocols.HttpSoap) != 0) { 264 protocolImporterList.Add(typeof(SoapProtocolImporter)); 265 } 266 if ((enabledProtocols & WebServiceProtocols.HttpSoap12) != 0) { 267 protocolImporterList.Add(typeof(Soap12ProtocolImporter)); 268 } 269 if ((enabledProtocols & WebServiceProtocols.HttpGet) != 0) { 270 protocolImporterList.Add(typeof(HttpGetProtocolImporter)); 271 } 272 if ((enabledProtocols & WebServiceProtocols.HttpPost) != 0) { 273 protocolImporterList.Add(typeof(HttpPostProtocolImporter)); 274 } 275 this.protocolImporterTypes = protocolImporterList.ToArray(); 276 } 277 } 278 } 279 return this.protocolImporterTypes; 280 } 281 282 set { this.protocolImporterTypes = value; } 283 } 284 285 internal Type[] ProtocolReflectorTypes { 286 get { 287 if (this.protocolReflectorTypes.Length == 0) { 288 lock (WebServicesSection.ClassSyncObject) { 289 if (this.protocolReflectorTypes.Length == 0) { 290 WebServiceProtocols enabledProtocols = this.EnabledProtocols; 291 List<Type> protocolReflectorList = new List<Type>(); 292 293 // order is important for soap: 1.2 must come after 1.1 294 if ((enabledProtocols & WebServiceProtocols.HttpSoap) != 0) { 295 protocolReflectorList.Add(typeof(SoapProtocolReflector)); 296 } 297 if ((enabledProtocols & WebServiceProtocols.HttpSoap12) != 0) { 298 protocolReflectorList.Add(typeof(Soap12ProtocolReflector)); 299 } 300 if ((enabledProtocols & WebServiceProtocols.HttpGet) != 0) { 301 protocolReflectorList.Add(typeof(HttpGetProtocolReflector)); 302 } 303 if ((enabledProtocols & WebServiceProtocols.HttpPost) != 0) { 304 protocolReflectorList.Add(typeof(HttpPostProtocolReflector)); 305 } 306 this.protocolReflectorTypes = protocolReflectorList.ToArray(); 307 } 308 } 309 } 310 return this.protocolReflectorTypes; 311 } 312 313 set { this.protocolReflectorTypes = value; } 314 } 315 316 [ConfigurationProperty("protocols")] 317 public ProtocolElementCollection Protocols { 318 get { return (ProtocolElementCollection)base[this.protocols]; } 319 } 320 321 [ConfigurationProperty("soapEnvelopeProcessing")] 322 public SoapEnvelopeProcessingElement SoapEnvelopeProcessing { 323 get { return (SoapEnvelopeProcessingElement)base[this.soapEnvelopeProcessing]; } 324 set { base[this.soapEnvelopeProcessing] = value; } 325 } 326 327 public DiagnosticsElement Diagnostics { 328 get { return (DiagnosticsElement)base[this.diagnostics]; } 329 set { base[this.diagnostics] = value; } 330 } 331 Reset(ConfigurationElement parentElement)332 protected override void Reset(ConfigurationElement parentElement) { 333 334 // Fixes potential race condition where serverProtocolFactories != enabledProtocols settings 335 this.serverProtocolFactories = null; 336 this.enabledProtocols = WebServiceProtocols.Unknown; 337 338 if (parentElement != null) { 339 WebServicesSection parent = (WebServicesSection)parentElement; 340 341 this.discoveryDocumentSerializer = parent.discoveryDocumentSerializer; 342 } 343 base.Reset(parentElement); 344 } 345 346 internal Type[] ReturnWriterTypes { 347 get { return this.returnWriterTypes; } 348 } 349 350 internal ServerProtocolFactory[] ServerProtocolFactories { 351 get { 352 if (this.serverProtocolFactories == null) { 353 lock (WebServicesSection.ClassSyncObject) { 354 if (this.serverProtocolFactories == null) { 355 WebServiceProtocols enabledProtocols = this.EnabledProtocols; 356 List<ServerProtocolFactory> serverProtocolFactoryList = new List<ServerProtocolFactory>(); 357 // These are order sensitive. We want SOAP to go first for perf 358 // and Discovery (?wsdl and ?disco) should go before Documentation 359 // both soap versions are handled by the same factory 360 if ((enabledProtocols & WebServiceProtocols.AnyHttpSoap) != 0) { 361 serverProtocolFactoryList.Add((ServerProtocolFactory)Activator.CreateInstance(this.SoapServerProtocolFactory)); 362 } 363 if ((enabledProtocols & WebServiceProtocols.HttpPost) != 0) { 364 serverProtocolFactoryList.Add(new HttpPostServerProtocolFactory()); 365 } 366 if ((enabledProtocols & WebServiceProtocols.HttpPostLocalhost) != 0) { 367 serverProtocolFactoryList.Add(new HttpPostLocalhostServerProtocolFactory()); 368 } 369 if ((enabledProtocols & WebServiceProtocols.HttpGet) != 0) { 370 serverProtocolFactoryList.Add(new HttpGetServerProtocolFactory()); 371 } 372 if ((enabledProtocols & WebServiceProtocols.Documentation) != 0) { 373 serverProtocolFactoryList.Add(new DiscoveryServerProtocolFactory()); 374 serverProtocolFactoryList.Add(new DocumentationServerProtocolFactory()); 375 } 376 this.serverProtocolFactories = serverProtocolFactoryList.ToArray(); 377 } 378 } 379 } 380 381 return this.serverProtocolFactories; 382 } 383 } 384 385 internal bool ServiceDescriptionExtended { 386 get { return this.ServiceDescriptionFormatExtensionTypes.Count > 0; } 387 } 388 389 [ConfigurationProperty("serviceDescriptionFormatExtensionTypes")] 390 public TypeElementCollection ServiceDescriptionFormatExtensionTypes { 391 get { return (TypeElementCollection)base[this.serviceDescriptionFormatExtensionTypes]; } 392 } 393 394 [ConfigurationProperty("soapExtensionImporterTypes")] 395 public TypeElementCollection SoapExtensionImporterTypes { 396 get { return (TypeElementCollection)base[this.soapExtensionImporterTypes]; } 397 } 398 399 [ConfigurationProperty("soapExtensionReflectorTypes")] 400 public TypeElementCollection SoapExtensionReflectorTypes { 401 get { return (TypeElementCollection)base[this.soapExtensionReflectorTypes]; } 402 } 403 404 [ConfigurationProperty("soapExtensionTypes")] 405 public SoapExtensionTypeElementCollection SoapExtensionTypes { 406 get { return (SoapExtensionTypeElementCollection)base[this.soapExtensionTypes]; } 407 } 408 409 [ConfigurationProperty("soapServerProtocolFactory")] 410 public TypeElement SoapServerProtocolFactoryType { 411 get { return (TypeElement)base[this.soapServerProtocolFactoryType]; } 412 } 413 414 internal Type SoapServerProtocolFactory { 415 get { 416 if (this.soapServerProtocolFactory == null) { 417 lock (WebServicesSection.ClassSyncObject) { 418 if (this.soapServerProtocolFactory == null) { 419 this.soapServerProtocolFactory = this.SoapServerProtocolFactoryType.Type; 420 } 421 } 422 } 423 return this.soapServerProtocolFactory; 424 } 425 } 426 427 [ConfigurationProperty("soapTransportImporterTypes")] 428 public TypeElementCollection SoapTransportImporterTypes { 429 get { return (TypeElementCollection)base[this.soapTransportImporterTypes]; } 430 } 431 432 internal Type[] SoapTransportImporters { 433 get { 434 Type[] retval = new Type[1 + this.SoapTransportImporterTypes.Count]; 435 retval[0] = typeof(SoapHttpTransportImporter); 436 for (int i = 0; i < SoapTransportImporterTypes.Count; ++i) { 437 retval[i + 1] = SoapTransportImporterTypes[i].Type; 438 } 439 return retval; 440 } 441 } 442 TurnOnGetAndPost()443 void TurnOnGetAndPost() { 444 bool needPost = (this.EnabledProtocols & WebServiceProtocols.HttpPost) == 0; 445 bool needGet = (this.EnabledProtocols & WebServiceProtocols.HttpGet) == 0; 446 if (!needGet && !needPost) 447 return; 448 449 ArrayList importers = new ArrayList(ProtocolImporterTypes); 450 ArrayList reflectors = new ArrayList(ProtocolReflectorTypes); 451 if (needPost) { 452 importers.Add(typeof(HttpPostProtocolImporter)); 453 reflectors.Add(typeof(HttpPostProtocolReflector)); 454 } 455 if (needGet) { 456 importers.Add(typeof(HttpGetProtocolImporter)); 457 reflectors.Add(typeof(HttpGetProtocolReflector)); 458 } 459 ProtocolImporterTypes = (Type[])importers.ToArray(typeof(Type)); 460 ProtocolReflectorTypes = (Type[])reflectors.ToArray(typeof(Type)); 461 enabledProtocols |= WebServiceProtocols.HttpGet | WebServiceProtocols.HttpPost; 462 } 463 464 [ConfigurationProperty("wsdlHelpGenerator")] 465 public WsdlHelpGeneratorElement WsdlHelpGenerator { 466 get { return (WsdlHelpGeneratorElement)base[this.wsdlHelpGenerator]; } 467 } 468 469 ConfigurationPropertyCollection properties = new ConfigurationPropertyCollection(); 470 // Object for synchronizing access to the entire class( avoiding lock( typeof( ... )) ) 471 static object classSyncObject = null; 472 const string SectionName = @"system.web/webServices"; 473 readonly ConfigurationProperty conformanceWarnings = new ConfigurationProperty("conformanceWarnings", typeof(WsiProfilesElementCollection), null, ConfigurationPropertyOptions.None); 474 readonly ConfigurationProperty protocols = new ConfigurationProperty("protocols", typeof(ProtocolElementCollection), null, ConfigurationPropertyOptions.None); 475 readonly ConfigurationProperty serviceDescriptionFormatExtensionTypes = new ConfigurationProperty("serviceDescriptionFormatExtensionTypes", typeof(TypeElementCollection), null, ConfigurationPropertyOptions.None); 476 readonly ConfigurationProperty soapEnvelopeProcessing = new ConfigurationProperty("soapEnvelopeProcessing", typeof(SoapEnvelopeProcessingElement), null, ConfigurationPropertyOptions.None); 477 readonly ConfigurationProperty soapExtensionImporterTypes = new ConfigurationProperty("soapExtensionImporterTypes", typeof(TypeElementCollection), null, ConfigurationPropertyOptions.None); 478 readonly ConfigurationProperty soapExtensionReflectorTypes = new ConfigurationProperty("soapExtensionReflectorTypes", typeof(TypeElementCollection), null, ConfigurationPropertyOptions.None); 479 readonly ConfigurationProperty soapExtensionTypes = new ConfigurationProperty("soapExtensionTypes", typeof(SoapExtensionTypeElementCollection), null, ConfigurationPropertyOptions.None); 480 readonly ConfigurationProperty soapTransportImporterTypes = new ConfigurationProperty("soapTransportImporterTypes", typeof(TypeElementCollection), null, ConfigurationPropertyOptions.None); 481 readonly ConfigurationProperty wsdlHelpGenerator = new ConfigurationProperty("wsdlHelpGenerator", typeof(WsdlHelpGeneratorElement), null, ConfigurationPropertyOptions.None); 482 readonly ConfigurationProperty soapServerProtocolFactoryType = new ConfigurationProperty("soapServerProtocolFactory", typeof(TypeElement), null, ConfigurationPropertyOptions.None); 483 readonly ConfigurationProperty diagnostics = new ConfigurationProperty("diagnostics", typeof(DiagnosticsElement), null, ConfigurationPropertyOptions.None); 484 485 Type[] defaultFormatTypes = new Type[] { 486 typeof(HttpAddressBinding), 487 typeof(HttpBinding), 488 typeof(HttpOperationBinding), 489 typeof(HttpUrlEncodedBinding), 490 typeof(HttpUrlReplacementBinding), 491 typeof(MimeContentBinding), 492 typeof(MimeXmlBinding), 493 typeof(MimeMultipartRelatedBinding), 494 typeof(MimeTextBinding), 495 typeof(System.Web.Services.Description.SoapBinding), 496 typeof(SoapOperationBinding), 497 typeof(SoapBodyBinding), 498 typeof(SoapFaultBinding), 499 typeof(SoapHeaderBinding), 500 typeof(SoapAddressBinding), 501 typeof(Soap12Binding), 502 typeof(Soap12OperationBinding), 503 typeof(Soap12BodyBinding), 504 typeof(Soap12FaultBinding), 505 typeof(Soap12HeaderBinding), 506 typeof(Soap12AddressBinding) }; 507 Type[] discoveryReferenceTypes = new Type[] { typeof(DiscoveryDocumentReference), typeof(ContractReference), typeof(SchemaReference), typeof(System.Web.Services.Discovery.SoapBinding) }; 508 XmlSerializer discoveryDocumentSerializer = null; 509 WebServiceProtocols enabledProtocols = WebServiceProtocols.Unknown; 510 Type[] mimeImporterTypes = new Type[] { typeof(MimeXmlImporter), typeof(MimeFormImporter), typeof(MimeTextImporter) }; 511 Type[] mimeReflectorTypes = new Type[] { typeof(MimeXmlReflector), typeof(MimeFormReflector) }; 512 Type[] parameterReaderTypes = new Type[] { typeof(UrlParameterReader), typeof(HtmlFormParameterReader) }; 513 Type[] protocolImporterTypes = new Type[0]; 514 Type[] protocolReflectorTypes = new Type[0]; 515 Type[] returnWriterTypes = new Type[] { typeof(XmlReturnWriter) }; 516 ServerProtocolFactory[] serverProtocolFactories = null; 517 Type soapServerProtocolFactory = null; 518 } 519 } 520