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