
SoapException | 617
Protocols
Namespace
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
SoapDocumentServiceAttribute
System.Web.Services.Protocols (system.web.services.dll)
sealed class
This attribute can be applied to a web service’s class declaration. It specifies that the
default encoding for SOAP request and response messages will be Document. The
client can override this default by using the SoapRpcMethodAttribute. This attribute is rarely
used because the default in ASP.NET proxy classes is already Document encoding.
Hierarchy
System.Object ➝ System.Attribute ➝ SoapDocumentServiceAttribute
Valid On
Class
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 SoapExcep-
tion 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 infor-
mation about exceptions. To do so, catch any server errors and create and throw a
corresponding SoapException object. You ...