SoapDocumentServiceAttribute.ParameterStyle Property
Gets or sets the default setting that controls whether parameters are encapsulated within a single element following the <Body> element in the XML portion of a SOAP message for XML Web service methods of the XML Web service.
[Visual Basic] Public Property ParameterStyle As SoapParameterStyle [C#] public SoapParameterStyle ParameterStyle {get; set;} [C++] public: __property SoapParameterStyle get_ParameterStyle(); public: __property void set_ParameterStyle(SoapParameterStyle); [JScript] public function get ParameterStyle() : SoapParameterStyle; public function set ParameterStyle(SoapParameterStyle);
Property Value
The default SoapParameterStyle for SOAP requests and SOAP responses to and from XML Web service methods within the XML Web service. If not set, the default is Wrapped.
Example
[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.
Requirements
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework
See Also
SoapDocumentServiceAttribute Class | SoapDocumentServiceAttribute Members | System.Web.Services.Protocols Namespace | SoapParameterStyle | Customizing SOAP Messages