SoapBodyBinding.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. //
  2. // System.Web.Services.Description.SoapBodyBinding.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. [XmlFormatExtension ("body", "http://schemas.xmlsoap.org/wsdl/soap/", typeof (InputBinding), typeof (OutputBinding), typeof (MimePart))]
  14. public sealed class SoapBodyBinding : ServiceDescriptionFormatExtension {
  15. #region Fields
  16. string encoding;
  17. string ns;
  18. string[] parts;
  19. SoapBindingUse use;
  20. #endregion // Fields
  21. #region Constructors
  22. public SoapBodyBinding ()
  23. {
  24. encoding = String.Empty;
  25. ns = String.Empty;
  26. parts = null;
  27. use = SoapBindingUse.Default;
  28. }
  29. #endregion // Constructors
  30. #region Properties
  31. [DefaultValue ("")]
  32. [XmlAttribute ("encodingStyle")]
  33. public string Encoding {
  34. get { return encoding; }
  35. set { encoding = value; }
  36. }
  37. [DefaultValue ("")]
  38. [XmlAttribute ("namespace")]
  39. public string Namespace {
  40. get { return ns; }
  41. set { ns = value; }
  42. }
  43. [XmlIgnore]
  44. public string[] Parts {
  45. get { return parts; }
  46. set { parts = value; }
  47. }
  48. [XmlAttribute ("parts", DataType = "NMTOKENS")]
  49. public string PartsString {
  50. get { return String.Join (" ", Parts); }
  51. set { Parts = value.Split (' '); }
  52. }
  53. [DefaultValue (SoapBindingUse.Default)]
  54. [XmlAttribute ("use")]
  55. public SoapBindingUse Use {
  56. get { return use; }
  57. set { use = value; }
  58. }
  59. #endregion // Properties
  60. }
  61. }