WebServiceBindingAttribute クラスの新しいインスタンスを初期化します。
名前空間: System.Web.Services
アセンブリ: System.Web.Services (system.web.services.dll 内)
構文
'宣言
Public Sub New ( _
name As String, _
ns As String _
)
'使用
Dim name As String
Dim ns As String
Dim instance As New WebServiceBindingAttribute(name, ns)
public WebServiceBindingAttribute (
string name,
string ns
)
public:
WebServiceBindingAttribute (
String^ name,
String^ ns
)
public WebServiceBindingAttribute (
String name,
String ns
)
public function WebServiceBindingAttribute (
name : String,
ns : String
)
適用できません。
パラメータ
- name
XML Web サービス メソッドが操作を実装する対象となるバインディングの名前。Name プロパティを設定します。
- ns
バインディングに関連付けられた名前空間。Namespace プロパティを設定します。
解説
提供される名前空間のメンバであり、バインディングが適用される XML Web サービスで定義されているバインディングの名前を指定するには、このコンストラクタを使用します。
使用例
https://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 := "https://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="https://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 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
Namespace
SoapDocumentMethodAttribute
SoapRpcMethodAttribute