a System.Xml.XmlQualifiedName
The SoapException.Code property can only be set when creating a new instance of the System.Web.Services.Protocols.SoapException class.
The System.Web.Services.Protocols.SoapException class is for use by XML Web service clients that call XML Web service methods over SOAP. ASP.NET handles whether the client that calls uses SOAP. This is when an exception occurs in an XML Web service. If the client uses SOAP, ASP.NET wraps the specific exception into a System.Web.Services.Protocols.SoapException and sets the SoapException.Actor and SoapException.Code properties.
The set of available codes, known as SOAP Fault Codes for SOAP protocol version 1.1, are the following:
SoapException.VersionMismatchFaultCode |
An invalid namespace for a SOAP envelope was found. |
SoapException.MustUnderstandFaultCode |
Not all SOAP elements require processing. However, if a SOAP element is marked with the MustUnderstand attribute with a value of 1, it is required. Failure to process the element generates this exception. |
SoapException.ClientFaultCode |
A client call was not formatted correctly or did not contain the appropriate information. For example, the client call might not have the proper authentication or payment information. It is generally an indication that the message must be changed before it is resent. |
SoapException.ServerFaultCode |
An error occurred during the processing of a client call on the server, however, the problem is not due to the message contents. For example, an upstream server might not respond to a request due to network problems. Typically, with this type of exception, the client call might succeed later. If an XML Web service throws an exception, other than System.Web.Services.Protocols.SoapException and the client calls using SOAP, ASP.NET converts the exception to a System.Web.Services.Protocols.SoapException, setting the SoapException.Code property to SoapException.ServerFaultCode and throws it back to the client. |