SoapClientMessage.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. //
  2. // System.Web.Services.Protocols.SoapClientMessage.cs
  3. //
  4. // Authors:
  5. // Tim Coleman ([email protected])
  6. // Miguel de Icaza ([email protected])
  7. //
  8. // Copyright (C) Tim Coleman, 2002
  9. // Copyright (C) Ximian, Inc. 2003
  10. //
  11. using System.Web.Services;
  12. using System.Web.Services.Protocols;
  13. namespace System.Web.Services.Protocols {
  14. public sealed class SoapClientMessage : SoapMessage {
  15. #region Fields
  16. SoapHttpClientProtocol client;
  17. string url;
  18. LogicalMethodInfo client_method;
  19. internal MethodStubInfo MethodStubInfo;
  20. //
  21. // Expose this one internally
  22. //
  23. internal object [] Parameters;
  24. #endregion
  25. #region Constructors
  26. //
  27. // Constructs the SoapClientMessage
  28. //
  29. internal SoapClientMessage (SoapHttpClientProtocol client, MethodStubInfo msi, string url, object [] parameters)
  30. {
  31. this.MethodStubInfo = msi;
  32. this.client = client;
  33. this.client_method = client_method;
  34. this.url = url;
  35. Parameters = parameters;
  36. foreach (HeaderInfo hi in msi.Headers) {
  37. SoapHeader headerVal = hi.GetHeaderValue (client) as SoapHeader;
  38. if (headerVal != null)
  39. Headers.Add (headerVal);
  40. }
  41. }
  42. #endregion
  43. #region Properties
  44. public override string Action {
  45. get { return MethodStubInfo.Action; }
  46. }
  47. public SoapHttpClientProtocol Client {
  48. get { return client; }
  49. }
  50. public override LogicalMethodInfo MethodInfo {
  51. get { return client_method; }
  52. }
  53. public override bool OneWay {
  54. get { return MethodStubInfo.OneWay; }
  55. }
  56. public override string Url {
  57. get { return url; }
  58. }
  59. #endregion // Properties
  60. #region Methods
  61. [MonoTODO]
  62. protected override void EnsureInStage ()
  63. {
  64. //
  65. // I believe for SoapClientMessage, we can safely remove this check
  66. // as the In parameters are always available
  67. //
  68. throw new NotImplementedException ();
  69. }
  70. protected override void EnsureOutStage ()
  71. {
  72. EnsureStage (SoapMessageStage.AfterDeserialize);
  73. }
  74. #endregion // Methods
  75. }
  76. }