SoapDocumentServiceAttribute.ParameterStyle 속성

정의

XML Web services의 XML Web services 메서드에 대한 SOAP 메시지의 XML 부분에 있는 <Body> 요소 다음에 오는 단일 요소 내에서 매개 변수가 캡슐화되는지 여부를 제어하는 기본 설정을 가져오거나 설정합니다.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:
 property System::Web::Services::Protocols::SoapParameterStyle ParameterStyle { System::Web::Services::Protocols::SoapParameterStyle get(); void set(System::Web::Services::Protocols::SoapParameterStyle value); };
public System.Web.Services.Protocols.SoapParameterStyle ParameterStyle { get; set; }
member this.ParameterStyle : System.Web.Services.Protocols.SoapParameterStyle with get, set
Public Property ParameterStyle As SoapParameterStyle

속성 값

XML Web services의 XML Web services 메서드가 적용되는 SOAP 요청 및 SOAP 응답의 기본 SoapParameterStyle입니다.The default SoapParameterStyle for SOAP requests and SOAP responses to and from XML Web service methods within the XML Web service. 기본값은 설정하지 않으면 Wrapped이 됩니다.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;
        }
    }
<%@ 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

적용 대상

추가 정보