System.Web.Services.Protocols.SoapDocumentServiceAttribute Class

Applying the optional System.Web.Services.Protocols.SoapDocumentServiceAttribute to an XML Web service sets the default format of SOAP requests and responses sent to and from XML Web service methods within the XML Web service.

See Also: SoapDocumentServiceAttribute Members


[System.AttributeUsage(System.AttributeTargets.Class, Inherited=true)]
public sealed class SoapDocumentServiceAttribute : Attribute


The System.Web.Services.Protocols.SoapDocumentServiceAttribute allows you to set the default formatting styles for XML Web service methods within an XML Web service. If an individual XML Web service method must change these defaults, apply a System.Web.Services.Protocols.SoapDocumentMethodAttribute to that XML Web service method.

Web Services Description Language (WSDL) defines two styles for how an XML Web service method, which it calls an operation, can be formatted in a SOAP request or a SOAP response: RPC and Document. Exactly how the individual message parts is determined by the SoapDocumentServiceAttribute.Use and SoapDocumentServiceAttribute.ParameterStyle properties. The SoapDocumentServiceAttribute.Use property determines whether parameters are formatted Encoded or Literal. The SoapDocumentServiceAttribute.ParameterStyle determines whether the parameters are encapsulated within a single message part beneath the Body element, or whether each parameter is an individual message part.

To set the default method level formatting to RPC, apply a System.Web.Services.Protocols.SoapRpcServiceAttribute to the class implementing the XML Web service.

For more details, see [<topic://cpconCustomizingSOAPInASPNETWebServicesWebServiceClients>].

This attribute can be applied to a class implementing an XML Web service.


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