SoapDocumentServiceAttribute クラス
アセンブリ: System.Web.Services (system.web.services.dll 内)

<AttributeUsageAttribute(AttributeTargets.Class)> _ Public NotInheritable Class SoapDocumentServiceAttribute Inherits Attribute
[AttributeUsageAttribute(AttributeTargets.Class)] public sealed class SoapDocumentServiceAttribute : Attribute
[AttributeUsageAttribute(AttributeTargets::Class)] public ref class SoapDocumentServiceAttribute sealed : public 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 サービスを実装しているクラスに適用します。

<%@ 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.Attribute
System.Web.Services.Protocols.SoapDocumentServiceAttribute


Windows 98, Windows 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
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


SoapDocumentServiceAttribute コンストラクタ ()
アセンブリ: System.Web.Services (system.web.services.dll 内)


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

Windows 98, Windows 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
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


SoapDocumentServiceAttribute コンストラクタ (SoapBindingUse, SoapParameterStyle)
アセンブリ: System.Web.Services (system.web.services.dll 内)

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

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

Windows 98, Windows 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
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


SoapDocumentServiceAttribute コンストラクタ (SoapBindingUse)
アセンブリ: System.Web.Services (system.web.services.dll 内)


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

Windows 98, Windows 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
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


SoapDocumentServiceAttribute コンストラクタ

名前 | 説明 |
---|---|
SoapDocumentServiceAttribute () | すべてのプロパティを既定値に設定し、SoapDocumentServiceAttribute クラスの新しいインスタンスを初期化します。 .NET Compact Framework によってサポートされています。 |
SoapDocumentServiceAttribute (SoapBindingUse) | パラメータの書式を指定し、SoapDocumentServiceAttribute クラスの新しいインスタンスを初期化します。 .NET Compact Framework によってサポートされています。 |
SoapDocumentServiceAttribute (SoapBindingUse, SoapParameterStyle) | パラメータの書式を指定し、SOAP メッセージ内の Body 要素の下で単一の XML 要素内にパラメータをカプセル化するかどうかを指定する SoapDocumentServiceAttribute クラスの新しいインスタンスを初期化します。 .NET Compact Framework によってサポートされています。 |

SoapDocumentServiceAttribute プロパティ

名前 | 説明 | |
---|---|---|
![]() ![]() ![]() | TypeId | 派生クラスに実装されている場合は、この Attribute の一意の識別子を取得します。 ( Attribute から継承されます。) |
![]() | Use | XML Web サービスの既定のパラメータ書式を取得または設定します。 |

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 から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 ( Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 ( Object から継承されます。) |

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


名前 | 説明 | |
---|---|---|
![]() ![]() ![]() | TypeId | 派生クラスに実装されている場合は、この Attribute の一意の識別子を取得します。(Attribute から継承されます。) |
![]() | Use | XML Web サービスの既定のパラメータ書式を取得または設定します。 |

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

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 (Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 (Object から継承されます。) |

- SoapDocumentServiceAttributeのページへのリンク