SoapDocumentServiceAttributeとは? わかりやすく解説

SoapDocumentServiceAttribute クラス

オプションの SoapDocumentServiceAttribute を XML Web サービスに適用することにより、そのサービス内の XML Web サービス メソッドとの間で送受信される SOAP 要求と SOAP 応答の既定の書式を設定できます。

名前空間: System.Web.Services.Protocols
アセンブリ: System.Web.Services (system.web.services.dll 内)
構文構文

<AttributeUsageAttribute(AttributeTargets.Class)> _
Public NotInheritable Class
 SoapDocumentServiceAttribute
    Inherits Attribute
Dim instance As SoapDocumentServiceAttribute
[AttributeUsageAttribute(AttributeTargets.Class)] 
public sealed class SoapDocumentServiceAttribute
 : Attribute
[AttributeUsageAttribute(AttributeTargets::Class)] 
public ref class SoapDocumentServiceAttribute
 sealed : public Attribute
/** @attribute AttributeUsageAttribute(AttributeTargets.Class) */ 
public final class SoapDocumentServiceAttribute
 extends Attribute
AttributeUsageAttribute(AttributeTargets.Class) 
public final class SoapDocumentServiceAttribute
 extends Attribute
解説解説

SoapDocumentServiceAttribute を使用すると、XML Web サービス内の XML Web サービス メソッドについて既定の書式スタイルを設定できます。この既定値を XML Web サービス メソッドごとに変更する必要がある場合は、SoapDocumentMethodAttribute を該当の XML Web サービス メソッドに適用します。

Web サービス記述言語 (WSDL: Web Services Description Language) では、操作を呼び出す XML Web サービス メソッドの SOAP 要求または SOAP 応答における書式として、RPC と Document の 2 つのスタイルを定義しています。個別のメッセージ部分の詳細については、Use プロパティと ParameterStyle プロパティを使用して指定します。Use プロパティは、パラメータの書式として Encoded またはLiteral のいずれかを指定します。ParameterStyle は、パラメータを Body 要素の下で単一のメッセージ部分にカプセル化するかどうか、または各パラメータを独立したメッセージ部分とするかどうかを指定します。

既定のメソッド レベルの書式を RPC に設定するには、SoapRpcServiceAttribute を XML Web サービスを実装しているクラスに適用します。

詳細については、SOAP メッセージ形式のカスタマイズ のトピックを参照してください。

この属性は、XML Web サービスを実装しているクラスに適用できます。

使用例使用例
<%@ 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, _
                             RoutingStyle := SoapServiceRoutingStyle.SoapAction)>
 _
    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
<%@ 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,
                         RoutingStyle=SoapServiceRoutingStyle.SoapAction)]
    public class SumService : System.Web.Services.WebService
    {
        [WebMethod]
        public int Add(int
 a, int b)
        {
            return a + b;
        }
    }
継承階層継承階層
System.Object
   System.Attribute
    System.Web.Services.Protocols.SoapDocumentServiceAttribute
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
SoapDocumentServiceAttribute メンバ
System.Web.Services.Protocols 名前空間
SoapDocumentMethodAttribute クラス
SoapRpcServiceAttribute
その他の技術情報
SOAP メッセージ形式のカスタマイズ

SoapDocumentServiceAttribute コンストラクタ ()

すべてのプロパティを既定値に設定し、SoapDocumentServiceAttribute クラスの新しいインスタンスを初期化します。

名前空間: System.Web.Services.Protocols
アセンブリ: System.Web.Services (system.web.services.dll 内)
構文構文

Dim instance As New SoapDocumentServiceAttribute
public SoapDocumentServiceAttribute ()
public:
SoapDocumentServiceAttribute ()
public SoapDocumentServiceAttribute ()
public function SoapDocumentServiceAttribute
 ()
使用例使用例
<%@ WebService Language="VB" Class="SumService"
 %>

Imports System
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Web.Services.Description

    <SoapDocumentService(RoutingStyle:=SoapServiceRoutingStyle.SoapAction)>
 _
    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
<%@ WebService Language="c#" Class="SumService" %>

using System;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Web.Services.Description;

    [SoapDocumentService(RoutingStyle=SoapServiceRoutingStyle.SoapAction)]
    public class SumService : System.Web.Services.WebService
    {
        [WebMethod]
        public int Add(int
 a, int b)
        {
            return a + b;
        }
    }
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
SoapDocumentServiceAttribute クラス
SoapDocumentServiceAttribute メンバ
System.Web.Services.Protocols 名前空間

