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

<AttributeUsageAttribute(AttributeTargets.Class Or AttributeTargets.Interface, AllowMultiple:=True)> _ Public NotInheritable Class WebServiceBindingAttribute Inherits Attribute
[AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Interface, AllowMultiple=true)] public sealed class WebServiceBindingAttribute : Attribute
[AttributeUsageAttribute(AttributeTargets::Class|AttributeTargets::Interface, AllowMultiple=true)] public ref class WebServiceBindingAttribute sealed : public Attribute

WSDL (Web Services Description Language) によって定義されているバインディングは、具体的な操作のセットを定義している点でインターフェイスと似ています。各 XML Web サービス メソッドは、特定のバインディング内の操作です。XML Web サービス メソッドは、XML Web サービスの既定のバインディングのメンバ、または XML Web サービスを実装しているクラスに適用された WebServiceBindingAttribute の中で指定されたバインディングのメンバです。複数の WebServiceBindingAttribute 属性を 1 つの XML Web サービスに適用することにより、1 つの XML Web サービスで複数のバインディングを実装できます。
WebServiceAttribute 属性を XML Web サービスに適用すると、SoapDocumentMethodAttribute または SoapRpcMethodAttribute を個別の XML Web サービス メソッドに適用し、特定の XML Web サービス メソッドによって実装されるバインディング操作を指定できます。SoapDocumentMethodAttribute または SoapRpcMethodAttribute の Binding プロパティを設定して、XML Web サービス メソッドが操作を実装する対象となるバインディングを指定します。

4 つのバインディングで操作を実装する XML Web サービスを次に示します。特に、XML Web サービスは、3 つの WebServiceBindingAttribute 属性を XML Web サービスに適用して、操作を実装する対象となる 3 つのバインディングを宣言します。
XML Web サービス メソッドが操作を実装する対象であるバインディングを指定するために、DefaultBindingMethod を除く各 XML Web サービス メソッドに SoapDocumentMethodAttribute が適用されます。DefaultBindingMethod のバインディングを指定しないことによって、XML Web サービスの既定のバインディングに操作を実装しています。
<%@ WebService Language="VB" class="BindingSample" %> Imports System Imports System.Web.Services Imports System.Web.Services.Protocols ' Binding is defined in this XML Web service and uses the default namespace. ' Binding is defined in this XML Web service, but it is not a part of the default ' namespace. ' Binding is defined on a remote server, but this XML Web service implements at ' least one operation in that binding. <WebServiceBinding(Name := "LocalBinding"), _ WebServiceBinding(Name := "LocalBindingNonDefaultNamespace", _ Namespace := "http://www.contoso.com/MyBinding"), _ WebServiceBinding(Name := "RemoteBinding", _ Namespace := "http://www.contoso.com/MyBinding", _ Location := "http://www.contoso.com/MySevice.asmx?wsdl")> _ Public Class BindingSample <SoapDocumentMethod(Binding := "LocalBinding"), WebMethod()> _ Public Function LocalBindingMethod() As String Return "Member of binding defined in this XML Web service and member of the default namespace" End Function <SoapDocumentMethod(Binding := "LocalBindingNonDefaultNamespace"), WebMethod()> _ Public Function LocalBindingNonDefaultNamespaceMethod() As String Return "Member o1f binding defined in this XML Web service, but a part of a different namespace" End Function <SoapDocumentMethod(Binding := "RemoteBinding"), WebMethod()> _ Public Function RemoteBindingMethod() As String Return "Member of a binding defined on another server" End Function <WebMethod()> _ Public Function DefaultBindingMethod() As String Return "Member of the default binding" End Function End Class
<%@ WebService Language="C#" class="BindingSample" %> using System; using System.Web.Services; using System.Web.Services.Protocols; // Binding is defined in this XML Web service and uses the default namespace. [ WebServiceBinding(Name="LocalBinding")] // Binding is defined in this XML Web service, but it is not a part of the default namespace. [ WebServiceBinding(Name="LocalBindingNonDefaultNamespace", Namespace="http://www.contoso.com/MyBinding" )] // Binding is defined on a remote server, but this XML Web service implements at least one operation in that binding. [ WebServiceBinding(Name="RemoteBinding", Namespace="http://www.contoso.com/MyBinding", Location="http://www.contoso.com/MySevice.asmx?wsdl")] public class BindingSample { [ SoapDocumentMethod(Binding="LocalBinding")] [ WebMethod() ] public string LocalBindingMethod() { return "Member of binding defined in this XML Web service and member of the default namespace"; } [ SoapDocumentMethod(Binding="LocalBindingNonDefaultNamespace")] [ WebMethod() ] public string LocalBindingNonDefaultNamespaceMethod() { return "Member of binding defined in this XML Web service, but a part of a different namespace"; } [ SoapDocumentMethod(Binding="RemoteBinding")] [ WebMethod() ] public string RemoteBindingMethod() { return "Member of a binding defined on another server"; } [ WebMethod() ] public string DefaultBindingMethod() { return "Member of the default binding"; } }

