91f82d8e1f0975a7e0a324dc2200c85834791075
[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 Properties\r
26 \r
27                 public abstract string Action {\r
28                         get;\r
29                 }\r
30 \r
31                 public string ContentType {\r
32                         get { return contentType; }\r
33                         set { contentType = value; }\r
34                 }\r
35 \r
36                 public SoapException Exception {\r
37                         get { return exception; }\r
38                 }\r
39 \r
40                 public SoapHeaderCollection Headers {\r
41                         get { return headers; }\r
42                 }\r
43 \r
44                 public abstract LogicalMethodInfo MethodInfo {\r
45                         get;\r
46                 }\r
47 \r
48                 public abstract bool OneWay {\r
49                         get;\r
50                 }\r
51 \r
52                 public SoapMessageStage Stage {\r
53                         get { return stage; }\r
54                 }\r
55 \r
56                 public Stream Stream {\r
57                         [MonoTODO]\r
58                         get { throw new NotImplementedException (); }\r
59                 }\r
60 \r
61                 public abstract string Url {\r
62                         get;\r
63                 }\r
64 \r
65                 #endregion Properties\r
66 \r
67                 #region Methods\r
68 \r
69                 protected abstract void EnsureInStage ();\r
70                 protected abstract void EnsureOutStage ();\r
71 \r
72                 protected void EnsureStage (SoapMessageStage stage) \r
73                 {\r
74                         if ((((int) stage) & ((int) Stage)) == 0)\r
75                                 throw new InvalidOperationException ("The current SoapMessageStage is not the asserted stage or stages.");\r
76                 }\r
77 \r
78                 [MonoTODO]\r
79                 public object GetInParameterValue (int index) \r
80                 {\r
81                         throw new NotImplementedException ();\r
82                 }\r
83 \r
84                 [MonoTODO]\r
85                 public object GetOutParameterValue (int index) \r
86                 {\r
87                         throw new NotImplementedException ();\r
88                 }\r
89 \r
90                 [MonoTODO]\r
91                 public object GetReturnValue ()\r
92                 {\r
93                         throw new NotImplementedException ();\r
94                 }\r
95 \r
96                 #endregion // Methods\r
97         }\r
98 }\r