SoapDocumentServiceAttribute コンストラクタ (SoapBindingUse, SoapParameterStyle)

パラメータの書式を指定し、SOAP メッセージ内の Body 要素の下で単一の XML 要素内にパラメータをカプセル化するかどうかを指定する SoapDocumentServiceAttribute クラスの新しいインスタンスを初期化します。

名前空間: System.Web.Services.Protocols
アセンブリ: System.Web.Services (system.web.services.dll 内)
構文構文

Public Sub New ( _
    use As SoapBindingUse, _
    paramStyle As SoapParameterStyle _
)
Dim use As SoapBindingUse
Dim paramStyle As SoapParameterStyle

Dim instance As New SoapDocumentServiceAttribute(use,
 paramStyle)
public SoapDocumentServiceAttribute (
    SoapBindingUse use,
    SoapParameterStyle paramStyle
)
public:
SoapDocumentServiceAttribute (
    SoapBindingUse use, 
    SoapParameterStyle paramStyle
)
public SoapDocumentServiceAttribute (
    SoapBindingUse use, 
    SoapParameterStyle paramStyle
)
public function SoapDocumentServiceAttribute
 (
    use : SoapBindingUse, 
    paramStyle : SoapParameterStyle
)

パラメータ

use

パラメータの書式スタイル。Use プロパティを設定します。

paramStyle

XML Web サービス内の XML Web サービス メソッドとの間で送受信される SOAP メッセージで、Body 要素の下にある単一の XML 要素内にパラメータをカプセル化するかどうかを設定します。ParameterStyle プロパティを設定します。

使用例使用例
<%@ 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
<%@ 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;
        }
    }
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
SoapDocumentServiceAttribute クラス
SoapDocumentServiceAttribute メンバ
System.Web.Services.Protocols 名前空間

SoapDocumentServiceAttribute コンストラクタ (SoapBindingUse)

パラメータの書式を指定し、SoapDocumentServiceAttribute クラスの新しいインスタンスを初期化します。

名前空間: System.Web.Services.Protocols
アセンブリ: System.Web.Services (system.web.services.dll 内)
構文構文

Public Sub New ( _
    use As SoapBindingUse _
)
Dim use As SoapBindingUse

Dim instance As New SoapDocumentServiceAttribute(use)
public SoapDocumentServiceAttribute (
    SoapBindingUse use
)
public:
SoapDocumentServiceAttribute (
    SoapBindingUse use
)
public SoapDocumentServiceAttribute (
    SoapBindingUse use
)
public function SoapDocumentServiceAttribute
 (
    use : SoapBindingUse
)

パラメータ

use

XML Web サービスのパラメータの書式スタイル。Use プロパティを設定します。

使用例使用例
<%@ WebService Language="VB" Class="SumService"
 %>

Imports System
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Web.Services.Description

    <SoapDocumentService(SoapBindingUse.Encoded)> _
    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
<%@ WebService Language="c#" Class="SumService" %>

using System;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Web.Services.Description;

    [SoapDocumentService(SoapBindingUse.Encoded)]
    public class SumService : System.Web.Services.WebService
    {
        [WebMethod]
        public int Add(int
 a, int b)
        {
            return a + b;
        }
    }
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
SoapDocumentServiceAttribute クラス
SoapDocumentServiceAttribute メンバ
System.Web.Services.Protocols 名前空間

SoapDocumentServiceAttribute コンストラクタ

SoapDocumentServiceAttribute クラスの新しいインスタンスを初期化します。
オーバーロードの一覧オーバーロードの一覧

名前 説明
SoapDocumentServiceAttribute () すべてのプロパティを既定値に設定し、SoapDocumentServiceAttribute クラスの新しいインスタンスを初期化します。

.NET Compact Framework によってサポートされています。

SoapDocumentServiceAttribute (SoapBindingUse) パラメータの書式を指定し、SoapDocumentServiceAttribute クラスの新しいインスタンスを初期化します。

.NET Compact Framework によってサポートされています。

SoapDocumentServiceAttribute (SoapBindingUse, SoapParameterStyle) パラメータの書式を指定し、SOAP メッセージ内の Body 要素の下で単一の XML 要素内にパラメータをカプセル化するかどうかを指定する SoapDocumentServiceAttribute クラスの新しいインスタンスを初期化します。

.NET Compact Framework によってサポートされています。

参照参照

関連項目

SoapDocumentServiceAttribute クラス
SoapDocumentServiceAttribute メンバ
System.Web.Services.Protocols 名前空間

SoapDocumentServiceAttribute プロパティ


