SoapBinding.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. public sealed class SoapBinding : ServiceDescriptionFormatExtension {
  16. #region Fields
  17. public const string HttpTransport = "http://schemas.xmlsoap.org/soap/http";
  18. public const string Namespace = "http://schemas.xmlsoap.org/wsdl/soap/";
  19. SoapBindingStyle style;
  20. string transport;
  21. #endregion // Fields
  22. #region Constructors
  23. public SoapBinding ()
  24. {
  25. style = SoapBindingStyle.Document;
  26. transport = String.Empty;
  27. }
  28. #endregion // Constructors
  29. #region Properties
  30. // LAMESPEC: .NET says that the default value is SoapBindingStyle.Document but
  31. // reflection shows this attribute is SoapBindingStyle.Default
  32. [DefaultValue (SoapBindingStyle.Default)]
  33. [XmlAttribute ("style")]
  34. public SoapBindingStyle Style {
  35. get { return style; }
  36. set { style = value; }
  37. }
  38. [XmlAttribute ("transport")]
  39. public string Transport {
  40. get { return transport; }
  41. set { transport = value; }
  42. }
  43. #endregion // Properties
  44. }
  45. }