SoapException Class

 

Represents the exception that is thrown when an XML Web service method is called over SOAP and an exception occurs.

Namespace:   System.Web.Services.Protocols
Assembly:  System.Web.Services (in System.Web.Services.dll)

System.Object
  System.Exception
    System.SystemException
      System.Web.Services.Protocols.SoapException
        System.Web.Services.Protocols.SoapHeaderException

[SerializableAttribute]
public class SoapException : SystemException

NameDescription
System_CAPS_pubmethodSoapException()

Initializes a new instance of the SoapException class.

System_CAPS_protmethodSoapException(SerializationInfo, StreamingContext)

Initializes a new instance of the SoapException class with serialized data.

System_CAPS_pubmethodSoapException(String, XmlQualifiedName)

Initializes a new instance of the SoapException class with the specified exception message and exception code.

System_CAPS_pubmethodSoapException(String, XmlQualifiedName, Exception)

Initializes a new instance of the SoapException class with the specified exception message, exception code, and reference to the root cause of the exception.

System_CAPS_pubmethodSoapException(String, XmlQualifiedName, SoapFaultSubCode)

Initializes a new instance of the SoapException class with the specified exception message, exception code, and subcode.

System_CAPS_pubmethodSoapException(String, XmlQualifiedName, String)

Initializes a new instance of the SoapException class with the specified exception message, exception code, and URI that identifies the piece of code that caused the exception.

System_CAPS_pubmethodSoapException(String, XmlQualifiedName, String, Exception)

Initializes a new instance of the SoapException class with the specified exception message, exception code, URI that identifies the code that caused the exception, and reference to the root cause of the exception.

System_CAPS_pubmethodSoapException(String, XmlQualifiedName, String, String, String, XmlNode, SoapFaultSubCode, Exception)

Initializes a new instance of the SoapException class with the specified exception message, exception code, URI that identifies the piece of code that caused the exception, URI that represents the XML Web service's function in processing the SOAP message, the human language associated with the exception, the application-specific exception information, the subcode for the SOAP fault and reference to the root cause of the exception.

System_CAPS_pubmethodSoapException(String, XmlQualifiedName, String, String, XmlNode, SoapFaultSubCode, Exception)

Initializes a new instance of the SoapException class with the specified exception message, exception code, URI that identifies the piece of code that caused the exception, application-specific exception information, and reference to the root cause of the exception.

System_CAPS_pubmethodSoapException(String, XmlQualifiedName, String, XmlNode)

Initializes a new instance of the SoapException class with the specified exception message, exception code, URI that identifies the piece of code that caused the exception, and application specific exception information.

System_CAPS_pubmethodSoapException(String, XmlQualifiedName, String, XmlNode, Exception)

Initializes a new instance of the SoapException class with the specified exception message, exception code, URI that identifies the piece of code that caused the exception, application-specific exception information, and reference to the root cause of the exception.

NameDescription
System_CAPS_pubpropertyActor

Gets the piece of code that caused the exception.

System_CAPS_pubpropertyCode

Gets the type of SOAP fault code.

System_CAPS_pubpropertyData

Gets a collection of key/value pairs that provide additional user-defined information about the exception.(Inherited from Exception.)

System_CAPS_pubpropertyDetail

Gets an XmlNode that represents the application-specific error information details.

System_CAPS_pubpropertyHelpLink

Gets or sets a link to the help file associated with this exception.(Inherited from Exception.)

System_CAPS_pubpropertyHResult

Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception.(Inherited from Exception.)

System_CAPS_pubpropertyInnerException

Gets the Exception instance that caused the current exception.(Inherited from Exception.)

System_CAPS_pubpropertyLang

Gets the human language associated with the exception.

System_CAPS_pubpropertyMessage

Gets a message that describes the current exception.(Inherited from Exception.)

System_CAPS_pubpropertyNode

Gets a URI that represents the piece of code that caused the exception.

System_CAPS_pubpropertyRole

