DekGenius.com
[ Team LiB ] Previous Section Next Section

SoapException

System.Web.Services.Protocols (system.web.services.dll)class

This class is a generic exception for SOAP-related problems. The Common Language Runtime can throw a SoapException when it encounters an incorrectly formatted SOAP message. Also, any error that occurs inside a web service method is caught on the server and returned to the client as a SoapException. ASP.NET will then set the SoapException property (which identifies the web service URL) and the Code property (using one of the fault code fields) automatically.

When you are creating your own web methods, you may need to provide more information about exceptions. To do so, catch any server errors and create and throw a corresponding SoapException object. You can specify application-specific details about the error by adding custom XML content to the Detail property.

public class SoapException : SystemException {
// Public Constructors
   public SoapException(string message, System.Xml.XmlQualifiedName code);
   public SoapException(string message, System.Xml.XmlQualifiedName code, 
      Exception innerException);
   public SoapException(string message, System.Xml.XmlQualifiedName code, 
      string actor);
   public SoapException(string message, System.Xml.XmlQualifiedName code, 
      string actor, Exception innerException);
   public SoapException(string message, System.Xml.XmlQualifiedName code, 
      string actor, System.Xml.XmlNode detail);
   public SoapException(string message, System.Xml.XmlQualifiedName code, 
      string actor, System.Xml.XmlNode detail, Exception innerException);
// Public Static Fields
   public static readonly XmlQualifiedName ClientFaultCode;
      // =http://schemas.xmlsoap.org/soap/envelope/:Client
   public static readonly XmlQualifiedName DetailElementName;
      // =detail
   public static readonly XmlQualifiedName MustUnderstandFaultCode;
      // =http://schemas.xmlsoap.org/soap/envelope/:MustUnderstand
   public static readonly XmlQualifiedName ServerFaultCode;
      // =http://schemas.xmlsoap.org/soap/envelope/:Server
   public static readonly XmlQualifiedName VersionMismatchFaultCode;
      // =http://schemas.xmlsoap.org/soap/envelope/:VersionMismatch
// Public Instance Properties
   public string Actor{get; }
   public XmlQualifiedName Code{get; }
   public XmlNode Detail{get; }
}

Hierarchy

System.Object System.Exception(System.Runtime.Serialization.ISerializable) System.SystemException SoapException

Subclasses

SoapHeaderException

Returned By

SoapMessage.Exception

    [ Team LiB ] Previous Section Next Section