SoapHeaderBinding.cs 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. //
  2. // System.Web.Services.Description.SoapHeaderBinding.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;
  11. using System.Web.Services.Configuration;
  12. using System.Xml;
  13. using System.Xml.Serialization;
  14. namespace System.Web.Services.Description {
  15. [XmlFormatExtension ("header", "http://schemas.xmlsoap.org/wsdl/soap/", typeof (InputBinding), typeof (OutputBinding))]
  16. public class SoapHeaderBinding : ServiceDescriptionFormatExtension {
  17. #region Fields
  18. string encoding;
  19. bool mapToProperty;
  20. XmlQualifiedName message;
  21. string ns;
  22. string part;
  23. SoapBindingUse use;
  24. #endregion // Fields
  25. #region Constructors
  26. public SoapHeaderBinding ()
  27. {
  28. encoding = String.Empty;
  29. mapToProperty = false;
  30. message = XmlQualifiedName.Empty;
  31. ns = String.Empty;
  32. part = String.Empty;
  33. use = SoapBindingUse.Default;
  34. }
  35. #endregion // Constructors
  36. #region Properties
  37. [DefaultValue ("")]
  38. [XmlAttribute ("encodingStyle")]
  39. public string Encoding {
  40. get { return encoding; }
  41. set { encoding = value; }
  42. }
  43. [XmlIgnore]
  44. public bool MapToProperty {
  45. get { return mapToProperty; }
  46. set { mapToProperty = value; }
  47. }
  48. [XmlAttribute ("message")]
  49. public XmlQualifiedName Message {
  50. get { return message; }
  51. set { message = value; }
  52. }
  53. [DefaultValue ("")]
  54. [XmlAttribute ("namespace")]
  55. public string Namespace {
  56. get { return ns; }
  57. set { ns = value; }
  58. }
  59. [XmlAttribute ("part", DataType = "NMTOKEN")]
  60. public string Part {
  61. get { return part; }
  62. set { part = value; }
  63. }
  64. [DefaultValue (SoapBindingUse.Default)]
  65. [XmlAttribute ("use")]
  66. public SoapBindingUse Use {
  67. get { return use; }
  68. set { use = value; }
  69. }
  70. #if NET_1_1
  71. [MonoTODO]
  72. public SoapHeaderFaultBinding Fault
  73. {
  74. get { return null; }
  75. set { ; }
  76. }
  77. #endif
  78. #endregion // Properties
  79. }
  80. }