SoapMessage.cs 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. //
  2. // System.Web.Services.Protocols.SoapMessage.cs
  3. //
  4. // Author:
  5. // Tim Coleman ([email protected])
  6. //
  7. // Copyright (C) Tim Coleman, 2002
  8. //
  9. using System.IO;
  10. using System.Web.Services;
  11. namespace System.Web.Services.Protocols {
  12. public abstract class SoapMessage {
  13. #region Fields
  14. string contentType = "text/xml";
  15. SoapException exception = null;
  16. SoapHeaderCollection headers = null;
  17. SoapMessageStage stage;
  18. #endregion // Fields
  19. #region Constructors
  20. internal SoapMessage ()
  21. {
  22. }
  23. #endregion
  24. #region Properties
  25. public abstract string Action {
  26. get;
  27. }
  28. public string ContentType {
  29. get { return contentType; }
  30. set { contentType = value; }
  31. }
  32. public SoapException Exception {
  33. get { return exception; }
  34. }
  35. public SoapHeaderCollection Headers {
  36. get { return headers; }
  37. }
  38. public abstract LogicalMethodInfo MethodInfo {
  39. get;
  40. }
  41. public abstract bool OneWay {
  42. get;
  43. }
  44. public SoapMessageStage Stage {
  45. get { return stage; }
  46. }
  47. public Stream Stream {
  48. [MonoTODO]
  49. get { throw new NotImplementedException (); }
  50. }
  51. public abstract string Url {
  52. get;
  53. }
  54. #endregion Properties
  55. #region Methods
  56. protected abstract void EnsureInStage ();
  57. protected abstract void EnsureOutStage ();
  58. protected void EnsureStage (SoapMessageStage stage)
  59. {
  60. if ((((int) stage) & ((int) Stage)) == 0)
  61. throw new InvalidOperationException ("The current SoapMessageStage is not the asserted stage or stages.");
  62. }
  63. [MonoTODO]
  64. public object GetInParameterValue (int index)
  65. {
  66. throw new NotImplementedException ();
  67. }
  68. [MonoTODO]
  69. public object GetOutParameterValue (int index)
  70. {
  71. throw new NotImplementedException ();
  72. }
  73. [MonoTODO]
  74. public object GetReturnValue ()
  75. {
  76. throw new NotImplementedException ();
  77. }
  78. #endregion // Methods
  79. }
  80. }