SoapDocumentServiceAttribute.ParameterStyle Property

Definition

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.

public System.Web.Services.Protocols.SoapParameterStyle ParameterStyle { get; set; }

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.

Examples

<%@ 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;
        }
    }

Applies to

Produkt Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also