2
0

SoapHeaderBinding.cs 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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 sealed 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. [MonoTODO]
  27. public SoapHeaderBinding ()
  28. {
  29. encoding = String.Empty;
  30. mapToProperty = false; // FIXME: is this right?
  31. message = XmlQualifiedName.Empty;
  32. ns = String.Empty;
  33. part = String.Empty;
  34. use = SoapBindingUse.Default;
  35. }
  36. #endregion // Constructors
  37. #region Properties
  38. [DefaultValue ("")]
  39. [XmlAttribute ("encodingStyle")]
  40. public string Encoding {
  41. get { return encoding; }
  42. set { encoding = value; }
  43. }
  44. [XmlIgnore]
  45. public bool MapToProperty {
  46. get { return mapToProperty; }
  47. set { mapToProperty = value; }
  48. }
  49. [XmlAttribute ("message")]
  50. public XmlQualifiedName Message {
  51. get { return message; }
  52. set { message = value; }
  53. }
  54. [DefaultValue ("")]
  55. [XmlAttribute ("namespace")]
  56. public string Namespace {
  57. get { return ns; }
  58. set { ns = value; }
  59. }
  60. [XmlAttribute ("part", DataType = "NMTOKEN")]
  61. public string Part {
  62. get { return part; }
  63. set { part = value; }
  64. }
  65. [DefaultValue (SoapBindingUse.Default)]
  66. [XmlAttribute ("use")]
  67. public SoapBindingUse Use {
  68. get { return use; }
  69. set { use = value; }
  70. }
  71. #endregion // Properties
  72. }
  73. }