SoapMessage.cs 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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 Properties
  20. public abstract string Action {
  21. get;
  22. }
  23. public string ContentType {
  24. get { return contentType; }
  25. set { contentType = value; }
  26. }
  27. public SoapException Exception {
  28. get { return exception; }
  29. }
  30. public SoapHeaderCollection Headers {
  31. get { return headers; }
  32. }
  33. public abstract LogicalMethodInfo MethodInfo {
  34. get;
  35. }
  36. public abstract bool OneWay {
  37. get;
  38. }
  39. public SoapMessageStage Stage {
  40. get { return stage; }
  41. }
  42. public Stream Stream {
  43. [MonoTODO]
  44. get { throw new NotImplementedException (); }
  45. }
  46. public abstract string Url {
  47. get;
  48. }
  49. #endregion Properties
  50. #region Methods
  51. protected abstract void EnsureInStage ();
  52. protected abstract void EnsureOutStage ();
  53. protected void EnsureStage (SoapMessageStage stage)
  54. {
  55. if ((((int) stage) & ((int) Stage)) == 0)
  56. throw new InvalidOperationException ("The current SoapMessageStage is not the asserted stage or stages.");
  57. }
  58. [MonoTODO]
  59. public object GetInParameterValue (int index)
  60. {
  61. throw new NotImplementedException ();
  62. }
  63. [MonoTODO]
  64. public object GetOutParameterValue (int index)
  65. {
  66. throw new NotImplementedException ();
  67. }
  68. [MonoTODO]
  69. public object GetReturnValue ()
  70. {
  71. throw new NotImplementedException ();
  72. }
  73. #endregion // Methods
  74. }
  75. }