SoapDocumentServiceAttribute Constructor
Initializes a new instance of the SoapDocumentServiceAttribute class.
Overload List
Initializes a new instance of the SoapDocumentServiceAttribute class setting all properties to their default values.
Supported by the .NET Compact Framework.
[Visual Basic] Public Sub New()
[C#] public SoapDocumentServiceAttribute();
[C++] public: SoapDocumentServiceAttribute();
[JScript] public function SoapDocumentServiceAttribute();
Initializes a new instance of the SoapDocumentServiceAttribute class setting the parameter formatting.
Supported by the .NET Compact Framework.
[Visual Basic] Public Sub New(SoapBindingUse)
[C#] public SoapDocumentServiceAttribute(SoapBindingUse);
[C++] public: SoapDocumentServiceAttribute(SoapBindingUse);
[JScript] public function SoapDocumentServiceAttribute(SoapBindingUse);
Initializes a new instance of the SoapDocumentServiceAttribute class that sets the parameter formatting and sets whether parameters are encapsulated within a single XML element, under the Body element, in SOAP messages.
Supported by the .NET Compact Framework.
[Visual Basic] Public Sub New(SoapBindingUse, SoapParameterStyle)
[C#] public SoapDocumentServiceAttribute(SoapBindingUse, SoapParameterStyle);
[C++] public: SoapDocumentServiceAttribute(SoapBindingUse, SoapParameterStyle);
[JScript] public function SoapDocumentServiceAttribute(SoapBindingUse, SoapParameterStyle);
Example
[Visual Basic, C#] Note This example shows how to use one of the overloaded versions of the SoapDocumentServiceAttribute constructor. For other examples that might be available, see the individual overload topics.
[Visual Basic] <%@ WebService Language="VB" Class="SumService" %> Imports System Imports System.Web.Services Imports System.Web.Services.Protocols Imports System.Web.Services.Description <SoapDocumentService(SoapBindingUse.Literal, _ SoapParameterStyle.Wrapped)> _ Public Class SumService Inherits System.Web.Services.WebService <WebMethod> _ Public Function Add(a As Integer, b as Integer) return a + b End Function End Class [C#] <%@ WebService Language="c#" Class="SumService" %> using System; using System.Web.Services; using System.Web.Services.Protocols; using System.Web.Services.Description; [SoapDocumentService(SoapBindingUse.Literal, SoapParameterStyle.Wrapped)] public class SumService : System.Web.Services.WebService { [WebMethod] public int Add(int a, int b) { return a + b; } }
[C++, JScript] No example is available for C++ or JScript. To view a Visual Basic or C# example, click the Language Filter button
in the upper-left corner of the page.
See Also
SoapDocumentServiceAttribute Class | SoapDocumentServiceAttribute Members | System.Web.Services.Protocols Namespace