XML Web サービス メソッドが実装しているバインディングの名前を設定する WebServiceBindingAttribute クラスの新しいインスタンスを初期化します。
名前空間: System.Web.Services
アセンブリ: System.Web.Services (system.web.services.dll 内)
構文
'宣言
Public Sub New ( _
name As String _
)
'使用
Dim name As String
Dim instance As New WebServiceBindingAttribute(name)
public WebServiceBindingAttribute (
string name
)
public:
WebServiceBindingAttribute (
String^ name
)
public WebServiceBindingAttribute (
String name
)
public function WebServiceBindingAttribute (
name : String
)
適用できません。
パラメータ
- name
XML Web サービス メソッドが操作を実装する対象となるバインディングの名前。Name プロパティを設定します。
解説
既定の名前空間のメンバであり、バインディングが適用されている XML Web サービスで定義されているバインディングの名前を指定するには、このコンストラクタを使用します。
使用例
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 Server 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
Microsoft .NET Framework 3.0 は Windows Vista,Microsoft Windows XP SP2,および Windows Server 2003 SP1 でサポートされています。
バージョン情報
.NET Framework
サポート対象 : 3.0,2.0,1.1,1.0
.NET Compact Framework
サポート対象 : 2.0,1.0
参照
関連項目
WebServiceBindingAttribute クラス
WebServiceBindingAttribute メンバ
System.Web.Services 名前空間
Name
SoapDocumentMethodAttribute
SoapRpcMethodAttribute