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