Export (0) Print
Expand All

SoapDocumentMethodAttribute.ParameterStyle Property

Gets or sets whether parameters are encapsulated within a single XML element beneath the Body element in the XML portion of a SOAP message.

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 SoapParameterStyle for SOAP messages sent to and from an XML Web service method. The default value is Wrapped.

The following code example specifies that parameters sent in the SOAP messages sent to and from the PlaceOrder XML Web service method are not encapsulated within one XML element.

<%@ WebService Language="C#" Class="ShoppingCart" %>
 
 using System.Web.Services;
 using System.Web.Services.Protocols;
 using System;

 public class ShoppingCart 
 {
       // Specify that parameters are not encapsulated within one XML element.
       [ SoapDocumentMethod(ParameterStyle=SoapParameterStyle.Bare) ]
       [ WebMethod]
       public void PlaceOrder(OrderItem OrderDetails) 
       {
        // Process the order on the back end.
       }      
 }

public class OrderItem
{
  public int Count;
  public int Description;
  public DateTime OrderDate;
  public long CustomerID;
  public Decimal Cost;
}



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

Community Additions

ADD
Show:
© 2015 Microsoft