パブリック プロパティパブリック プロパティ

参照参照

関連項目

SoapDocumentServiceAttribute クラス
System.Web.Services.Protocols 名前空間
SoapDocumentMethodAttribute クラス
SoapRpcServiceAttribute

その他の技術情報

SOAP メッセージ形式のカスタマイズ

SoapDocumentServiceAttribute メソッド


パブリック メソッドパブリック メソッド

( プロテクト メソッド も参照)
  名前 説明
パブリック メソッド Equals  オーバーロードされます。 ( Attribute から継承されます。)
パブリック メソッド GetCustomAttribute  オーバーロードされます。 アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用された指定した型のカスタム属性を取得します。 ( Attribute から継承されます。)
パブリック メソッド GetCustomAttributes  オーバーロードされます。 アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用されたカスタム属性の配列を取得します。 ( Attribute から継承されます。)
パブリック メソッド GetHashCode  このインスタンスのハッシュ コードを返します。 ( Attribute から継承されます。)
パブリック メソッド GetType  現在のインスタンスの Type を取得します。 ( Object から継承されます。)
パブリック メソッド IsDefaultAttribute  派生クラス内でオーバーライドされたときに、このインスタンスの値が派生クラスの既定値かどうかを示します。 ( Attribute から継承されます。)
パブリック メソッド IsDefined  オーバーロードされます。 指定した型のカスタム属性が、アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用されているかどうかを判断します。 ( Attribute から継承されます。)
パブリック メソッド Match  派生クラス内でオーバーライドされたときに、指定したオブジェクトとこのインスタンスが等しいかどうかを示す値を返します。 ( Attribute から継承されます。)
パブリック メソッド ReferenceEquals  指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。)
パブリック メソッド ToString  現在の Object を表す String を返します。 ( Object から継承されます。)
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

SoapDocumentServiceAttribute クラス
System.Web.Services.Protocols 名前空間
SoapDocumentMethodAttribute クラス
SoapRpcServiceAttribute

その他の技術情報

SOAP メッセージ形式のカスタマイズ

SoapDocumentServiceAttribute メンバ

オプションの SoapDocumentServiceAttribute を XML Web サービスに適用することにより、そのサービス内の XML Web サービス メソッドとの間で送受信される SOAP 要求と SOAP 応答の既定の書式を設定できます。

SoapDocumentServiceAttribute データ型で公開されるメンバを以下の表に示します。


パブリック コンストラクタパブリック コンストラクタ
  名前 説明
パブリック メソッド SoapDocumentServiceAttribute オーバーロードされます。 SoapDocumentServiceAttribute クラスの新しいインスタンスを初期化します。
パブリック プロパティパブリック プロパティ
パブリック メソッドパブリック メソッド
( プロテクト メソッド も参照)
  名前 説明
パブリック メソッド Equals  オーバーロードされます。 ( Attribute から継承されます。)
パブリック メソッド GetCustomAttribute  オーバーロードされます。 アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用された指定した型のカスタム属性を取得します。 (Attribute から継承されます。)
パブリック メソッド GetCustomAttributes  オーバーロードされます。 アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用されたカスタム属性の配列を取得します。 (Attribute から継承されます。)
パブリック メソッド GetHashCode  このインスタンスのハッシュ コードを返します。 (Attribute から継承されます。)
パブリック メソッド GetType  現在のインスタンスの Type を取得します。 (Object から継承されます。)
パブリック メソッド IsDefaultAttribute  派生クラス内でオーバーライドされたときに、このインスタンスの値が派生クラスの既定値かどうかを示します。 (Attribute から継承されます。)
パブリック メソッド IsDefined  オーバーロードされます。 指定した型のカスタム属性が、アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用されているかどうかを判断します。 (Attribute から継承されます。)
パブリック メソッド Match  派生クラス内でオーバーライドされたときに、指定したオブジェクトとこのインスタンスが等しいかどうかを示す値を返します。 (Attribute から継承されます。)
パブリック メソッド ReferenceEquals  指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。)
パブリック メソッド ToString  現在の Object を表す String を返します。 (Object から継承されます。)
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

SoapDocumentServiceAttribute クラス
System.Web.Services.Protocols 名前空間
SoapDocumentMethodAttribute クラス
SoapRpcServiceAttribute

その他の技術情報

SOAP メッセージ形式のカスタマイズ



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

「SoapDocumentServiceAttribute」の関連用語

SoapDocumentServiceAttributeのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



SoapDocumentServiceAttributeのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS