次の方法で共有


SoapDocumentServiceAttribute.ParameterStyle プロパティ

XML Web サービスの XML Web サービス メソッドに対する SOAP メッセージの XML 部分で、 <Body> 要素の後に続く単一の要素内にパラメータをカプセル化するかどうかを制御する既定の設定を取得または設定します。

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);

プロパティ値

XML Web サービス内の XML Web サービス メソッドとの間で送受信される SOAP 要求と SOAP 応答の既定の SoapParameterStyle 。この値を設定しない場合、既定値は Wrapped になります。

使用例

 
<%@ 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] C++ および JScript のサンプルはありません。Visual Basic および C# のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン 言語のフィルタ をクリックします。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ, .NET Compact Framework - Windows CE .NET

参照

SoapDocumentServiceAttribute クラス | SoapDocumentServiceAttribute メンバ | System.Web.Services.Protocols 名前空間 | SoapParameterStyle | SOAP メッセージのカスタマイズ