SoapBinding.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. //
  2. // System.Web.Services.Description.SoapBinding.cs
  3. //
  4. // Author:
  5. // Tim Coleman ([email protected])
  6. //
  7. // Copyright (C) Tim Coleman, 2002
  8. //
  9. using System.ComponentModel;
  10. using System.Web.Services.Configuration;
  11. using System.Xml.Serialization;
  12. namespace System.Web.Services.Description {
  13. [XmlFormatExtensionPrefix ("soap", "http://schemas.xmlsoap.org/wsdl/soap/")]
  14. [XmlFormatExtension ("binding", "http://schemas.xmlsoap.org/wsdl/soap/", typeof (Binding))]
  15. // FIXME: this won't compile!
  16. // [XmlFormatExtensionPrefix ("soapenc", "http://schemas.xmlsoap.org/soap/encoding/")]
  17. public sealed class SoapBinding : ServiceDescriptionFormatExtension {
  18. #region Fields
  19. public const string HttpTransport = "http://schemas.xmlsoap.org/soap/http/";
  20. public const string Namespace = "http://schemas.xmlsoap.org/wsdl/soap/";
  21. SoapBindingStyle style;
  22. string transport;
  23. #endregion // Fields
  24. #region Constructors
  25. public SoapBinding ()
  26. {
  27. style = SoapBindingStyle.Document;
  28. transport = String.Empty;
  29. }
  30. #endregion // Constructors
  31. #region Properties
  32. // LAMESPEC: .NET says that the default value is SoapBindingStyle.Document but
  33. // reflection shows this attribute is SoapBindingStyle.Default
  34. [DefaultValue (SoapBindingStyle.Default)]
  35. [XmlAttribute ("style")]
  36. public SoapBindingStyle Style {
  37. get { return style; }
  38. set { style = value; }
  39. }
  40. [XmlAttribute ("transport")]
  41. public string Transport {
  42. get { return transport; }
  43. set { transport = value; }
  44. }
  45. #endregion // Properties
  46. }
  47. }