System.Attribute
System.Web.Services.WebServiceBindingAttribute


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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


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


' Binding is defined on a remote server, but this XML Web service implements at ' least one operation in that binding. <WebServiceBinding(Name := "RemoteBinding", _ Namespace := "http://www.contoso.com/MyBinding", _ Location := "http://www.contoso.com/MyService.asmx?wsdl")> _ Public Class BindingSample <SoapDocumentMethod(Binding := "RemoteBinding"), WebMethod()> _ Public Function RemoteBindingMethod() As String Return "Member of a binding defined on another server" End Function End Class
// Binding is defined on a remote server, but this XML Web service // implements at least one operation in that binding. [ WebServiceBinding(Name="RemoteBinding", Namespace="http://www.contoso.com/MyBinding", Location="http://www.contoso.com/MyService.asmx?wsdl")] public class BindingSample { [ SoapDocumentMethod(Binding="RemoteBinding")] [ WebMethod() ] public string RemoteBindingMethod() { return "Member of a binding defined on another server"; } }

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


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



BindingSample XML Web サービスで定義されている LocalBinding という名前のバインディングを指定する例を次に示します。
' Binding is defined in this XML Web service and uses the default namespace. <WebServiceBinding(Name := "LocalBinding")> _ Public Class BindingSample <SoapDocumentMethod(Binding := "LocalBinding"), WebMethod()> _ Public Function LocalBindingMethod() As String Return "Member of binding defined in this XML Web service and member of the default namespace" End Function 'LocalBindingMethod End Class
// Binding is defined in this XML Web service and uses the default namespace. [ WebServiceBinding(Name="LocalBinding")] public class BindingSample { [ SoapDocumentMethod(Binding="LocalBinding")] [ WebMethod() ] public string LocalBindingMethod() { return "Member of binding defined in this XML Web service and member of the default namespace"; } }

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


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



http://www.contoso.com/MyBinding 名前空間のメンバであり、BindingSample XML Web サービスで定義されている、LocalBindingNonDefaultNamespace という名前のバインディングを指定する例を次に示します。
' Binding is defined in this XML Web service, but it is not a part of the default namespace. <WebServiceBinding(Name := "LocalBindingNonDefaultNamespace", _ Namespace := "http://www.contoso.com/MyBinding")> _ Public Class BindingSample <SoapDocumentMethod(Binding := "LocalBindingNonDefaultNamespace"), _ WebMethod()> _ Public Function LocalBindingNonDefaultNamespaceMethod() As String Return "Member of binding defined in this XML Web service, but a part " & _ "of a different namespace" End Function End Class
// Binding is defined in this XML Web service, but it is not a part of the default namespace. [ WebServiceBinding(Name="LocalBindingNonDefaultNamespace", Namespace="http://www.contoso.com/MyBinding")] public class BindingSample { [ SoapDocumentMethod(Binding="LocalBindingNonDefaultNamespace")] [ WebMethod() ] public string LocalBindingNonDefaultNamespaceMethod() { return "Member of binding defined in this XML Web service, but a part of a different namespace"; } }

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


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

