SoapException.cs 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. //
  2. // System.Web.Services.Protocols.SoapException.cs
  3. //
  4. // Author:
  5. // Tim Coleman ([email protected])
  6. //
  7. // Copyright (C) Tim Coleman, 2002
  8. //
  9. using System.Xml;
  10. namespace System.Web.Services.Protocols {
  11. public class SoapException : SystemException {
  12. #region Fields
  13. public static readonly XmlQualifiedName ClientFaultCode = new XmlQualifiedName ("Client", "http://schemas.xmlsoap.org/soap/envelope/");
  14. public static readonly XmlQualifiedName DetailElementName = new XmlQualifiedName ("detail");
  15. public static readonly XmlQualifiedName MustUnderstandFaultCode = new XmlQualifiedName ("MustUnderstand", "http://schemas.xmlsoap.org/soap/envelope/");
  16. public static readonly XmlQualifiedName ServerFaultCode = new XmlQualifiedName ("Server", "http://schemas.xmlsoap.org/soap/envelope/");
  17. public static readonly XmlQualifiedName VersionMismatchFaultCode = new XmlQualifiedName ("VersionMismatch", "http://schemas.xmlsoap.org/soap/envelope/");
  18. string actor;
  19. XmlQualifiedName code;
  20. XmlNode detail;
  21. #endregion
  22. #region Constructors
  23. public SoapException (string message, XmlQualifiedName code)
  24. : base (message)
  25. {
  26. this.code = code;
  27. }
  28. public SoapException (string message, XmlQualifiedName code, Exception innerException)
  29. : base (message, innerException)
  30. {
  31. this.code = code;
  32. }
  33. public SoapException (string message, XmlQualifiedName code, string actor)
  34. : base (message)
  35. {
  36. this.code = code;
  37. this.actor = actor;
  38. }
  39. public SoapException (string message, XmlQualifiedName code, string actor, Exception innerException)
  40. : base (message, innerException)
  41. {
  42. this.code = code;
  43. this.actor = actor;
  44. }
  45. public SoapException (string message, XmlQualifiedName code, string actor, XmlNode detail)
  46. : base (message)
  47. {
  48. this.code = code;
  49. this.actor = actor;
  50. this.detail = detail;
  51. }
  52. public SoapException (string message, XmlQualifiedName code, string actor, XmlNode detail, Exception innerException)
  53. : base (message, innerException)
  54. {
  55. this.code = code;
  56. this.actor = actor;
  57. this.detail = detail;
  58. }
  59. #endregion // Constructors
  60. #region Properties
  61. public string Actor {
  62. get { return actor; }
  63. }
  64. public XmlQualifiedName Code {
  65. get { return code; }
  66. }
  67. public XmlNode Detail {
  68. get { return detail; }
  69. }
  70. #endregion // Properties
  71. }
  72. }