Gets a URI that represents the XML Web service's function in processing the SOAP message.

System_CAPS_pubpropertySource

Gets or sets the name of the application or the object that causes the error.(Inherited from Exception.)

System_CAPS_pubpropertyStackTrace

Gets a string representation of the immediate frames on the call stack.(Inherited from Exception.)

System_CAPS_pubpropertySubCode

Gets the optional error information contained in the subcode XML element of a SOAP fault.

System_CAPS_pubpropertyTargetSite

Gets the method that throws the current exception.(Inherited from Exception.)

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetBaseException()

When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions.(Inherited from Exception.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetObjectData(SerializationInfo, StreamingContext)

Sets the T:System.Runtime.Serialization.SerializationInfo with information about the exception.(Overrides Exception.GetObjectData(SerializationInfo, StreamingContext).)

System_CAPS_pubmethodGetType()

Gets the runtime type of the current instance.(Inherited from Exception.)

System_CAPS_pubmethodSystem_CAPS_staticIsClientFaultCode(XmlQualifiedName)

Returns a value that indicates whether the SOAP fault code is equivalent to the Client SOAP fault code regardless of the version of the SOAP protocol used.

System_CAPS_pubmethodSystem_CAPS_staticIsMustUnderstandFaultCode(XmlQualifiedName)

Returns a value that indicates whether the SOAP fault code is equivalent to MustUnderstand regardless of the version of the SOAP protocol used.

System_CAPS_pubmethodSystem_CAPS_staticIsServerFaultCode(XmlQualifiedName)

Returns a value that indicates whether the SOAP fault code is equivalent to the Server SOAP fault code regardless of the version of the SOAP protocol used.

System_CAPS_pubmethodSystem_CAPS_staticIsVersionMismatchFaultCode(XmlQualifiedName)

Returns a value that indicates whether the SOAP fault code is equivalent to the VersionMismatch SOAP fault code regardless of the version of the SOAP protocol used.

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Creates and returns a string representation of the current exception.(Inherited from Exception.)

NameDescription
System_CAPS_pubfieldSystem_CAPS_staticClientFaultCode

Specifies a SOAP fault code that represents a client call that is not formatted correctly or does not contain the appropriate information.

System_CAPS_pubfieldSystem_CAPS_staticDetailElementName

Gets an XmlQualifiedName that represents the Detail element of a SOAP Fault code.

System_CAPS_pubfieldSystem_CAPS_staticMustUnderstandFaultCode

A SOAP Fault Code that represents a SOAP element marked with the MustUnderstand attribute was not processed.

System_CAPS_pubfieldSystem_CAPS_staticServerFaultCode

Specifies that a SOAP fault code that represents an error occurred during the processing of a client call on the server, where the problem is not due to the message contents.

System_CAPS_pubfieldSystem_CAPS_staticVersionMismatchFaultCode

A SOAP fault code that represents an invalid namespace for a SOAP envelope was found during the processing of the SOAP message.

NameDescription
System_CAPS_proteventSerializeObjectState

Occurs when an exception is serialized to create an exception state object that contains serialized data about the exception.(Inherited from Exception.)

The SoapException can either be thrown by the common language runtime or by an XML Web service method. The common language runtime can throw a SoapException if a response to a request is not formatted correctly. XML Web service methods can generate a SoapException by simply throwing an exception within the XML Web service method. If the client accessed the method over SOAP, the exception is caught on the server and wrapped inside a new SoapException. The SoapException thrown has the following property values:

Property

Value

Message

The Message property of the original exception.

Code

ServerFaultCode.

Actor

The URL of the XML Web service method.

Detail

null, but an empty detail element is present in the fault element.

An XML Web service method might throw a SoapException when clients call using SOAP. If an XML Web service throws the SoapException, other details can be added through the Actor, Code and Detail properties that cannot otherwise be set by an XML Web service method if another type of exception is thrown.

The following example throws a SoapException where the XML Web service method sets the Detail property.

.NET Framework
Available since 1.1

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: