SoapClientMessage.cs 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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. //
  12. // Permission is hereby granted, free of charge, to any person obtaining
  13. // a copy of this software and associated documentation files (the
  14. // "Software"), to deal in the Software without restriction, including
  15. // without limitation the rights to use, copy, modify, merge, publish,
  16. // distribute, sublicense, and/or sell copies of the Software, and to
  17. // permit persons to whom the Software is furnished to do so, subject to
  18. // the following conditions:
  19. //
  20. // The above copyright notice and this permission notice shall be
  21. // included in all copies or substantial portions of the Software.
  22. //
  23. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  24. // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  25. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  26. // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  27. // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  28. // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  29. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  30. //
  31. using System.Web.Services;
  32. using System.Web.Services.Protocols;
  33. namespace System.Web.Services.Protocols {
  34. public sealed class SoapClientMessage : SoapMessage {
  35. #region Fields
  36. SoapHttpClientProtocol client;
  37. string url;
  38. internal SoapMethodStubInfo MethodStubInfo;
  39. //
  40. // Expose this one internally
  41. //
  42. internal object [] Parameters;
  43. #endregion
  44. #region Constructors
  45. //
  46. // Constructs the SoapClientMessage
  47. //
  48. internal SoapClientMessage (SoapHttpClientProtocol client, SoapMethodStubInfo msi, string url, object [] parameters)
  49. {
  50. this.MethodStubInfo = msi;
  51. this.client = client;
  52. this.url = url;
  53. Parameters = parameters;
  54. }
  55. #endregion
  56. #region Properties
  57. public override string Action {
  58. get { return MethodStubInfo.Action; }
  59. }
  60. public SoapHttpClientProtocol Client {
  61. get { return client; }
  62. }
  63. public override LogicalMethodInfo MethodInfo {
  64. get { return MethodStubInfo.MethodInfo; }
  65. }
  66. public override bool OneWay {
  67. get { return MethodStubInfo.OneWay; }
  68. }
  69. public override string Url {
  70. get { return url; }
  71. }
  72. #if NET_2_0
  73. [MonoTODO]
  74. [System.Runtime.InteropServices.ComVisible(false)]
  75. public override SoapProtocolVersion SoapVersion {
  76. get { throw new NotImplementedException (); }
  77. }
  78. #endif
  79. #endregion // Properties
  80. #region Methods
  81. protected override void EnsureInStage ()
  82. {
  83. EnsureStage (SoapMessageStage.BeforeSerialize);
  84. }
  85. protected override void EnsureOutStage ()
  86. {
  87. EnsureStage (SoapMessageStage.AfterDeserialize);
  88. }
  89. #endregion // Methods
  90. }
  91. }