2002-07-21 Tim Coleman <tim@timcoleman.com>
[mono.git] / mcs / class / System.Web.Services / System.Web.Services.Protocols / SoapException.cs
1 // \r
2 // System.Web.Services.Protocols.SoapException.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.Xml;\r
11 \r
12 namespace System.Web.Services.Protocols {\r
13         public class SoapException : SystemException {\r
14 \r
15                 #region Fields\r
16 \r
17                 public static readonly XmlQualifiedName ClientFaultCode = new XmlQualifiedName ("Client", "http://schemas.xmlsoap.org/soap/envelope/");\r
18                 public static readonly XmlQualifiedName DetailElementName = new XmlQualifiedName ("detail");\r
19                 public static readonly XmlQualifiedName MustUnderstandFaultCode = new XmlQualifiedName ("MustUnderstand", "http://schemas.xmlsoap.org/soap/envelope/");\r
20                 public static readonly XmlQualifiedName ServerFaultCode = new XmlQualifiedName ("Server", "http://schemas.xmlsoap.org/soap/envelope/");\r
21                 public static readonly XmlQualifiedName VersionMismatchFaultCode = new XmlQualifiedName ("VersionMismatch", "http://schemas.xmlsoap.org/soap/envelope/");\r
22 \r
23                 string actor;\r
24                 XmlQualifiedName code;\r
25                 XmlNode detail;\r
26 \r
27                 #endregion\r
28 \r
29                 #region Constructors\r
30 \r
31                 public SoapException (string message, XmlQualifiedName code)\r
32                 {\r
33                         this.code = code;\r
34                 }\r
35 \r
36                 public SoapException (string message, XmlQualifiedName code, Exception innerException)\r
37                         : this (message, code)\r
38                 {\r
39                 }\r
40 \r
41                 public SoapException (string message, XmlQualifiedName code, string actor)\r
42                         : this (message, code)\r
43                 {\r
44                         this.actor = actor;\r
45                 }\r
46 \r
47                 public SoapException (string message, XmlQualifiedName code, string actor, Exception innerException)\r
48                         : this (message, code, actor)\r
49                 {\r
50                 }\r
51 \r
52                 public SoapException (string message, XmlQualifiedName code, string actor, XmlNode detail)\r
53                         : this (message, code, actor)\r
54                 {\r
55                         this.detail = detail;\r
56                 }\r
57 \r
58                 public SoapException (string message, XmlQualifiedName code, string actor, XmlNode detail, Exception innerException)\r
59                         : this (message, code, actor, detail)\r
60                 {\r
61                 }\r
62 \r
63                 #endregion // Constructors\r
64 \r
65                 #region Properties\r
66 \r
67                 public string Actor {\r
68                         get { return actor; }\r
69                 }\r
70 \r
71                 public XmlQualifiedName Code {\r
72                         get { return code; }\r
73                 }\r
74 \r
75                 public XmlNode Detail {\r
76                         get { return detail; }\r
77                 }\r
78 \r
79                 #endregion // Properties\r
80         }\r
81 }\r