Dim name As String Dim ns As String Dim location As String Dim instance As New WebServiceBindingAttribute(name, ns, location)


http://www.contoso.com/MyBinding 名前空間のメンバであり、http://www.contoso.com/MyService.asmx?wsdl で定義されている、RemoteBinding という名前のバインディングを指定する例を次に示します。
' Binding is defined on a remote server, but this XML Web service implements ' at least one operation in that binding. <WebServiceBinding(Name := "RemoteBinding", _ Namespace := "http://www.contoso.com/MyBinding", _ Location := "http://www.contoso.com/MyService.asmx?wsdl")> _ Public Class BindingSample <SoapDocumentMethod(Binding := "RemoteBinding"), WebMethod()> _ Public Function RemoteBindingMethod() As String Return "Member of a binding defined on another server" End Function End Class
// Binding is defined on a remote server, but this XML Web service implements // at least one operation in that binding. [ WebServiceBinding(Name="RemoteBinding", Namespace="http://www.contoso.com/MyBinding" , Location="http://www.contoso.com/MyService.asmx?wsdl" )] public class BindingSample { [ SoapDocumentMethod(Binding="RemoteBinding")] [ WebMethod() ] public string RemoteBindingMethod() { return "Member of a binding defined on another server"; } }

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


WebServiceBindingAttribute コンストラクタ

名前 | 説明 |
---|---|
WebServiceBindingAttribute () | WebServiceBindingAttribute クラスの新しいインスタンスを初期化します。 .NET Compact Framework によってサポートされています。 |
WebServiceBindingAttribute (String) | XML Web サービス メソッドが実装しているバインディングの名前を設定する WebServiceBindingAttribute クラスの新しいインスタンスを初期化します。 .NET Compact Framework によってサポートされています。 |
WebServiceBindingAttribute (String, String) | WebServiceBindingAttribute クラスの新しいインスタンスを初期化します。 .NET Compact Framework によってサポートされています。 |
WebServiceBindingAttribute (String, String, String) | WebServiceBindingAttribute クラスの新しいインスタンスを初期化します。 .NET Compact Framework によってサポートされています。 |

WebServiceBindingAttribute プロパティ

名前 | 説明 | |
---|---|---|
![]() | ConformsTo | バインディングが準拠していることを示す Web Services Interoperability (WSI) 仕様を取得または設定します。 |
![]() | EmitConformanceClaims | バインディングが準拠の表示を出力するかどうかを示す値を取得または設定します。 |
![]() ![]() ![]() ![]() | TypeId | 派生クラスに実装されている場合は、この Attribute の一意の識別子を取得します。 ( Attribute から継承されます。) |

WebServiceBindingAttribute メソッド

名前 | 説明 | |
---|---|---|
![]() | 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 から継承されます。) |

WebServiceBindingAttribute メンバ
1 つ以上の XML Web サービス メソッドを定義するバインディングを宣言します。このクラスは継承できません。
WebServiceBindingAttribute データ型で公開されるメンバを以下の表に示します。


名前 | 説明 | |
---|---|---|
![]() | ConformsTo | バインディングが準拠していることを示す Web Services Interoperability (WSI) 仕様を取得または設定します。 |
![]() | EmitConformanceClaims | バインディングが準拠の表示を出力するかどうかを示す値を取得または設定します。 |
![]() ![]() ![]() ![]() | TypeId | 派生クラスに実装されている場合は、この Attribute の一意の識別子を取得します。(Attribute から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | 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 から継承されます。) |

Weblioに収録されているすべての辞書からWebServiceBindingAttributeを検索する場合は、下記のリンクをクリックしてください。

- WebServiceBindingAttributeのページへのリンク