This topic has not yet been rated - Rate this topic

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.

Namespace: System.Web.Services.Protocols
Assembly: System.Web.Services (in system.web.services.dll)
public SoapParameterStyle ParameterStyle { get; set; }
/** @property */
public SoapParameterStyle get_ParameterStyle ()

/** @property */
public void set_ParameterStyle (SoapParameterStyle value)

public function get ParameterStyle () : SoapParameterStyle

public function set ParameterStyle (value : SoapParameterStyle)

Not applicable.

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

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0, 1.0
Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.